Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-36655: Assignment - do not add empty group to grading form when t…

…here is only one student
  • Loading branch information...
commit 62d70e07bc1f1ed5b7cbfcc75aa735ebc56736ee 1 parent 153f5eb
Damyon Wiese authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 mod/assign/locallib.php
View
4 mod/assign/locallib.php
@@ -3050,7 +3050,9 @@ public function add_grade_form_elements(MoodleQuickForm $mform, stdClass $data,
if (!$last){
$buttonarray[] = $mform->createElement('submit', 'nosaveandnext', get_string('nosavebutnext', 'assign'));
}
- $mform->addGroup($buttonarray, 'navar', '', array(' '), false);
+ if (!empty($buttonarray)) {
+ $mform->addGroup($buttonarray, 'navar', '', array(' '), false);
+ }
}
Please sign in to comment.
Something went wrong with that request. Please try again.