See Release Notes
Long Term Support Release
Differences Between: [Versions 310 and 401] [Versions 311 and 401] [Versions 39 and 401] [Versions 401 and 402] [Versions 401 and 403]
This file contains the definition for the library class for file feedback plugin
Copyright: | 2012 NetSpot {@link http://www.netspot.com.au} |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 717 lines (30 kb) |
Included or required: | 0 times |
Referenced: | 3 times |
Includes or requires: | 0 files |
assign_feedback_file:: (25 methods):
get_name()
get_file_feedback()
get_file_options()
is_feedback_modified()
copy_area_files()
get_form_elements_for_user()
count_files()
update_file_count()
save()
view_summary()
view()
delete_instance()
is_empty()
get_file_areas()
can_upgrade()
upgrade_settings()
upgrade()
get_grading_batch_operations()
view_batch_upload_files()
grading_batch_operation()
view_upload_zip()
view_page()
get_grading_actions()
get_external_parameters()
get_config_for_external()
Class: assign_feedback_file - X-Ref
Library class for file feedback plugin extending feedback plugin base class.get_name() X-Ref |
Get the name of the file feedback plugin. return: string |
get_file_feedback($gradeid) X-Ref |
Get file feedback information from the database. param: int $gradeid return: mixed |
get_file_options() X-Ref |
File format options. return: array |
is_feedback_modified(stdClass $grade, stdClass $data) X-Ref |
Has the feedback file been modified? param: stdClass $grade Grade object. param: stdClass $data Form data. return: boolean True if the file area has been modified, else false. |
copy_area_files(file_storage $fs,$fromcontextid,$fromcomponent,$fromfilearea,$fromitemid,$tocontextid,$tocomponent,$tofilearea,$toitemid) X-Ref |
Copy all the files from one file area to another. param: file_storage $fs - The source context id param: int $fromcontextid - The source context id param: string $fromcomponent - The source component param: string $fromfilearea - The source filearea param: int $fromitemid - The source item id param: int $tocontextid - The destination context id param: string $tocomponent - The destination component param: string $tofilearea - The destination filearea param: int $toitemid - The destination item id return: boolean |
get_form_elements_for_user($grade, MoodleQuickForm $mform, stdClass $data, $userid) X-Ref |
Get form elements for grading form. param: stdClass $grade param: MoodleQuickForm $mform param: stdClass $data param: int $userid The userid we are currently grading return: bool true if elements were added to the form |
count_files($gradeid, $area) X-Ref |
Count the number of files. param: int $gradeid param: string $area return: int |
update_file_count($grade) X-Ref |
Update the number of files in the file area. param: stdClass $grade The grade record return: bool - true if the value was saved |
save(stdClass $grade, stdClass $data) X-Ref |
Save the feedback files. param: stdClass $grade param: stdClass $data return: bool |
view_summary(stdClass $grade, & $showviewlink) X-Ref |
Display the list of files in the feedback status table. param: stdClass $grade param: bool $showviewlink - Set to true to show a link to see the full list of files return: string |
view(stdClass $grade) X-Ref |
Display the list of files in the feedback status table. param: stdClass $grade return: string |
delete_instance() X-Ref |
The assignment has been deleted - cleanup. return: bool |
is_empty(stdClass $grade) X-Ref |
Return true if there are no feedback files. param: stdClass $grade |
get_file_areas() X-Ref |
Get file areas returns a list of areas this plugin stores files. return: array - An array of fileareas (keys) and descriptions (values) |
can_upgrade($type, $version) X-Ref |
Return true if this plugin can upgrade an old Moodle 2.2 assignment of this type and version. param: string $type old assignment subtype param: int $version old assignment version return: bool True if upgrade is possible |
upgrade_settings(context $oldcontext, stdClass $oldassignment, & $log) X-Ref |
Upgrade the settings from the old assignment to the new plugin based one. param: context $oldcontext - the context for the old assignment param: stdClass $oldassignment - the data for the old assignment param: string $log - can be appended to by the upgrade return: bool was it a success? (false will trigger a rollback) |
upgrade(context $oldcontext,stdClass $oldassignment,stdClass $oldsubmission,stdClass $grade,& $log) X-Ref |
Upgrade the feedback from the old assignment to the new one. param: context $oldcontext - the database for the old assignment context param: stdClass $oldassignment The data record for the old assignment param: stdClass $oldsubmission The data record for the old submission param: stdClass $grade The data record for the new grade param: string $log Record upgrade messages in the log return: bool true or false - false will trigger a rollback |
get_grading_batch_operations() X-Ref |
Return a list of the batch grading operations performed by this plugin. This plugin supports batch upload files and upload zip. return: array The list of batch grading operations |
view_batch_upload_files($users) X-Ref |
Upload files and send them to multiple users. param: array $users - An array of user ids return: string - The response html |
grading_batch_operation($action, $users) X-Ref |
User has chosen a custom grading batch operation and selected some users. param: string $action - The chosen action param: array $users - An array of user ids return: string - The response html |
view_upload_zip() X-Ref |
View the upload zip form. return: string - The html response |
view_page($action) X-Ref |
Called by the assignment module when someone chooses something from the grading navigation or batch operations list. param: string $action - The page to view return: string - The html response |
get_grading_actions() X-Ref |
Return a list of the grading actions performed by this plugin. This plugin supports upload zip. return: array The list of grading actions |
get_external_parameters() X-Ref |
Return a description of external params suitable for uploading a feedback file from a webservice. return: external_description|null |
get_config_for_external() X-Ref |
Return the plugin configs for external functions. return: array the list of settings |