1 This files describes API changes in the assign code.
3 * External parameter now returns PARAM_RAW instead of PARAM_TEXT for webservices using feedback comments.
4 * External function mod_assign_external::get_assignments now returns additional optional fields:
5 - intro: Assignment intro.
6 - introformat: Intro format.
7 - introattachments: Intro attachments files.
10 * Some DB changes were made to simplify the SQL required to query the latest attempt.
11 - The assign_submission table now has a column "latest" which is set to 1 for the latest submission attempt.
12 - There will always be a submission row if there is a grade (so the latest grade can be found by joining with the submission)
13 - There is a new submission status "new" for a submission that has never been attempted by a student (but the record exists purely
14 to mark the latest attempt number as 0). The function get_user_submission will create a record with the status set to "new"
15 by default (the previous default was "draft").
19 * Added setting sendstudentnotifications to assign DB table with admin defaults. This sets the default value for the
20 "Notify students" option on the grading forms. This setting can be retrieved via webservices.
22 * Web service function mod_assign_save_grade has an additional optional parameter $advancedgradingdata which allows
23 advanced grading data to be used.
24 * A new web service function mod_assign_save_grades has been added which allows multiple grades to be processed.
25 * The event submission_updated() [mod/assign/classes/event/submission_updated.php] has been altered to now be an abstract class
26 for submission events in the submission plug-ins.
30 * format_text() is no longer used for formating assignment content to be used in events (assign_submission_onlinetext::save()) or
31 the word count (assign_submission_onlinetext::format_for_log()) in mod/assign/submission/onlinetext/locallib.php. format_text()
32 should only be used when displaying information to the screen. It was being used incorrectly before in these areas. Plugins using
33 the event assessable_uploaded() should use file_rewrite_pluginfile_urls() to translate the text back to the desired output.
36 * To see submission/grades of inactive users, user should have moodle/course:viewsuspendedusers capability.
37 * count_* functions will return only active participants.
38 * assign_submission_plugin->lock and unlock methods have an additional parameter for user flags. A user will not
39 always have a submission record when the submission is locked/unlocked.
40 * Submission and feedback plugins can now participate in webservices. The plugin must implement get_external_parameters()
41 to describe the parameters it is expecting from the mod_assign_save_grade or mod_assign_save_submission functions. The
42 plugin will then handle the webservice via it's normal save() method with the extra data supplied in the $data argument.
46 * New feature - Attempt History
48 This adds settings so that a student can have build up a history of separate submission attempts and grades for the same
51 Extra settings on the assign table are:
52 attemptreopenmethod - The way attempts can be reopened. One of:
53 ASSIGN_ATTEMPT_REOPEN_METHOD_NONE - Attempts cannot be reopened (default)
54 ASSIGN_ATTEMPT_REOPEN_METHOD_UNTIL_PASS - Attempts are reopened on grading until the gradebook
55 indicates this student has passed.
56 ASSIGN_ATTEMPT_REOPEN_METHOD_MANUAL - Attempts are reopened on manually by the grader.
57 maxattempts - The maximum allowed number of attempts per student for this assign instance.
59 Extra settings on the submission and grade records:
60 attemptnumber - Starting from 0 until the latest attempt.
62 New table assign_user_flags holds user specific flags that were stored in the assign_grade table. (contains assignment,
63 userid, extensionduedate, mailed and locked)
66 "get_user_grade" function has an extra optional parameter to retrieve a specific attempt number.
67 "get_user_submission" function has an extra optional parameter to retrieve a specific attempt number.
68 "get_group_submission" function has an extra optional parameter to retrieve a specific attempt number.
69 new "get_user_flags" function can retrieve the user flags for a specific user (extensionduedate, mailed and locked).
70 new "update_user_flags" function can update the user flags for a specific user (extensionduedate, mailed and locked).
72 assign_submission_plugin changes:
73 "precheck_submission" function now takes a submission record so you can determine which submission is being checked.
74 "submit_for_grading" function now takes a submission record so you can determine which submission is being submitted.
75 new function "copy_submission" can be implemented to copy submission data from one submission to a new one.
77 New renderable object "assign_attempt_history" for rendering the list of previous submissions.
78 New renderable object "assign_gradingmessage" for rendering a generic grading message.
80 assign_grading_table changes:
81 get_group_and_submission is now protected and should not be called from outside this class.
84 === Earlier changes ===
86 * Were not documented in this way. Sorry.