Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
|
Namespaces | |
namespace | mod_assign |
| |
namespace | mod_assign\analytics\indicator |
| |
namespace | mod_assign\cache |
| |
namespace | mod_assign\completion |
| |
namespace | mod_assign\event |
| |
namespace | mod_assign\external |
| |
namespace | mod_assign\grades |
| |
namespace | mod_assign\navigation\views |
| |
namespace | mod_assign\output |
| |
namespace | mod_assign\plugininfo |
| |
namespace | mod_assign\privacy |
| |
namespace | mod_assign\search |
| |
namespace | mod_assign\task |
| |
Classes | |
class | assign |
Standard base class for mod_assign (assignment types). More... | |
class | assign_admin_page_manage_assign_plugins |
Admin external page that displays a list of the installed submission plugins. More... | |
class | assign_attempt_history |
Used to output the attempt history for a particular assignment. More... | |
class | assign_attempt_history_chooser |
Used to output the attempt history chooser for a particular assignment. More... | |
class | assign_course_index_summary |
Renderable course index summary. More... | |
class | assign_feedback_plugin |
Abstract class for feedback_plugin inherited from assign_plugin abstract class. More... | |
class | assign_feedback_plugin_feedback |
Implements a renderable feedback plugin feedback. More... | |
class | assign_feedback_status |
Renderable feedback status. More... | |
class | assign_files |
An assign file class that extends rendererable class and is used by the assign module. More... | |
class | assign_form |
Implements a renderable grading options form. More... | |
class | assign_grading_summary |
Renderable grading summary. More... | |
class | assign_grading_table |
Extends table_sql to provide a table of assignment submissions. More... | |
class | assign_gradingmessage |
Implements a renderable message notification. More... | |
class | assign_override_form |
Form for editing settings overrides. More... | |
class | assign_plugin |
Abstract class for assign_plugin (submission/feedback). More... | |
class | assign_plugin_header |
Renderable header related to an individual subplugin. More... | |
class | assign_plugin_manager |
Class that handles the display and configuration of the list of submission plugins. More... | |
class | assign_portfolio_caller |
Portfolio caller class for mod_assign. More... | |
class | assign_submission_plugin |
Abstract base class for submission plugin types. More... | |
class | assign_submission_plugin_submission |
Implements a renderable submission plugin submission. More... | |
class | assign_submission_status_compact |
Renderable submission status. More... | |
class | assign_submit_for_grading_page |
This class wraps the submit for grading confirmation page. More... | |
class | assign_user_summary |
Implements a renderable user summary. More... | |
class | assignsubmission_subplugin_generator |
class | backup_assign_activity_structure_step |
Define the complete choice structure for backup, with file and id annotations. More... | |
class | backup_assign_activity_task |
assign backup task that provides all the settings and steps to perform one complete backup of the activity More... | |
class | behat_mod_assign |
Behat custom steps and configuration for mod_assign. More... | |
class | behat_mod_assign_generator |
class | mod_assign\analytics\indicator\activity_base |
Activity base class. More... | |
class | mod_assign\analytics\indicator\cognitive_depth |
Cognitive depth indicator - assign. More... | |
class | mod_assign\analytics\indicator\social_breadth |
Social breadth indicator - assign. More... | |
class | mod_assign\cache\overrides |
Class assign_overrides. More... | |
class | mod_assign\completion\custom_completion |
class | mod_assign\dates |
Class for fetching the important dates in mod_assign for a given module instance and a user. More... | |
class | mod_assign\downloader |
class | mod_assign\event\all_submissions_downloaded |
The mod_assign all submissions downloaded event class. More... | |
class | mod_assign\event\base |
The mod_assign abstract base event class. More... | |
class | mod_assign\event\course_module_instance_list_viewed |
The mod_assign instance list viewed event class. More... | |
class | mod_assign\event\course_module_viewed |
The mod_assign course module viewed event class. More... | |
class | mod_assign\event\feedback_viewed |
class | mod_assign\event\grading_form_viewed |
class | mod_assign\event\group_override_created |
class | mod_assign\event\group_override_deleted |
class | mod_assign\event\group_override_updated |
class | mod_assign\event\identities_revealed |
The mod_assign identities revealed event class. More... | |
class | mod_assign\event\marker_updated |
class | mod_assign\event\remove_submission_form_viewed |
The mod_assign remove submission form viewed event class. More... | |
class | mod_assign\event\statement_accepted |
The mod_assign statement accepted event class. More... | |
class | mod_assign\event\submission_duplicated |
The mod_assign submission duplicated event class. More... | |
class | mod_assign\event\submission_form_viewed |
class | mod_assign\event\submission_viewed |
class | mod_assign\event\user_override_created |
class | mod_assign\event\user_override_deleted |
class | mod_assign\event\user_override_updated |
class | mod_assign\event\workflow_state_updated |
class | mod_assign\external\external_api |
class | mod_assign\external\start_submission |
class | mod_assign\externallib_advanced_testcase |
class | mod_assign\grades\gradeitems |
Grade item mappings for the activity. More... | |
class | mod_assign\group_observers |
Group observers class. More... | |
class | mod_assign\navigation\views\secondary |
class | mod_assign\output\actionmenu |
Output the actionbar for this activity. More... | |
class | mod_assign\output\assign_header |
This file contains the definition for the renderable assign header. More... | |
class | mod_assign\output\assign_submission_status |
This file contains the definition for the renderable assign submission status. More... | |
class | mod_assign\output\grading_actionmenu |
Output the grading actionbar for this activity. More... | |
class | mod_assign\output\grading_app |
Grading app renderable. More... | |
class | mod_assign\output\override_actionmenu |
Output the override actionbar for this activity. More... | |
class | mod_assign\output\renderer |
A custom renderer class that extends the plugin_renderer_base and is used by the assign module. More... | |
class | mod_assign\output\timelimit_panel |
Represents the timer panel. More... | |
class | mod_assign\output\user_submission_actionmenu |
Output the user submission actionbar for this activity. More... | |
class | mod_assign\plugininfo\assignfeedback |
class | mod_assign\plugininfo\assignsubmission |
class | mod_assign\privacy\assign_plugin_request_data |
An object for fulfilling an assign plugin data request. More... | |
interface | mod_assign\privacy\assignfeedback_provider |
interface | mod_assign\privacy\assignfeedback_user_provider |
interface | mod_assign\privacy\assignsubmission_provider |
interface | mod_assign\privacy\assignsubmission_user_provider |
class | mod_assign\privacy\provider |
Privacy class for requesting user data. More... | |
class | mod_assign\privacy\useridlist |
An object for collecting user IDs related to a teacher. More... | |
class | mod_assign\search\activity |
Search area for mod_assign activities. More... | |
class | mod_assign\task\cron_task |
class | mod_assign_batch_set_allocatedmarker_form |
Set allocated marker form. More... | |
class | mod_assign_batch_set_marking_workflow_state_form |
Set marking workflow form. More... | |
class | mod_assign_confirm_submission_form |
Assignment submission confirmation form. More... | |
class | mod_assign_extension_form |
Assignment extension dates form. More... | |
class | mod_assign_generator |
class | mod_assign_grade_form |
Assignment grade form. More... | |
class | mod_assign_grading_batch_operations_form |
Assignment grading options form. More... | |
class | mod_assign_grading_options_form |
Assignment grading options form. More... | |
class | mod_assign_mod_form |
Assignment settings form. More... | |
class | mod_assign_quick_grading_form |
Assignment quick grading form. More... | |
class | mod_assign_submission_form |
Assign submission form. More... | |
class | restore_assign_activity_structure_step |
Define the complete assignment structure for restore, with file and id annotations. More... | |
class | restore_assign_activity_task |
assign restore task that provides all the settings and steps to perform one complete restore of the activity More... | |
Functions | |
assign_add_instance (stdClass $data, mod_assign_mod_form $form=null) | |
Adds an assignment instance. | |
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. | |
assign_delete_instance ($id) | |
delete an assignment instance | |
assign_extend_settings_navigation (settings_navigation $settings, navigation_node $navref) | |
extend an assigment navigation settings | |
assign_get_completion_state ($course, $cm, $userid, $type) | |
Obtains the automatic completion state for this module based on any conditions in assign settings. | |
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). | |
assign_get_extra_capabilities () | |
Returns all other capabilities used by this module. | |
assign_get_file_areas ($course, $cm, $context) | |
List the file areas that can be browsed. | |
assign_get_file_info ($browser, $areas, $course, $cm, $context, $filearea, $itemid, $filepath, $filename) | |
File browsing support for assign module. | |
assign_get_grade_details_for_print_overview () | |
assign_get_js_module () | |
Get the information about the standard assign JavaScript module. | |
assign_get_mysubmission_details_for_print_overview () | |
assign_get_post_actions () | |
List the actions that correspond to a post of this module. | |
assign_get_recent_mod_activity (&$activities, &$index, $timestart, $courseid, $cmid, $userid=0, $groupid=0) | |
Returns all assignments since a given time. | |
assign_get_user_grades ($assign, $userid=0) | |
Return grade for given user or all users. | |
assign_get_view_actions () | |
List the actions that correspond to a view of this module. | |
assign_grade_item_update ($assign, $grades=null) | |
Create grade item for given assignment. | |
assign_page_type_list ($pagetype, $parentcontext, $currentcontext) | |
Return a list of page types. | |
assign_pluginfile ($course, $cm, context $context, $filearea, $args, $forcedownload, array $options=array()) | |
Serves intro attachment files. | |
assign_prepare_update_events ($assign, $course=null, $cm=null) | |
This actually updates the normal and completion calendar events. | |
assign_print_overview () | |
assign_print_recent_activity ($course, $viewfullnames, $timestart) | |
Print recent activity from all assignments in a given course. | |
assign_print_recent_mod_activity ($activity, $courseid, $detail, $modnames) | |
Print recent activity from all assignments in a given course. | |
assign_process_group_deleted_in_course ($courseid, $groupid=null) | |
Logic to happen when a/some group(s) has/have been deleted in a course. | |
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. | |
assign_rescale_activity_grades ($course, $cm, $oldmin, $oldmax, $newmin, $newmax) | |
Rescale all grades for this activity and push the new grades to the gradebook. | |
assign_reset_course_form_defaults ($course) | |
Course reset form defaults. | |
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. | |
assign_reset_gradebook ($courseid, $type='') | |
Removes all grades from gradebook. | |
assign_reset_userdata ($data) | |
This function is used by the reset_course_userdata function in moodlelib. | |
assign_scale_used () | |
assign_scale_used_anywhere ($scaleid) | |
Checks if scale is being used by any instance of assignment. | |
assign_supports ($feature) | |
Return the list if Moodle features this module supports. | |
assign_update_events ($assign, $override=null) | |
This function updates the events associated to the assign. | |
assign_update_grades ($assign, $userid=0, $nullifnone=true) | |
Update activity grades. | |
assign_update_instance (stdClass $data, $form) | |
Update an assignment instance. | |
assign_user_complete ($course, $user, $coursemodule, $assign) | |
Prints the complete info about a user's interaction with an assignment. | |
assign_user_outline ($course, $user, $coursemodule, $assignment) | |
Print the grade information for the assignment for this user. | |
mod_assign_cm_info_dynamic (cm_info $cm) | |
Sets dynamic information about a course module. | |
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. | |
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. | |
mod_assign_core_calendar_get_event_action_string (string $eventtype) | |
Callback to fetch the activity event type lang string. | |
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. | |
mod_assign_core_calendar_is_event_visible (calendar_event $event, $userid=0) | |
Is the event visible? | |
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. | |
mod_assign_get_completion_active_rule_descriptions ($cm) | |
Callback which returns human-readable strings describing the active completion custom rules for the module instance. | |
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. | |
mod_assign_output_fragment_gradingpanel ($args) | |
Serve the grading panel as a fragment. | |
mod_assign_user_preferences () | |
Return a list of all the user preferences used by mod_assign. | |
move_group_override ($id, $move, $assignid) | |
Change the sort order of an override. | |
reorder_group_overrides ($assignid) | |
Reorder the overrides starting at the override at the given startorder. | |
xmldb_assign_upgrade ($oldversion) | |
upgrade this assignment instance - this function could be skipped but it will be needed later | |
Variables | |
$capabilities | |
global | $CFG |
global | mod_assign::$CFG |
global | mod_assign\event::$CFG |
global | mod_assign\external::$CFG |
$definitions | |
$functions | |
$logs | |
$messageproviders | |
$observers | |
$plugin = 2023041800 | |
$renamedclasses | |
$settings = new admin_settingpage($section, get_string('settings', 'mod_assign'), 'moodle/site:config', $module->is_enabled() === false) | |
$tasks | |
const | ASSIGN_ACTIVITYATTACHMENT_FILEAREA 'activityattachment' |
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_DRAFT 'draft' |
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_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 = 2023042400 |
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_js_module | ( | ) |
Get the information about the standard assign JavaScript module.
array | a standard jsmodule structure. |
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.
MoodleQuickForm | $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, false if not, null if doesn't know or string for the module purpose. |
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_cm_info_dynamic | ( | cm_info | $cm | ) |
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_event_action_string | ( | string | $eventtype | ) |
Callback to fetch the activity event type lang string.
string | $eventtype | The event type. |
lang_string | The event type lang string. |
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.
@uses core_user\is_current_user
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 |
$definitions |
$logs |
$messageproviders |
$observers |
$renamedclasses |
$tasks |