<div class="ml_freespeaking_results">
  {{#reviewsettings.showreviewdetailed}}
    <div class="ml_freespeaking_results_summaries">
      <div class="ml_fs_results_summary">
        <span class="ml_fs_sumcell_title">{{#str}}sentences, mod_minilesson{{/str}}</span>
        <span class="ml_fs_sumcell_content">{{stats.sentences}}</span>
      </div>
      <div class="ml_fs_results_summary">
        <span class="ml_fs_sumcell_title">{{#str}}totalwords, mod_minilesson{{/str}}</span>
        <span class="ml_fs_sumcell_content">{{stats.words}}</span>
      </div>
      <div class="ml_fs_results_summary">
        <span class="ml_fs_sumcell_title">{{#str}}uniquewords, mod_minilesson{{/str}}</span>
        <span class="ml_fs_sumcell_content">{{stats.wordsunique}}</span>
      </div>
      <!--
      <div class="ml_fs_results_summary">
        <span class="ml_fs_sumcell_title">{{#str}}ideacount, mod_minilesson{{/str}}</span>
        <span class="ml_fs_sumcell_content">{{stats.ideacount}}</span>
      </div>
      -->
      <div class="ml_fs_results_summary">
        <span class="ml_fs_sumcell_title">{{#str}}relevance, mod_minilesson{{/str}}</span>
        <span class="ml_fs_sumcell_content">{{stats.relevance}}%</span>
      </div>
    </div>
  {{/reviewsettings.showreviewdetailed}}
  <div class="mlfsr_originaltext_container"><b>{{#str}}original, mod_minilesson{{/str}}:</b><br/><span class="mlfsr_originaltext">{{{markeduppassage}}}</span></div>
  {{^reviewsettings.hidecorrections}}
    <div class="mlfsr_correctedtext_container"><b>{{#str}}corrected, mod_minilesson{{/str}}:</b><br/>
      <span class="mlfsr_correctedtext">{{{markedupcorrections}}}</span>
      {{>mod_minilesson/summary_togglecorrections}}
    </div>
  {{/reviewsettings.hidecorrections}}
  <div class="ml_freespeaking_results_summaries">
    <!-- not needed currently
    <div class="ml_fs_results_summary">
      <span class="ml_fs_sumcell_title">{{#str}}score , mod_minilesson{{/str}}</span>
      <span class="ml_fs_sumcell_content">{{rawscore}}/{{maxscore}}</span>
    </div>
    <div class="ml_fs_results_summary">
      <span class="ml_fs_sumcell_title">Words</span>
      <span class="ml_fs_sumcell_content">{{stats.words}}</span>
    </div>
    -->
    <div class="ml_fs_results_summary" style="margin: auto">
      {{#reviewsettings.showscorepercentage}}
        <span class="ml_fs_sumcell_title">{{#str}}score , mod_minilesson{{/str}}</span>
        <span class="ml_fs_sumcell_content">{{percentscore}}%</span>
      {{/reviewsettings.showscorepercentage}}
      {{#reviewsettings.showscorestarrating}}
        <span class="ml_fs_sumcell_title">{{#str}}result , mod_minilesson{{/str}}</span>
        {{#yellowstars}}
          <span><img src="{{{wwwroot}}}/mod/minilesson/pix/yellow_star.png"/></span>
        {{/yellowstars}}
        {{#graystars}}
            <span><img src="{{{wwwroot}}}/mod/minilesson/pix/gray_star.png"/></span>
        {{/graystars}}
      {{/reviewsettings.showscorestarrating}}
    </div>
  </div>
</div>
<div class="ml_freespeaking_feedback">
<br/><b>{{#str}}feedback, mod_minilesson{{/str}}:</b>
<ul class="{{rtl}}">
  {{#feedback}}
  <li>{{.}}</li>
  {{/feedback}}
</ul>
</div>
 {{^noreattempt}}
<div class="minilesson_actionbutton">
<a class="btn btn-secondary center" href="#" id = "{{uniqid}}_reattempt">
  {{#str}}reattempt, mod_minilesson{{/str}}</a>
</div>
{{/noreattempt}}
{{^element.frozen}}
{{#js}}
    require(['jquery', 'core/notification', 'core/log'], function($, notification, log) {
      var reattemptbutton = $('#{{uniqid}}_reattempt');
      reattemptbutton.on('click',function(e){
        e.preventDefault();
        notification.confirm('{{#str}}reattempt, mod_minilesson{{/str}}', 
                            '{{#str}}reallyreattempt, mod_minilesson{{/str}}',
                            '{{#str}}reattempt, mod_minilesson{{/str}}','',
                            function(){
                                reattemptbutton .closest('.ml_freewriting_resultsbox').hide();
                                reattemptbutton .closest('.ml_freewriting_pendingbox').hide();
                                reattemptbutton .closest('.ml_freewriting_resultsbox').siblings('.ml_freewriting_actionbox').show();
                            });
            
            
      });
    });
{{/js}}
{{/element.frozen}}
