Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

fix class stats for essay questions

  • Loading branch information...
commit bca6b842caba761a80532892aadd92012c1be52e 1 parent 5e5b03e
michaelpenne authored

Showing 1 changed file with 5 additions and 5 deletions. Show diff stats Hide diff stats

  1. +5 5 mod/lesson/report.php
10 mod/lesson/report.php
@@ -688,14 +688,14 @@
688 688 }
689 689
690 690 if (isset($pagestats[$page->id])) {
691   - $percent = $pagestats[$page->id]->totalscore / $pagestats[$page->id]->total * 100;
692   - $percent = round($percent, 2);
693   - $percent = get_string("averagescore", "lesson").": ". $percent ."%";
  691 + $avescore = $pagestats[$page->id]->totalscore / $pagestats[$page->id]->total;
  692 + $avescore = round($avescore, 2);
  693 + $avescore = get_string("averagescore", "lesson").": ". $avescore ;
694 694 } else {
695 695 // dont think this should ever be reached....
696   - $percent = get_string("nooneansweredthisquestion", "lesson");
  696 + $avescore = get_string("nooneansweredthisquestion", "lesson");
697 697 }
698   - $answerdata->answers[] = array($essayinfo->answer, $percent);
  698 + $answerdata->answers[] = array($essayinfo->answer, $avescore);
699 699 break;
700 700 case LESSON_BRANCHTABLE :
701 701 $data = "<input type=\"button\" name=\"$answer->id\" value=\"$answer->answer\" disabled=\"disabled\"> ";

0 comments on commit bca6b84

Please sign in to comment.
Something went wrong with that request. Please try again.