staff_problem_info.html 3.9 KB
Newer Older
1
## The JS for this is defined in xqa_interface.html
2
${module_content}
3
%if location.category in ['problem','video','html','combinedopenended','graphical_slider_tool']:
4
%  if edit_link:
5
<div>
6 7 8
    <a href="${edit_link}">Edit</a>
    % if xqa_key:
        / <a href="#${element_id}_xqa-modal" onclick="javascript:getlog('${element_id}', {
9 10 11 12 13
        'location': '${location}',
        'xqa_key': '${xqa_key}',
        'category': '${category}',
        'user': '${user}'
     })" id="${element_id}_xqa_log">QA</a>
14
    % endif
15
</div>
16
%  endif
17
<div><a href="#${element_id}_debug" id="${element_id}_trig">Staff Debug Info</a></div>
18

19 20
%  if settings.MITX_FEATURES.get('ENABLE_STUDENT_HISTORY_VIEW') and \
      location.category == 'problem':
21 22 23
<div><a href="#${element_id}_history" id="${element_id}_history_trig">Submission history</a></div>
%  endif

24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
<section id="${element_id}_xqa-modal" class="modal xqa-modal" style="width:80%; left:20%; height:80%; overflow:auto" >
  <div class="inner-wrapper">
    <header>
      <h2>edX Content Quality Assessment</h2>
    </header>

    <form id="${element_id}_xqa_form" class="xqa_form">
      <label>Comment</label>
      <input id="${element_id}_xqa_entry" type="text" placeholder="comment">
      <label>Tag</label>
      <span style="color:black;vertical-align: -10pt">Optional tag (eg "done" or "broken"):&nbsp;       </span>
      <input id="${element_id}_xqa_tag" type="text" placeholder="tag" style="width:80px;display:inline">
      <div class="submit">
        <button name="submit" type="submit">Add comment</button>
      </div>
      <hr>
      <div id="${element_id}_xqa_log_data"></div>
    </form>

  </div>
</section>

<section class="modal staff-modal" id="${element_id}_debug" style="width:80%; left:20%; height:80%; overflow:auto;" >
  <div class="inner-wrapper" style="color:black">
    <header>
      <h2>Staff Debug</h2>
    </header>
51
    <div class="staff_info" style="display:block">
ichuang committed
52
is_released = ${is_released}
53
location = ${location | h}
54 55
<table>
  <tr><th>Module Fields</th></tr>
56
  %for name, field in fields:
57
  <tr><td>${name}</td><td><pre style="display:inline-block; margin: 0;">${field | h}</pre></td></tr>
58
  %endfor
59 60 61
</table>
<table>
  <tr><th>edX Fields</th></tr>
62
  %for name, field in lms_fields:
63
  <tr><td>${name}</td><td><pre style="display:inline-block; margin: 0;">${field | h}</pre></td></tr>
64
  %endfor
65
</table>
66 67 68 69 70 71
<table>
  <tr><th>XML attributes</th></tr>
  %for name, field in xml_attributes.items():
  <tr><td>${name}</td><td><pre style="display:inline-block; margin: 0;">${field | h}</pre></td></tr>
  %endfor
</table>
72 73 74 75 76 77 78 79
category = ${category | h}
    </div>
    %if render_histogram:
    <div id="histogram_${element_id}" class="histogram" data-histogram="${histogram}"></div>
    %endif
  </div>
</section>

80 81 82 83 84 85 86 87 88 89 90 91 92
<section class="modal history-modal" id="${element_id}_history" style="width:80%; left:20%; height:80%; overflow:auto;" >
  <div class="inner-wrapper" style="color:black">
    <header>
      <h2>Submission History Viewer</h2>
    </header>
    <form id="${element_id}_history_form">
      <label for="${element_id}_history_student_username">User:</label>
      <input id="${element_id}_history_student_username" type="text" placeholder=""/>
      <input type="hidden" id="${element_id}_history_location" value="${location}"/>
      <div class="submit">
        <button name="submit" type="submit">View History</button>
      </div>
    </form>
93

94 95 96 97 98 99
    <div id="${element_id}_history_text" class="staff_info" style="display:block">
    </div>
  </div>
</section>

<div id="${element_id}_setup"></div>
100 101

<script type="text/javascript">
102
// assumes courseware.html's loaded this method.
103
$(function () {
104 105 106 107 108 109 110 111 112 113 114 115 116 117
    setup_debug('${element_id}',
        %if edit_link:
        '${edit_link}',
        %else:
        null,
        %endif
        {
            'location': '${location}',
            'xqa_key': '${xqa_key}',
            'category': '${category}',
            'user': '${user}'
        }
    );
});
118
</script>
119 120
%endif