Portfolio API code in the assignment module expected that the current
user is the author of the submission. Therefore the "Export to
portfolio" button did not work when the submission was viewed by a
teacher (eg at the page with the list of all submissions in the Advanced
upload assignment).
This patch introduces a new callback argument 'submissionid' that holds
explicit ID of the submission the export deals with. With it available,
we do not need to expect the current user is the author of the
submission.
The patch also cleans some strings used for portfolio callback
exceptions.
When this code was used as a part of the grading screen, the default
PORTFOLIO_ADD_FULL_FORM widget led to nested form elements. This patch replaces
the form widget with a plain text link that can be embedded safely.
New PARAM_COMPONENT, PARAM_AREA and PARAM_PLUGIN + fixing of hopefully all current incorrect parameter types. This should help with diagnosing of incorrectly named 3rd party plugins too.
The Workshop module using the "Number of errors" grading strategy did
not save all items in the grade mapping table. If some assessment form
fields have weight > 1, the number of possible errors is greater that
the number of the assessment form fields. The previous code deleted all
mappings where the number of errors was greater than the number of
fields.
In this patch, the maximum number of possible errors is calculated as a
sum of weights of all fields. Only mappings over this maximum are
deleted now.
The problem was when output was being started in relation to when the fake block was added.
Took the opportunity to clean up the quiz renderer API a bit.
Also, refine the standard_grading_coursemodule_elements method to add a
help string.
AMOS BEGIN
CPY [gradecategory,grades],[gradecategoryonmodform,grades]
AMOS END