In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.
In these cases, mod_assign was treating other unrelated objects as its
personal object store. These have been updated to not require this.
After checking the the relation between mod_assign and mod_assginment,
it was found that upgradelib.php was only used/called from the
mod_assignment. Therefore, it was decided to move the upgradelib.php
from mod_assign to mod_assignment and deleted the line in which requires the upgradelib.php
This adds a new method to the assignfeedback edit pdf library
to specify user data file areas that will return just the meaningful
annotated feedback pdf.
get_file_areas has been updated for this plugin to return all
file areas related to assignfeedback_editpdf, and should stop
producing orphaned files and records when a course reset is done.
Thanks to @toniginard who provided a base solution for me to work
off.
Refactor rendering classes to be more PSR compliant.
Move renderer to output class folder and initial
splitting of classes in renderable.php into individual
class files. To make it easier to refactor assign UI
functionality in the future.
This function was used only by deleted upgrade steps
so it's safe to proceed with straight deletion, considering
it internal. Deletion has been documented in corresponding
upgrade.txt files.
Remove creation of calendar events for mod_assign with
eventtype = 'open'. Since mod_assign instance creation only creates a
calendar event for the due date, there's no point in creating an override
event for an event type that does not exist.
Set the event priority of the following activity overrides:
* mod_assign
* mod_lesson
* mod_quiz
Always create separate events for start and end dates of activities.
Until now in the get_assignments WS all the settings for assignment
plugins (submission and feedback) are returned, this was bad because:
- It was returning settings for plugins that may not be enabled
- It was returning settings that would be a security risk (a third
party plugin including a password or credentials for connecting a
remote site)
- Some values was returned "raw" without further processing, for
example, maxsubmissionsizebytes returned 0 when using the plugin
default value instead a valid size
- Assignment plugins implemented an API for communication with the
external API, see for example: get_external_parameters, it didn’t make
sense had an API for the received parameters and not the returned data.
This commit reduces boilerplate code.
It also forces WS returning files to always return the following
fields: filename, filepath, mimetype, filesize, timemodified and
fileurl.
Previous empty submission checks required the submission to
be saved to the database. This patch adds a new method to
submission plugins that lets them report whether the submission
is empty before it is saved.
Added a method to the feedback plugins to check if feedback
has been modified. This allows for a more accurate record
of when the grade has been modified.
New events have been created for submission plugins. This is
part of the consistancy move by adding the same type of event through
all of the modules.
AMOS BEGIN
MOV [event_submission_updated,mod_assign],[eventsubmissionupdated,mod_assign]
AMOS END
This patch adds lots of webservices to the assignment module.
* mod_assign_revert_submissions_to_draft
* mod_assign_lock_submissions
* mod_assign_unlock_submissions
* mod_assign_save_submission
* mod_assign_submit_for_grading
* mod_assign_save_grade
* mod_assign_save_user_extensions
* mod_assign_reveal_identities
* mod_assign_copy_previous_attempt
All features such as reopening attempts and marking workflow are supported through
the save_grade and save_submission functions.
Uploading files is supported by sending draft item ids for the files_filemanager param the same functions.