In order to use the overall feedback in assessments of example
submissions and in the assessment form preview, significant improvements
in the rendering machinery were done.
Workshop class provides two new methods overall_feedback_content_options()
and overall_feedback_attachment_options() as they are needed at various
scripts and libraries.
Overall feedback is displayed as a part of the workshop_assessment_form
only if the form is in editable mode (not frozen). If the form is
displayed in read-only (frozen) mode, the caller is expected to render
the overall feedback and list of attachments (the editor and filemanager
elements do not support frozen mode). To do so, the renderable
workshop_assessment now loads overall feedback data and provides two new
methods get_overall_feedback_content() and
get_overall_feedback_attachments() to be used by the renderer.
Renderable workshop_submission, workshop_assessment and related classes
now accept the workshop instance as the first parameter in their
constructors. This way, these renderable classes have access to the
workshop API.
In the future, the rendering of submission files should be improved in
the same way as is done in this patch (i.e. moving the logic and data
preparation out of the renderer into the renderable classes).
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
The button is displayed only when there is a pending (that is not
assessed yet) submission to assess.
AMOS BEGIN
CPY [savenext,mod_assign],[saveandshownext,mod_workshop]
AMOS END
Major tasks undertaken in this patch:
* New format_text argument, overflowdiv.
* New page layout Report.
* Review of all format_text calls.
* Added support for the report layout to all themes.
* Changed forum post display from tables to divs.
If a user is allowed to allocate a submission to herself for assessment,
there is now a button that she can press to immediately allocate and
assess the submission.
This patch also contains various cleanups spotted during the work.
DB columns userid renamed to authorid or reviewerid to make the value
clear. Improved manual allocation UI. Raw grades are stored as numeric
values from 0.00000 to 100.00000 (instead of the current 0 to 1) to be
more precise. Started to work on the Grading report (it est the overall
report of all grades form submission and grades for assessments).
Every action script in 99% starts with fetching course, course module,
and module instance record. Workshop class will keep the reference to
the course record in courserecord public member variable (do not confuse
with course integer property).
Initial sketches of random allocator. Refactoring of the rest of the
module here and there. Also, this commit removes trailing whitespace and
running empty lines.