[BugFix] Multiple essays were not showing for grading: http://moodle.org/mod/forum/discuss.php?d=41999#195580
This commit is contained in:
+5
-2
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user