Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
|
Files | |
file | access.php |
Capability definitions for this module. | |
file | activity.php |
Search area for mod_assign activities. | |
file | activity_base.php |
Activity base class. | |
file | adminlib.php |
This file contains the classes for the admin settings of the assign module. | |
file | all_submissions_downloaded.php |
The mod_assign all submissions downloaded event. | |
file | assessable_submitted.php |
The mod_assign assessable submitted event. | |
file | assign_plugin_request_data.php |
This file contains the mod_assign assign_plugin_request_data class. | |
file | assignfeedback.php |
Assign feedback subplugin info class. | |
file | assignfeedback_provider.php |
This file contains the assignfeedback_provider interface. | |
file | assignfeedback_user_provider.php |
This file contains the assignfeedback_user_provider interface. | |
file | assignmentplugin.php |
This file contains the functions for assign_plugin abstract class. | |
file | assignsubmission.php |
Assign submission subplugin info class. | |
file | assignsubmission_provider.php |
This file contains the assignsubmission_provider interface. | |
file | assignsubmission_subplugin_generator.php |
Online Text assignment submission subplugin data generator. | |
file | assignsubmission_user_provider.php |
This file contains the assignsubmission_user_provider interface. | |
file | backup_assign_activity_task.class.php |
This file contains the backup activity for the assign module. | |
file | backup_assign_stepslib.php |
Define all the backup steps that will be used by the backup_assign_activity_task. | |
file | base.php |
The mod_assign abstract base event. | |
file | batch_set_marker_allocation_viewed.php |
The mod_assign batch set marker allocation viewed event. | |
file | batch_set_workflow_state_viewed.php |
The mod_assign assignment batch set workflow stated viewed event. | |
file | batchsetallocatedmarkerform.php |
This file contains the forms to set the allocated marker for selected submissions. | |
file | batchsetmarkingworkflowstateform.php |
This file contains the forms to set the marking workflow for selected submissions. | |
file | behat_mod_assign_generator.php |
Behat data generator for mod_assign. | |
file | cognitive_depth.php |
Cognitive depth indicator - assign. | |
file | course_module_instance_list_viewed.php |
The mod_assign instance list viewed event. | |
file | course_module_viewed.php |
The mod_assign course module viewed event. | |
file | cron_task.php |
A schedule task for assignment cron. | |
file | events.php |
Add event handlers for the assign. | |
file | extension_granted.php |
The mod_assign extension granted event. | |
file | extensionform.php |
This file contains the forms to create and edit an instance of this module. | |
file | externallib.php |
External assign API. | |
file | feedback_legacy_polyfill.php |
This file contains the polyfill to allow a plugin to operate with Moodle 3.3 up. | |
file | feedback_viewed.php |
The mod_assign feedback viewed event. | |
file | feedbackplugin.php |
This file contains the function for feedback_plugin abstract class. | |
file | generator.php |
Base class for unit tests for mod_assign. | |
file | gradeform.php |
This file contains the forms to create and edit an instance of this module. | |
file | gradeitems.php |
Grade item mappings for the activity. | |
file | grading_app.php |
Renderable that initialises the grading "app". | |
file | grading_form_viewed.php |
The mod_assign grading form viewed event. | |
file | grading_table_viewed.php |
The mod_assign grading table viewed event. | |
file | gradingbatchoperationsform.php |
This file contains the forms to create and edit an instance of this module. | |
file | gradingoptionsform.php |
This file contains the forms to create and edit an instance of this module. | |
file | gradingtable.php |
This file contains the definition for the grading table which subclassses easy_table. | |
file | group_observers.php |
Group observers. | |
file | group_override_created.php |
The mod_assign group override created event. | |
file | group_override_deleted.php |
The mod_assign group override deleted event. | |
file | group_override_updated.php |
The mod_assign group override updated event. | |
file | identities_revealed.php |
The mod_assign identities revealed event. | |
file | lib.php |
This file contains the moodle hooks for the assign module. | |
file | lib.php |
assign module data generator class | |
file | locallib.php |
This file contains the definition for the class assignment. | |
file | log.php |
Definition of log events. | |
file | marker_updated.php |
The mod_assign marker updated event. | |
file | mod_form.php |
This file contains the forms to create and edit an instance of this module. | |
file | override_form.php |
Settings form for overrides in the assign module. | |
file | provider.php |
Privacy class for requesting user data. | |
file | quickgradingform.php |
This file contains the forms to create and edit an instance of this module. | |
file | remove_submission_form_viewed.php |
The mod_assign remove submission form viewed event. | |
file | renderable.php |
This file contains the definition for the renderable classes for the assignment. | |
file | renderer.php |
This file contains a renderer for the assignment class. | |
file | restore_assign_activity_task.class.php |
Define all the backup steps that will be used by the backup_assign_activity_task. | |
file | restore_assign_stepslib.php |
Define all the restore steps that will be used by the restore_assign_activity_task. | |
file | reveal_identities_confirmation_page_viewed.php |
The mod_assign reveal identities confirmation page viewed event. | |
file | services.php |
Web service for mod assign. | |
file | settings.php |
This file adds the settings pages to the navigation menu. | |
file | social_breadth.php |
Social breadth indicator - assign. | |
file | statement_accepted.php |
The mod_assign statement accepted event. | |
file | submission_confirmation_form_viewed.php |
The mod_assign submission form viewed event. | |
file | submission_created.php |
The mod_assign submission_created abstract event. | |
file | submission_duplicated.php |
The mod_assign submission duplicated event. | |
file | submission_form.php |
This file contains the submission form used by the assign module. | |
file | submission_form_viewed.php |
The mod_assign submission form viewed event. | |
file | submission_graded.php |
The mod_assign submission graded event. | |
file | submission_legacy_polyfill.php |
This file contains the polyfill to allow a plugin to operate with Moodle 3.3 up. | |
file | submission_locked.php |
The mod_assign submission locked event. | |
file | submission_status_updated.php |
The mod_assign submission status updated event. | |
file | submission_status_viewed.php |
The mod_assign submission status viewed event. | |
file | submission_unlocked.php |
The mod_assign submission unlocked event. | |
file | submission_updated.php |
The mod_assign submission updated event. | |
file | submission_viewed.php |
The mod_assign submission viewed event. | |
file | submissionconfirmform.php |
This file contains the submission confirmation form. | |
file | submissionplugin.php |
This file contains the definition for the abstract class for submission_plugin. | |
file | tasks.php |
Definition of assignment scheduled tasks. | |
file | upgrade.php |
Upgrade code for install. | |
file | upgradelib.php |
This file contains the upgrade code to upgrade from mod_assignment to mod_assign. | |
file | user_override_created.php |
The mod_assign user override created event. | |
file | user_override_deleted.php |
The mod_assign user override deleted event. | |
file | user_override_updated.php |
The mod_assign user override updated event. | |
file | useridlist.php |
This file contains the mod_assign useridlist. | |
file | version.php |
Version information. | |
file | workflow_state_updated.php |
mod_assign workflow state updated event. | |
Namespaces | |
namespace | mod_assign |
| |
namespace | mod_assign\analytics\indicator |
| |
namespace | mod_assign\event |
| |
namespace | mod_assign\grades |
| |
namespace | mod_assign\output |
| |
namespace | mod_assign\plugininfo |
| |
namespace | mod_assign\privacy |
| |
namespace | mod_assign\search |
| |
namespace | mod_assign\task |
| |
Functions | |
assign_add_instance (stdClass $data, mod_assign_mod_form $form=null) | |
Adds an assignment instance. More... | |
assign_check_updates_since (cm_info $cm, $from, $filter=array()) | |
Check if the module has any update that affects the current user since a given time. More... | |
assign_delete_instance ($id) | |
delete an assignment instance More... | |
assign_extend_settings_navigation (settings_navigation $settings, navigation_node $navref) | |
extend an assigment navigation settings More... | |
assign_get_completion_state ($course, $cm, $userid, $type) | |
Obtains the automatic completion state for this module based on any conditions in assign settings. More... | |
assign_get_coursemodule_info ($coursemodule) | |
Add a get_coursemodule_info function in case any assignment type wants to add 'extra' information for the course (see resource). More... | |
assign_get_extra_capabilities () | |
Returns all other capabilities used by this module. More... | |
assign_get_file_areas ($course, $cm, $context) | |
List the file areas that can be browsed. More... | |
assign_get_file_info ($browser, $areas, $course, $cm, $context, $filearea, $itemid, $filepath, $filename) | |
File browsing support for assign module. More... | |
assign_get_grade_details_for_print_overview () | |
assign_get_mysubmission_details_for_print_overview () | |
assign_get_post_actions () | |
List the actions that correspond to a post of this module. More... | |
assign_get_recent_mod_activity (&$activities, &$index, $timestart, $courseid, $cmid, $userid=0, $groupid=0) | |
Returns all assignments since a given time. More... | |
assign_get_user_grades ($assign, $userid=0) | |
Return grade for given user or all users. More... | |
assign_get_view_actions () | |
List the actions that correspond to a view of this module. More... | |
assign_grade_item_update ($assign, $grades=null) | |
Create grade item for given assignment. More... | |
assign_page_type_list ($pagetype, $parentcontext, $currentcontext) | |
Return a list of page types. More... | |
assign_pluginfile ($course, $cm, context $context, $filearea, $args, $forcedownload, array $options=array()) | |
Serves intro attachment files. More... | |
assign_prepare_update_events ($assign, $course=null, $cm=null) | |
This actually updates the normal and completion calendar events. More... | |
assign_print_overview () | |
assign_print_recent_activity ($course, $viewfullnames, $timestart) | |
Print recent activity from all assignments in a given course. More... | |
assign_print_recent_mod_activity ($activity, $courseid, $detail, $modnames) | |
Print recent activity from all assignments in a given course. More... | |
assign_process_group_deleted_in_course ($courseid, $groupid=null) | |
Logic to happen when a/some group(s) has/have been deleted in a course. More... | |
assign_refresh_events ($courseid=0, $instance=null, $cm=null) | |
This standard function will check all instances of this module and make sure there are up-to-date events created for each of them. More... | |
assign_rescale_activity_grades ($course, $cm, $oldmin, $oldmax, $newmin, $newmax) | |
Rescale all grades for this activity and push the new grades to the gradebook. More... | |
assign_reset_course_form_defaults ($course) | |
Course reset form defaults. More... | |
assign_reset_course_form_definition (&$mform) | |
Implementation of the function for printing the form elements that control whether the course reset functionality affects the assignment. More... | |
assign_reset_gradebook ($courseid, $type='') | |
Removes all grades from gradebook. More... | |
assign_reset_userdata ($data) | |
This function is used by the reset_course_userdata function in moodlelib. More... | |
assign_scale_used () | |
assign_scale_used_anywhere ($scaleid) | |
Checks if scale is being used by any instance of assignment. More... | |
assign_supports ($feature) | |
Return the list if Moodle features this module supports. More... | |
assign_update_events ($assign, $override=null) | |
This function updates the events associated to the assign. More... | |
assign_update_grades ($assign, $userid=0, $nullifnone=true) | |
Update activity grades. More... | |
assign_update_instance (stdClass $data, $form) | |
Update an assignment instance. More... | |
assign_user_complete ($course, $user, $coursemodule, $assign) | |
Prints the complete info about a user's interaction with an assignment. More... | |
assign_user_outline ($course, $user, $coursemodule, $assignment) | |
Print the grade information for the assignment for this user. More... | |
mod_assign_core_calendar_event_action_shows_item_count (calendar_event $event, $itemcount=0) | |
Callback function that determines whether an action event should be showing its item count based on the event type and the item count. More... | |
mod_assign_core_calendar_event_timestart_updated (\calendar_event $event, stdClass $instance) | |
This function will update the assign module according to the event that has been modified. More... | |
mod_assign_core_calendar_get_valid_event_timestart_range (\calendar_event $event, stdClass $instance) | |
This function calculates the minimum and maximum cutoff values for the timestart of the given event. More... | |
mod_assign_core_calendar_is_event_visible (calendar_event $event, $userid=0) | |
Is the event visible? More... | |
mod_assign_core_calendar_provide_event_action (calendar_event $event, core_calendar\action_factory $factory, $userid=0) | |
This function receives a calendar event and returns the action associated with it, or null if there is none. More... | |
mod_assign_get_completion_active_rule_descriptions ($cm) | |
Callback which returns human-readable strings describing the active completion custom rules for the module instance. More... | |
mod_assign_get_path_from_pluginfile (string $filearea, array $args) | |
Given an array with a file path, it returns the itemid and the filepath for the defined filearea. More... | |
mod_assign_output_fragment_gradingpanel ($args) | |
Serve the grading panel as a fragment. More... | |
mod_assign_user_preferences () | |
Return a list of all the user preferences used by mod_assign. More... | |
move_group_override ($id, $move, $assignid) | |
Change the sort order of an override. More... | |
reorder_group_overrides ($assignid) | |
Reorder the overrides starting at the override at the given startorder. More... | |
xmldb_assign_upgrade ($oldversion) | |
upgrade this assignment instance - this function could be skipped but it will be needed later More... | |
Variables | |
$capabilities | |
global | mod_assign\event::$CFG |
global | $CFG |
$functions | |
$logs | |
$messageproviders | |
$observers | |
$plugin = 2020060900 | |
$settings = new admin_settingpage($section, get_string('settings', 'mod_assign'), 'moodle/site:config', $module->is_enabled() === false) | |
$tasks | |
const | ASSIGN_ATTEMPT_REOPEN_METHOD_MANUAL 'manual' |
const | ASSIGN_ATTEMPT_REOPEN_METHOD_NONE 'none' |
const | ASSIGN_ATTEMPT_REOPEN_METHOD_UNTILPASS 'untilpass' |
const | ASSIGN_EVENT_TYPE_CLOSE 'close' |
const | ASSIGN_EVENT_TYPE_DUE 'due' |
const | ASSIGN_EVENT_TYPE_GRADINGDUE 'gradingdue' |
const | ASSIGN_EVENT_TYPE_OPEN 'open' |
const | ASSIGN_FILTER_GRANTED_EXTENSION 'grantedextension' |
const | ASSIGN_FILTER_NONE 'none' |
const | ASSIGN_FILTER_NOT_SUBMITTED 'notsubmitted' |
const | ASSIGN_FILTER_REQUIRE_GRADING 'requiregrading' |
const | ASSIGN_FILTER_SINGLE_USER 'singleuser' |
const | ASSIGN_FILTER_SUBMITTED 'submitted' |
const | ASSIGN_GRADE_NOT_SET -1 |
const | ASSIGN_GRADING_STATUS_GRADED 'graded' |
const | ASSIGN_GRADING_STATUS_NOT_GRADED 'notgraded' |
const | ASSIGN_INTROATTACHMENT_FILEAREA 'introattachment' |
const | ASSIGN_MARKER_FILTER_NO_MARKER -1 |
const | ASSIGN_MARKING_WORKFLOW_STATE_INMARKING 'inmarking' |
const | ASSIGN_MARKING_WORKFLOW_STATE_INREVIEW 'inreview' |
const | ASSIGN_MARKING_WORKFLOW_STATE_NOTMARKED 'notmarked' |
const | ASSIGN_MARKING_WORKFLOW_STATE_READYFORRELEASE 'readyforrelease' |
const | ASSIGN_MARKING_WORKFLOW_STATE_READYFORREVIEW 'readyforreview' |
const | ASSIGN_MARKING_WORKFLOW_STATE_RELEASED 'released' |
const | ASSIGN_MAX_EVENT_LENGTH "432000" |
ASSIGN_MAX_EVENT_LENGTH = 432000 ; 5 days maximum. | |
const | ASSIGN_MAX_UPGRADE_TIME_SECS 300 |
const | ASSIGN_SUBMISSION_STATUS_DRAFT 'draft' |
const | ASSIGN_SUBMISSION_STATUS_NEW 'new' |
const | ASSIGN_SUBMISSION_STATUS_REOPENED 'reopened' |
const | ASSIGN_SUBMISSION_STATUS_SUBMITTED 'submitted' |
const | ASSIGN_UNLIMITED_ATTEMPTS -1 |
$plugin | component = 'mod_assign' |
$plugin | version = 2020061501 |
assign_add_instance | ( | stdClass | $data, |
mod_assign_mod_form | $form = null |
||
) |
Adds an assignment instance.
This is done by calling the add_instance() method of the assignment type class
stdClass | $data | |
mod_assign_mod_form | $form |
int | The instance id of the new assignment |
assign_check_updates_since | ( | cm_info | $cm, |
$from, | |||
$filter = array() |
|||
) |
Check if the module has any update that affects the current user since a given time.
cm_info | $cm | course module data |
int | $from | the time to check updates from |
array | $filter | if we need to check only specific updates |
stdClass | an object with the different type of areas indicating if they were updated or not |
assign_delete_instance | ( | $id | ) |
delete an assignment instance
int | $id |
bool |
assign_extend_settings_navigation | ( | settings_navigation | $settings, |
navigation_node | $navref | ||
) |
extend an assigment navigation settings
settings_navigation | $settings | |
navigation_node | $navref |
void |
assign_get_completion_state | ( | $course, | |
$cm, | |||
$userid, | |||
$type | |||
) |
Obtains the automatic completion state for this module based on any conditions in assign settings.
object | $course | Course |
object | $cm | Course-module |
int | $userid | User ID |
bool | $type | Type of comparison (or/and; can be used as return value if no conditions) |
bool | True if completed, false if not, $type if conditions not set. |
assign_get_coursemodule_info | ( | $coursemodule | ) |
Add a get_coursemodule_info function in case any assignment type wants to add 'extra' information for the course (see resource).
Given a course_module object, this function returns any "extra" information that may be needed when printing this activity in a course listing. See get_array_of_activities() in course/lib.php.
stdClass | $coursemodule | The coursemodule object (record). |
cached_cm_info | An object on information that the courses will know about (most noticeably, an icon). |
assign_get_extra_capabilities | ( | ) |
Returns all other capabilities used by this module.
array | Array of capability strings |
assign_get_file_areas | ( | $course, | |
$cm, | |||
$context | |||
) |
List the file areas that can be browsed.
stdClass | $course | |
stdClass | $cm | |
stdClass | $context |
array |
assign_get_file_info | ( | $browser, | |
$areas, | |||
$course, | |||
$cm, | |||
$context, | |||
$filearea, | |||
$itemid, | |||
$filepath, | |||
$filename | |||
) |
File browsing support for assign module.
file_browser | $browser | |
object | $areas | |
object | $course | |
object | $cm | |
object | $context | |
string | $filearea | |
int | $itemid | |
string | $filepath | |
string | $filename |
object | file_info instance or null if not found |
assign_get_grade_details_for_print_overview | ( | ) |
assign_get_mysubmission_details_for_print_overview | ( | ) |
assign_get_post_actions | ( | ) |
List the actions that correspond to a post of this module.
This is used by the participation report.
Note: This is not used by new logging system. Event with crud = ('c' || 'u' || 'd') and edulevel = LEVEL_PARTICIPATING will be considered as post action.
array |
assign_get_recent_mod_activity | ( | & | $activities, |
& | $index, | ||
$timestart, | |||
$courseid, | |||
$cmid, | |||
$userid = 0 , |
|||
$groupid = 0 |
|||
) |
Returns all assignments since a given time.
array | $activities | The activity information is returned in this array |
int | $index | The current index in the activities array |
int | $timestart | The earliest activity to show |
int | $courseid | Limit the search to this course |
int | $cmid | The course module id |
int | $userid | Optional user id |
int | $groupid | Optional group id |
void |
assign_get_user_grades | ( | $assign, | |
$userid = 0 |
|||
) |
Return grade for given user or all users.
stdClass | $assign | record of assign with an additional cmidnumber |
int | $userid | optional user id, 0 means all users |
array | array of grades, false if none |
assign_get_view_actions | ( | ) |
List the actions that correspond to a view of this module.
This is used by the participation report.
Note: This is not used by new logging system. Event with crud = 'r' and edulevel = LEVEL_PARTICIPATING will be considered as view action.
array |
assign_grade_item_update | ( | $assign, | |
$grades = null |
|||
) |
Create grade item for given assignment.
stdClass | $assign | record with extra cmidnumber |
array | $grades | optional array/object of grade(s); 'reset' means reset grades in gradebook |
int | 0 if ok, error code otherwise |
assign_page_type_list | ( | $pagetype, | |
$parentcontext, | |||
$currentcontext | |||
) |
Return a list of page types.
string | $pagetype | current page type |
stdClass | $parentcontext | Block's parent context |
stdClass | $currentcontext | Current context of block |
assign_pluginfile | ( | $course, | |
$cm, | |||
context | $context, | ||
$filearea, | |||
$args, | |||
$forcedownload, | |||
array | $options = array() |
||
) |
Serves intro attachment files.
mixed | $course | course or id of the course |
mixed | $cm | course module or id of the course module |
context | $context | |
string | $filearea | |
array | $args | |
bool | $forcedownload | |
array | $options | additional options affecting the file serving |
bool | false if file not found, does not return if found - just send the file |
assign_prepare_update_events | ( | $assign, | |
$course = null , |
|||
$cm = null |
|||
) |
This actually updates the normal and completion calendar events.
stdClass | $assign | Assignment object (from DB). |
stdClass | $course | Course object. |
stdClass | $cm | Course module object. |
assign_print_overview | ( | ) |
assign_print_recent_activity | ( | $course, | |
$viewfullnames, | |||
$timestart | |||
) |
Print recent activity from all assignments in a given course.
This is used by the recent activity block
mixed | $course | the course to print activity for |
bool | $viewfullnames | boolean to determine whether to show full names or not |
int | $timestart | the time the rendering started |
bool | true if activity was printed, false otherwise. |
assign_print_recent_mod_activity | ( | $activity, | |
$courseid, | |||
$detail, | |||
$modnames | |||
) |
Print recent activity from all assignments in a given course.
This is used by course/recent.php
stdClass | $activity | |
int | $courseid | |
bool | $detail | |
array | $modnames |
assign_process_group_deleted_in_course | ( | $courseid, | |
$groupid = null |
|||
) |
Logic to happen when a/some group(s) has/have been deleted in a course.
int | $courseid | The course ID. |
int | $groupid | The group id if it is known |
void |
assign_refresh_events | ( | $courseid = 0 , |
|
$instance = null , |
|||
$cm = null |
|||
) |
This standard function will check all instances of this module and make sure there are up-to-date events created for each of them.
If courseid = 0, then every assignment event in the site is checked, else only assignment events belonging to the course specified are checked.
int | $courseid | |
int | stdClass | $instance | Assign module instance or ID. |
int | stdClass | $cm | Course module object or ID (not used in this module). |
bool |
assign_rescale_activity_grades | ( | $course, | |
$cm, | |||
$oldmin, | |||
$oldmax, | |||
$newmin, | |||
$newmax | |||
) |
Rescale all grades for this activity and push the new grades to the gradebook.
stdClass | $course | Course db record |
stdClass | $cm | Course module db record |
float | $oldmin | |
float | $oldmax | |
float | $newmin | |
float | $newmax |
assign_reset_course_form_defaults | ( | $course | ) |
Course reset form defaults.
object | $course |
array |
assign_reset_course_form_definition | ( | & | $mform | ) |
Implementation of the function for printing the form elements that control whether the course reset functionality affects the assignment.
moodleform | $mform | form passed by reference |
assign_reset_gradebook | ( | $courseid, | |
$type = '' |
|||
) |
Removes all grades from gradebook.
int | $courseid | The ID of the course to reset |
string | $type | Optional type of assignment to limit the reset to a particular assignment type |
assign_reset_userdata | ( | $data | ) |
This function is used by the reset_course_userdata function in moodlelib.
This function will remove all assignment submissions and feedbacks in the database and clean up any related data.
stdClass | $data | the data submitted from the reset course. |
array |
assign_scale_used | ( | ) |
assign_scale_used_anywhere | ( | $scaleid | ) |
Checks if scale is being used by any instance of assignment.
This is used to find out if scale used anywhere
int | $scaleid |
boolean | True if the scale is used by any assignment |
assign_supports | ( | $feature | ) |
Return the list if Moodle features this module supports.
string | $feature | FEATURE_xx constant for requested feature |
mixed | True if module supports feature, null if doesn't know |
assign_update_events | ( | $assign, | |
$override = null |
|||
) |
This function updates the events associated to the assign.
If $override is non-zero, then it updates only the events associated with the specified override.
assign | $assign | the assign object. |
object | $override | (optional) limit to a specific override |
assign_update_grades | ( | $assign, | |
$userid = 0 , |
|||
$nullifnone = true |
|||
) |
Update activity grades.
stdClass | $assign | database record |
int | $userid | specific user only, 0 means all |
bool | $nullifnone | - not used |
assign_update_instance | ( | stdClass | $data, |
$form | |||
) |
Update an assignment instance.
This is done by calling the update_instance() method of the assignment type class
stdClass | $data | |
stdClass | $form | - unused |
object |
assign_user_complete | ( | $course, | |
$user, | |||
$coursemodule, | |||
$assign | |||
) |
Prints the complete info about a user's interaction with an assignment.
stdClass | $course | |
stdClass | $user | |
stdClass | $coursemodule | |
stdClass | $assign | the database assign record |
This prints the submission summary and feedback summary for this student.
assign_user_outline | ( | $course, | |
$user, | |||
$coursemodule, | |||
$assignment | |||
) |
Print the grade information for the assignment for this user.
stdClass | $course | |
stdClass | $user | |
stdClass | $coursemodule | |
stdClass | $assignment |
mod_assign_core_calendar_event_action_shows_item_count | ( | calendar_event | $event, |
$itemcount = 0 |
|||
) |
Callback function that determines whether an action event should be showing its item count based on the event type and the item count.
calendar_event | $event | The calendar event. |
int | $itemcount | The item count associated with the action event. |
bool |
mod_assign_core_calendar_event_timestart_updated | ( | \calendar_event | $event, |
stdClass | $instance | ||
) |
This function will update the assign module according to the event that has been modified.
moodle_exception |
calendar_event | $event | |
stdClass | $instance | The module instance to get the range from |
mod_assign_core_calendar_get_valid_event_timestart_range | ( | \calendar_event | $event, |
stdClass | $instance | ||
) |
This function calculates the minimum and maximum cutoff values for the timestart of the given event.
It will return an array with two values, the first being the minimum cutoff value and the second being the maximum cutoff value. Either or both values can be null, which indicates there is no minimum or maximum, respectively.
If a cutoff is required then the function must return an array containing the cutoff timestamp and error string to display to the user if the cutoff value is violated.
A minimum and maximum cutoff return value will look like: [ [1505704373, 'The due date must be after the sbumission start date'], [1506741172, 'The due date must be before the cutoff date'] ]
If the event does not have a valid timestart range then [false, false] will be returned.
calendar_event | $event | The calendar event to get the time range for |
stdClass | $instance | The module instance to get the range from |
array |
mod_assign_core_calendar_is_event_visible | ( | calendar_event | $event, |
$userid = 0 |
|||
) |
Is the event visible?
This is used to determine global visibility of an event in all places throughout Moodle. For example, the ASSIGN_EVENT_TYPE_GRADINGDUE event will not be shown to students on their calendar.
calendar_event | $event | |
int | $userid | User id to use for all capability checks, etc. Set to 0 for current user (default). |
bool | Returns true if the event is visible to the current user, false otherwise. |
mod_assign_core_calendar_provide_event_action | ( | calendar_event | $event, |
core_calendar\action_factory | $factory, | ||
$userid = 0 |
|||
) |
This function receives a calendar event and returns the action associated with it, or null if there is none.
This is used by block_myoverview in order to display the event appropriately. If null is returned then the event is not displayed on the block.
calendar_event | $event | |
core_calendar::action_factory | $factory | |
int | $userid | User id to use for all capability checks, etc. Set to 0 for current user (default). |
core_calendar::local::event::entities::action_interface|null |
mod_assign_get_completion_active_rule_descriptions | ( | $cm | ) |
Callback which returns human-readable strings describing the active completion custom rules for the module instance.
cm_info | stdClass | $cm | object with fields ->completion and ->customdata['customcompletionrules'] |
array::$descriptions | the array of descriptions for the custom rules. |
mod_assign_get_path_from_pluginfile | ( | string | $filearea, |
array | $args | ||
) |
Given an array with a file path, it returns the itemid and the filepath for the defined filearea.
string | $filearea | The filearea. |
array | $args | The path (the part after the filearea and before the filename). |
array | The itemid and the filepath inside the $args path, for the defined filearea. |
mod_assign_output_fragment_gradingpanel | ( | $args | ) |
Serve the grading panel as a fragment.
array | $args | List of named arguments for the fragment loader. |
string |
mod_assign_user_preferences | ( | ) |
Return a list of all the user preferences used by mod_assign.
array |
move_group_override | ( | $id, | |
$move, | |||
$assignid | |||
) |
Change the sort order of an override.
int | $id | of the override |
string | $move | direction of move |
int | $assignid | of the assignment |
bool | success of operation |
reorder_group_overrides | ( | $assignid | ) |
Reorder the overrides starting at the override at the given startorder.
int | $assignid | of the assigment |
xmldb_assign_upgrade | ( | $oldversion | ) |
upgrade this assignment instance - this function could be skipped but it will be needed later
int | $oldversion | The old version of the assign module |
bool |
$logs |
$messageproviders |
$observers |
$tasks |