MDL-56022 Assign: Make folders structure in the downloaded zip optional

Special thanks to Matt McDermott for the contributing the Javascript
code to fix this issue.
This commit is contained in:
Stephen Bourget
2016-10-17 16:19:28 -04:00
parent 6a69cda97d
commit 1b467cb8cf
6 changed files with 78 additions and 28 deletions
+7
View File
@@ -86,6 +86,13 @@ class mod_assign_grading_options_form extends moodleform {
$mform->setDefault('showonlyactiveenrol', $instance['showonlyactiveenrol']);
}
// Place student downloads in seperate folders.
if ($instance['submissionsenabled']) {
$mform->addElement('checkbox', 'downloadasfolders', get_string('downloadasfolders', 'assign'), '', $dirtyclass);
$mform->addHelpButton('downloadasfolders', 'downloadasfolders', 'assign');
$mform->setDefault('downloadasfolders', $instance['downloadasfolders']);
}
// Hidden params.
$mform->addElement('hidden', 'contextid', $instance['contextid']);
$mform->setType('contextid', PARAM_INT);