mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 17:36:38 +02:00
MDL-37602 Put the overall feedback fields to the bottom of the assessment form
The assessment form can be displayed as editable or read-only (frozen). Neither the editor element nor the filemanager element support displaying frozen content themselves so we need to pre-format and inject static texts. The list of attachments should be ideally generated by the renderer and probably improved a bit - just quick and dirty solution must be enough for now though (2.5 coding freeze is just behind the corner...). AMOS BEGIN CPY [submissionattachment,mod_workshop],[feedbackauthorattachment,mod_workshop] AMOS END
This commit is contained in:
parent
3ac58f227a
commit
c6a793d5a2
4 changed files with 124 additions and 6 deletions
|
@ -68,6 +68,28 @@ class workshop_assessment_form extends moodleform {
|
|||
$mform->addElement('hidden', 'strategy', $this->workshop->strategy);
|
||||
$mform->setType('strategy', PARAM_PLUGIN);
|
||||
|
||||
if (!empty($this->workshop->overallfeedbackmode)) {
|
||||
$mform->addElement('header', 'overallfeedbacksection', get_string('overallfeedback', 'mod_workshop'));
|
||||
if (!$mform->isFrozen()) {
|
||||
$mform->addElement('editor', 'feedbackauthor_editor', get_string('feedbackauthor', 'mod_workshop'), null,
|
||||
$this->options['feedbackauthoreditoropts']);
|
||||
if ($this->workshop->overallfeedbackmode == 2) {
|
||||
$mform->addRule('feedbackauthor_editor', null, 'required', null, 'client');
|
||||
}
|
||||
if (!empty($this->workshop->overallfeedbackfiles)) {
|
||||
$mform->addElement('filemanager', 'feedbackauthorattachment_filemanager',
|
||||
get_string('feedbackauthorattachment', 'mod_workshop'), null,
|
||||
$this->options['feedbackauthorattachmentopts']);
|
||||
}
|
||||
|
||||
} else {
|
||||
$mform->addElement('static', 'feedbackauthor', get_string('feedbackauthor', 'mod_workshop'));
|
||||
if (!empty($this->workshop->overallfeedbackfiles)) {
|
||||
$mform->addElement('static', 'feedbackauthorattachment', get_string('feedbackauthorattachment', 'mod_workshop'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($this->options['editableweight']) and !$mform->isFrozen()) {
|
||||
$mform->addElement('header', 'assessmentsettings', get_string('assessmentweight', 'workshop'));
|
||||
$mform->addElement('select', 'weight',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue