Permalink
Browse files

[BugFix] Multiple essays were not showing for grading: http://moodle.…

  • Loading branch information...
michaelpenne
michaelpenne committed Mar 28, 2006
1 parent e475c02 commit a60906a298cc5da560927cfc039cab69f6086d06
Showing with 5 additions and 2 deletions.
  1. +5 −2 mod/lesson/view.php
View
@@ -1155,8 +1155,10 @@
$a->notsentcount = 0;
foreach ($studentessays as $studentid => $pages) { // students
$attempts = count_records('lesson_grades', 'userid', $studentid, 'lessonid', $lesson->id);
- $count = 0;
+
foreach ($pages as $tries) { // pages
+ $count = 0;
+
// go through each essay per page
foreach($tries as $try) { // actual attempts
if ($attempts == $count) {
@@ -1626,10 +1628,11 @@
// number of attempts on the lesson
$attempts = count_records('lesson_grades', 'userid', $id, 'lessonid', $lesson->id);
- $count = 0;
// go through each essay
foreach ($studentessays[$id] as $page => $tries) {
+ $count = 0;
+
// go through each essay per page
foreach($tries as $try) {
if ($count == $attempts) {

0 comments on commit a60906a

Please sign in to comment.