1 |
efrain |
1 |
This files describes API changes in the assign code.
|
|
|
2 |
|
|
|
3 |
=== 4.3 ===
|
|
|
4 |
* The following deprecated methods have been removed and should not be used any more:
|
|
|
5 |
- `assign::add_to_log`
|
|
|
6 |
- `assign::format_grade_for_log`
|
|
|
7 |
- `assign::format_submission_for_log`
|
|
|
8 |
- `assign_plugin::format_for_log`
|
|
|
9 |
* The assign_files renderable no longer abuses the dynamic nature of PHP and puts random properties onto stored_file
|
|
|
10 |
instances.
|
|
|
11 |
If you were previously using these properties, please update to use the new method on the tree:
|
|
|
12 |
* $file->portfoliobutton $renderer->get_portfolio_button($file)
|
|
|
13 |
* $file->timemodified $tree->get_modified_time($file)
|
|
|
14 |
* $file->fileurl $tree->get_file_url($file)
|
|
|
15 |
|
|
|
16 |
=== 4.2 ===
|
|
|
17 |
* The upgradelib.php file has been removed from mod_assign as it was only being used by mod_assignment and mod_assignment has been removed from core.
|
|
|
18 |
|
|
|
19 |
=== 4.1 ===
|
|
|
20 |
* New method \assign::is_userid_filtered() has been implemented. It returns false if user id is filtered out by either
|
|
|
21 |
user preferences for grading table or submission status filter. Otherwise, returns true.
|
|
|
22 |
* A new method was added to feedback/editpdf/locallib.php - get_user_data_file_areas() This just returns the necessary file areas
|
|
|
23 |
for retrieving a complete feedback pdf.
|
|
|
24 |
|
|
|
25 |
=== 4.0 ===
|
|
|
26 |
* The method \assign::grading_disabled() now has optional $gradinginfo parameter to improve performance
|
|
|
27 |
* Renderer (renderer.php) has been moved from mod root to classes/output/ to be more PSR compliant.
|
|
|
28 |
* Class assign_header has been moved from renderable.php to classes/ouput/assign_header.php
|
|
|
29 |
* Class assign_submion_status has been moved from renderable.php to classes/ouput/assign_submion_status.php
|
|
|
30 |
* The external functions mod_assign_external::list_participants and mod_assign_external::get_participant now return a new field
|
|
|
31 |
"submissionstatus" indicating the submission status (new, draft, reopened or submitted). Empty when not submitted.
|
|
|
32 |
|
|
|
33 |
=== 3.9 ===
|
|
|
34 |
|
|
|
35 |
* The following functions, previously used (exclusively) by upgrade steps are not available anymore because of the upgrade cleanup performed for this version. See MDL-65809 for more info:
|
|
|
36 |
- get_assignments_with_rescaled_null_grades()
|
|
|
37 |
|
|
|
38 |
=== 3.8 ===
|
|
|
39 |
* The allow_image_conversion method has been added to the submissionplugins. It determines whether the submission plugin
|
|
|
40 |
allows image conversion or not. By default conversion is not allowed (except when overwritten in the submission plugin)
|
|
|
41 |
* Webservice function mod_assign_get_submission_status, return value 'warnofungroupedusers', changed from PARAM_BOOL to PARAM_ALPHA. See the description for possible values.
|
|
|
42 |
* The following functions have been finally deprecated and can not be used anymore:
|
|
|
43 |
* assign_scale_used()
|
|
|
44 |
|
|
|
45 |
=== 3.7 ===
|
|
|
46 |
* Submissions plugins should implement the "remove" function to remove data when "Remove submission" is used.
|
|
|
47 |
|
|
|
48 |
=== 3.6 ===
|
|
|
49 |
* The mod_assign_base_testcase unit test base class has been deprecated.
|
|
|
50 |
It encouraged poor unit test design and led to significant performance issues with unit tests. See MDL-55609 for
|
|
|
51 |
further information.
|
|
|
52 |
* The function can_grade() now has optional $user parameter.
|
|
|
53 |
* Feedback plugins can now specify whether or not they want to attach files to the
|
|
|
54 |
feedback that is stored in the gradebook via the new method files_for_gradebook().
|
|
|
55 |
An example of what this method would return is -
|
|
|
56 |
[
|
|
|
57 |
'contextid' => $modulecontext->id,
|
|
|
58 |
'component' => ASSIGNFEEDBACK_XYZ_COMPONENT,
|
|
|
59 |
'filearea' => ASSIGNFEEDBACK_XYZ_FILEAREA,
|
|
|
60 |
'itemid' => $grade->id
|
|
|
61 |
]
|
|
|
62 |
|
|
|
63 |
=== 3.5 ===
|
|
|
64 |
* Functions assign:get_assign_grading_summary_renderable, assign:can_view_submission, assign:count_submissions_with_status,
|
|
|
65 |
assign:count_submissions_need_grading and mod_assign_external::get_submission_status now admit an additional group parameter.
|
|
|
66 |
This parameter can be used to force those functions to retrieve data only for the given group.
|
|
|
67 |
|
|
|
68 |
=== 3.4 ===
|
|
|
69 |
* assign::add_attempt requires that set_most_recent_team_submission() be called if attempting to use this function with a team
|
|
|
70 |
submission.
|
|
|
71 |
|
|
|
72 |
=== 3.3.2 ===
|
|
|
73 |
* assign_refresh_events() Now takes two additional parameters to refine the update to a specific instance. This function
|
|
|
74 |
now optionally takes the module instance object or ID, and the course module object or ID. Please try to send the full
|
|
|
75 |
objects instead of the ids to save DB calls.
|
|
|
76 |
|
|
|
77 |
=== 3.3 ===
|
|
|
78 |
* All pluginfile file serving functions now pass through the options to send_stored_file() (all assignment plugins should do
|
|
|
79 |
the same).
|
|
|
80 |
* Fixed calendar event types for overridden due dates from 'close' to 'due'.
|
|
|
81 |
* Removed calendar event type of 'open', since mod_assign only has the 'due' event type. No point in creating an override event
|
|
|
82 |
for an event type that does not exist.
|
|
|
83 |
|
|
|
84 |
=== 3.2 ===
|
|
|
85 |
* External function mod_assign_external::get_assignments now returns additional optional fields:
|
|
|
86 |
- preventsubmissionnotingroup: Prevent submission not in group.
|
|
|
87 |
- submissionstatement and submissionstatementformat: When there is a submission statement defined.
|
|
|
88 |
* Proper checking for empty submissions
|
|
|
89 |
* Submission modification time checking - this will help students working in groups not clobber each others'
|
|
|
90 |
submissions
|
|
|
91 |
* External functions that were returning file information now return the following file fields:
|
|
|
92 |
filename, filepath, mimetype, filesize, timemodified and fileurl.
|
|
|
93 |
Those fields are now marked as VALUE_OPTIONAL for backwards compatibility.
|
|
|
94 |
Please, note that previously the filename was part of the filepath field, now they are separated.
|
|
|
95 |
* Submission and feedback plugins can now specify file areas related to their configuration data,
|
|
|
96 |
which will then be included in backup and restore; see assign_plugin::get_config_file_areas().
|
|
|
97 |
* Submission and feedback plugins must now return the specific list of configs available for external functions,
|
|
|
98 |
this can be done implementing the new assign plugin method get_config_for_external()
|
|
|
99 |
* Webservice function mod_assign_get_submissions returns a new field 'gradingstatus' from each submission.
|
|
|
100 |
|
|
|
101 |
=== 3.1 ===
|
|
|
102 |
* The feedback plugins now need to implement the is_feedback_modified() method. The default is to return true
|
|
|
103 |
for backwards compatibiltiy.
|
|
|
104 |
* When downloading all submissions as a zip each students' files are in a separate folder, are no longer renamed
|
|
|
105 |
and the folder structure is kept intact.
|
|
|
106 |
|
|
|
107 |
=== 3.0 ===
|
|
|
108 |
* assign_submission_status renderable now requires $usergroups in its constructor
|
|
|
109 |
* External function mod_assign_external::get_assignments now have a new optional parameter: includenotenrolledcourses.
|
|
|
110 |
Its default value is false, setting it to true will return assignments for courses a user can see even if it's not enroled.
|
|
|
111 |
|
|
|
112 |
=== 2.9 ===
|
|
|
113 |
* External parameter now returns PARAM_RAW instead of PARAM_TEXT for webservices using feedback comments.
|
|
|
114 |
* External function mod_assign_external::get_assignments now returns additional optional fields:
|
|
|
115 |
- intro: Assignment intro.
|
|
|
116 |
- introformat: Intro format.
|
|
|
117 |
- introattachments: Intro attachments files.
|
|
|
118 |
|
|
|
119 |
=== 2.8 ===
|
|
|
120 |
* Some DB changes were made to simplify the SQL required to query the latest attempt.
|
|
|
121 |
- The assign_submission table now has a column "latest" which is set to 1 for the latest submission attempt.
|
|
|
122 |
- There will always be a submission row if there is a grade (so the latest grade can be found by joining with the submission)
|
|
|
123 |
- There is a new submission status "new" for a submission that has never been attempted by a student (but the record exists purely
|
|
|
124 |
to mark the latest attempt number as 0). The function get_user_submission will create a record with the status set to "new"
|
|
|
125 |
by default (the previous default was "draft").
|
|
|
126 |
|
|
|
127 |
=== 2.7 ===
|
|
|
128 |
|
|
|
129 |
* Added setting sendstudentnotifications to assign DB table with admin defaults. This sets the default value for the
|
|
|
130 |
"Notify students" option on the grading forms. This setting can be retrieved via webservices.
|
|
|
131 |
|
|
|
132 |
* Web service function mod_assign_save_grade has an additional optional parameter $advancedgradingdata which allows
|
|
|
133 |
advanced grading data to be used.
|
|
|
134 |
* A new web service function mod_assign_save_grades has been added which allows multiple grades to be processed.
|
|
|
135 |
* The event submission_updated() [mod/assign/classes/event/submission_updated.php] has been altered to now be an abstract class
|
|
|
136 |
for submission events in the submission plug-ins.
|
|
|
137 |
|
|
|
138 |
=== 2.6.1 ===
|
|
|
139 |
|
|
|
140 |
* format_text() is no longer used for formating assignment content to be used in events (assign_submission_onlinetext::save()) or
|
|
|
141 |
the word count (assign_submission_onlinetext::format_for_log()) in mod/assign/submission/onlinetext/locallib.php. format_text()
|
|
|
142 |
should only be used when displaying information to the screen. It was being used incorrectly before in these areas. Plugins using
|
|
|
143 |
the event assessable_uploaded() should use file_rewrite_pluginfile_urls() to translate the text back to the desired output.
|
|
|
144 |
|
|
|
145 |
=== 2.6 ===
|
|
|
146 |
* To see submission/grades of inactive users, user should have moodle/course:viewsuspendedusers capability.
|
|
|
147 |
* count_* functions will return only active participants.
|
|
|
148 |
* assign_submission_plugin->lock and unlock methods have an additional parameter for user flags. A user will not
|
|
|
149 |
always have a submission record when the submission is locked/unlocked.
|
|
|
150 |
* Submission and feedback plugins can now participate in webservices. The plugin must implement get_external_parameters()
|
|
|
151 |
to describe the parameters it is expecting from the mod_assign_save_grade or mod_assign_save_submission functions. The
|
|
|
152 |
plugin will then handle the webservice via it's normal save() method with the extra data supplied in the $data argument.
|
|
|
153 |
|
|
|
154 |
=== 2.5 ===
|
|
|
155 |
|
|
|
156 |
* New feature - Attempt History
|
|
|
157 |
|
|
|
158 |
This adds settings so that a student can have build up a history of separate submission attempts and grades for the same
|
|
|
159 |
assignment.
|
|
|
160 |
|
|
|
161 |
Extra settings on the assign table are:
|
|
|
162 |
attemptreopenmethod - The way attempts can be reopened. One of:
|
|
|
163 |
ASSIGN_ATTEMPT_REOPEN_METHOD_NONE - Attempts cannot be reopened (default)
|
|
|
164 |
ASSIGN_ATTEMPT_REOPEN_METHOD_UNTIL_PASS - Attempts are reopened on grading until the gradebook
|
|
|
165 |
indicates this student has passed.
|
|
|
166 |
ASSIGN_ATTEMPT_REOPEN_METHOD_MANUAL - Attempts are reopened on manually by the grader.
|
|
|
167 |
maxattempts - The maximum allowed number of attempts per student for this assign instance.
|
|
|
168 |
|
|
|
169 |
Extra settings on the submission and grade records:
|
|
|
170 |
attemptnumber - Starting from 0 until the latest attempt.
|
|
|
171 |
|
|
|
172 |
New table assign_user_flags holds user specific flags that were stored in the assign_grade table. (contains assignment,
|
|
|
173 |
userid, extensionduedate, mailed and locked)
|
|
|
174 |
|
|
|
175 |
assign changes:
|
|
|
176 |
"get_user_grade" function has an extra optional parameter to retrieve a specific attempt number.
|
|
|
177 |
"get_user_submission" function has an extra optional parameter to retrieve a specific attempt number.
|
|
|
178 |
"get_group_submission" function has an extra optional parameter to retrieve a specific attempt number.
|
|
|
179 |
new "get_user_flags" function can retrieve the user flags for a specific user (extensionduedate, mailed and locked).
|
|
|
180 |
new "update_user_flags" function can update the user flags for a specific user (extensionduedate, mailed and locked).
|
|
|
181 |
|
|
|
182 |
assign_submission_plugin changes:
|
|
|
183 |
"precheck_submission" function now takes a submission record so you can determine which submission is being checked.
|
|
|
184 |
"submit_for_grading" function now takes a submission record so you can determine which submission is being submitted.
|
|
|
185 |
new function "copy_submission" can be implemented to copy submission data from one submission to a new one.
|
|
|
186 |
|
|
|
187 |
New renderable object "assign_attempt_history" for rendering the list of previous submissions.
|
|
|
188 |
New renderable object "assign_gradingmessage" for rendering a generic grading message.
|
|
|
189 |
|
|
|
190 |
assign_grading_table changes:
|
|
|
191 |
get_group_and_submission is now protected and should not be called from outside this class.
|
|
|
192 |
|
|
|
193 |
|
|
|
194 |
=== Earlier changes ===
|
|
|
195 |
|
|
|
196 |
* Were not documented in this way. Sorry.
|