MDL-36655: Assignment - do not add empty group to grading form when there is only one student

This commit is contained in:
Damyon Wiese
2012-11-16 11:00:05 +08:00
parent 153f5eb3c7
commit 62d70e07bc
+3 -1
View File
@@ -3050,7 +3050,9 @@ class assign {
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);
}
}