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 e7468fb2ed
commit f3027e87fe

View File

@ -3966,7 +3966,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);
}
}