MDL-37602 Overall feedback can be configured in the workshop settings form

Three new fields are added into the into the Assessment settings section
of the form. The default value for the overallfeedbackmaxbytes is the
same as the maximum size for submission attachments (which seems to be a
reasonable value). If there is a demand and a strong use case, these
values can became per-site configurable (I can see no big benefit of
doing so right now).

AMOS BEGIN
 CPY [maxbytes,mod_workshop],[overallfeedbackmaxbytes,mod_workshop]
AMOS END
This commit is contained in:
David Mudrák 2013-03-25 13:23:02 +01:00
parent 7426229f12
commit 1c6b484dab
2 changed files with 31 additions and 0 deletions

View File

@ -184,6 +184,13 @@ $string['notoverridden'] = 'Not overriden';
$string['noworkshops'] = 'There are no workshops in this course';
$string['noyoursubmission'] = 'You have not submitted your work yet';
$string['nullgrade'] = '-';
$string['overallfeedbackfiles'] = 'Maximum number of overall feedback attachments';
$string['overallfeedbackmaxbytes'] = 'Maximum file size';
$string['overallfeedbackmode'] = 'Overall feedback mode';
$string['overallfeedbackmode_0'] = 'Disabled';
$string['overallfeedbackmode_1'] = 'Enabled and optional';
$string['overallfeedbackmode_2'] = 'Enabled and required';
$string['overallfeedbackmode_help'] = 'If enabled, a text field is displayed at the bottom of the assessment form. Reviewers can put the overall assessment of the submission there, or provide additional explanation of their assessment.';
$string['page-mod-workshop-x'] = 'Any workshop module page';
$string['participant'] = 'Participant';
$string['participantrevierof'] = 'Participant is reviewer of';

View File

@ -164,6 +164,30 @@ class mod_workshop_mod_form extends moodleform_mod {
$mform->addElement('editor', 'instructreviewerseditor', $label, null,
workshop::instruction_editors_options($this->context));
$mform->addElement('select', 'overallfeedbackmode', get_string('overallfeedbackmode', 'mod_workshop'), array(
0 => get_string('overallfeedbackmode_0', 'mod_workshop'),
1 => get_string('overallfeedbackmode_1', 'mod_workshop'),
2 => get_string('overallfeedbackmode_2', 'mod_workshop')));
$mform->addHelpButton('overallfeedbackmode', 'overallfeedbackmode', 'mod_workshop');
$mform->setDefault('overallfeedbackmode', 1);
$mform->setAdvanced('overallfeedbackmode');
$options = array();
for ($i = 7; $i >= 0; $i--) {
$options[$i] = $i;
}
$mform->addElement('select', 'overallfeedbackfiles', get_string('overallfeedbackfiles', 'workshop'), $options);
$mform->setDefault('overallfeedbackfiles', 0);
$mform->setAdvanced('overallfeedbackfiles');
$mform->disabledIf('overallfeedbackfiles', 'overallfeedbackmode', 'eq', 0);
$options = get_max_upload_sizes($CFG->maxbytes, $this->course->maxbytes);
$mform->addElement('select', 'overallfeedbackmaxbytes', get_string('overallfeedbackmaxbytes', 'workshop'), $options);
$mform->setAdvanced('overallfeedbackmaxbytes');
$mform->setDefault('overallfeedbackmaxbytes', $workshopconfig->maxbytes);
$mform->disabledIf('overallfeedbackmaxbytes', 'overallfeedbackmode', 'eq', 0);
$mform->disabledIf('overallfeedbackmaxbytes', 'overallfeedbackfiles', 'eq', 0);
$label = get_string('examplesmode', 'workshop');
$options = workshop::available_example_modes_list();
$mform->addElement('select', 'examplesmode', $label, $options);