<commit_before>## The JS for this is defined in xqa_interface.html
${module_content}
%if location.category in ['problem','video','html']:
%  if edit_link:
<div>
	<a href="${edit_link}">Edit</a> /
	<a href="#${element_id}_xqa-modal" onclick="javascript:getlog('${element_id}', {
        'location': '${location}',
        'xqa_key': '${xqa_key}',
        'category': '${category}',
        'user': '${user}'
     })" id="${element_id}_xqa_log">QA</a>
</div>
%  endif
<div><a href="#${element_id}_debug" id="${element_id}_trig">Staff Debug Info</a></div>

%  if settings.MITX_FEATURES.get('ENABLE_STUDENT_HISTORY_VIEW'):
<div><a href="#${element_id}_history" id="${element_id}_history_trig">Submission history</a></div>
%  endif

<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>
    <div class="staff_info" style="display:block">
is_released = ${is_released}
location = ${location | h}
github = <a href="${edit_link}">${edit_link | h}</a>
%if source_file:
source_url = <a href="${source_url}">${source_file | h}</a>
%endif
definition = <pre>${definition | h}</pre>
metadata = ${metadata | h}
category = ${category | h}
    </div>
    %if render_histogram:
    <div id="histogram_${element_id}" class="histogram" data-histogram="${histogram}"></div>
    %endif
  </div>
</section>

<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>

    <div id="${element_id}_history_text" class="staff_info" style="display:block">
    </div>
  </div>
</section>

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

<script type="text/javascript">
// assumes courseware.html's loaded this method.
  setup_debug('${element_id}',
    %if edit_link:
      '${edit_link}',
    %else:
      null,
    %endif
    {
        'location': '${location}',
        'xqa_key': '${xqa_key}',
        'category': '${category}',
        'user': '${user}'
    });
</script>
%endif

<commit_msg>Make sure the submissions history only shows up with problems.<commit_after>## The JS for this is defined in xqa_interface.html
${module_content}
%if location.category in ['problem','video','html']:
%  if edit_link:
<div>
	<a href="${edit_link}">Edit</a> /
	<a href="#${element_id}_xqa-modal" onclick="javascript:getlog('${element_id}', {
        'location': '${location}',
        'xqa_key': '${xqa_key}',
        'category': '${category}',
        'user': '${user}'
     })" id="${element_id}_xqa_log">QA</a>
</div>
%  endif
<div><a href="#${element_id}_debug" id="${element_id}_trig">Staff Debug Info</a></div>

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

<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>
    <div class="staff_info" style="display:block">
is_released = ${is_released}
location = ${location | h}
github = <a href="${edit_link}">${edit_link | h}</a>
%if source_file:
source_url = <a href="${source_url}">${source_file | h}</a>
%endif
definition = <pre>${definition | h}</pre>
metadata = ${metadata | h}
category = ${category | h}
    </div>
    %if render_histogram:
    <div id="histogram_${element_id}" class="histogram" data-histogram="${histogram}"></div>
    %endif
  </div>
</section>

<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>

    <div id="${element_id}_history_text" class="staff_info" style="display:block">
    </div>
  </div>
</section>

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

<script type="text/javascript">
// assumes courseware.html's loaded this method.
  setup_debug('${element_id}',
    %if edit_link:
      '${edit_link}',
    %else:
      null,
    %endif
    {
        'location': '${location}',
        'xqa_key': '${xqa_key}',
        'category': '${category}',
        'user': '${user}'
    });
</script>
%endif


{'fraction_non_alphanumeric': 0.2037037037037037, 'fraction_numerical': 0.008039046798736722, 'mean_word_length': 4.4344773790951635, 'pattern_counts': {'":': 0, '<': 165, '<?xml version=': 0, '>': 165, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2476347', 'n_tokens_mistral': 2391, 'n_tokens_neox': 2355, 'n_words': 450}