Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
Functions
lib.php File Reference

This file contains the moodle hooks for the assign module. More...

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_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...
 

Detailed Description

This file contains the moodle hooks for the assign module.

It delegates most functions to the assignment class.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later