[ Index ] |
PHP Cross Reference of Unnamed Project |
[Source view] [Print] [Project Stats]
This file contains the moodle hooks for the assign module. It delegates most functions to the assignment class.
Copyright: | 2012 NetSpot {@link http://www.netspot.com.au} |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 1513 lines (53 kb) |
Included or required: | 0 times |
Referenced: | 2 times |
Includes or requires: | 0 files |
assign_add_instance(stdClass $data, mod_assign_mod_form $form = null) X-Ref |
Adds an assignment instance This is done by calling the add_instance() method of the assignment type class param: stdClass $data param: mod_assign_mod_form $form return: int The instance id of the new assignment |
assign_delete_instance($id) X-Ref |
delete an assignment instance param: int $id return: bool |
assign_reset_userdata($data) X-Ref |
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. param: stdClass $data the data submitted from the reset course. return: array |
assign_refresh_events($courseid = 0) X-Ref |
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. param: int $courseid return: bool |
assign_reset_gradebook($courseid, $type='') X-Ref |
Removes all grades from gradebook param: int $courseid The ID of the course to reset param: string $type Optional type of assignment to limit the reset to a particular assignment type |
assign_reset_course_form_definition(&$mform) X-Ref |
Implementation of the function for printing the form elements that control whether the course reset functionality affects the assignment. param: moodleform $mform form passed by reference |
assign_reset_course_form_defaults($course) X-Ref |
Course reset form defaults. param: object $course return: array |
assign_update_instance(stdClass $data, $form) X-Ref |
Update an assignment instance This is done by calling the update_instance() method of the assignment type class param: stdClass $data param: stdClass $form - unused return: object |
assign_supports($feature) X-Ref |
Return the list if Moodle features this module supports param: string $feature FEATURE_xx constant for requested feature return: mixed True if module supports feature, null if doesn't know |
assign_grading_areas_list() X-Ref |
Lists all gradable areas for the advanced grading methods gramework return: array('string'=>'string') An array with area names as keys and descriptions as values |
assign_extend_settings_navigation(settings_navigation $settings, navigation_node $navref) X-Ref |
extend an assigment navigation settings param: settings_navigation $settings param: navigation_node $navref return: void |
assign_get_coursemodule_info($coursemodule) X-Ref |
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. param: stdClass $coursemodule The coursemodule object (record). return: cached_cm_info An object on information that the courses |
assign_page_type_list($pagetype, $parentcontext, $currentcontext) X-Ref |
Return a list of page types param: string $pagetype current page type param: stdClass $parentcontext Block's parent context param: stdClass $currentcontext Current context of block |
assign_print_overview($courses, &$htmlarray) X-Ref |
Print an overview of all assignments for the courses. param: mixed $courses The list of courses to print the overview for param: array $htmlarray The array of html to return return: true |
assign_get_mysubmission_details_for_print_overview(&$mysubmissions, $sqlassignmentids, $assignmentidparams,$assignment) X-Ref |
This api generates html to be displayed to students in print overview section, related to their submission status of the given assignment. param: array $mysubmissions list of submissions of current user indexed by assignment id. param: string $sqlassignmentids sql clause used to filter open assignments. param: array $assignmentidparams sql params used to filter open assignments. param: stdClass $assignment current assignment return: bool|string html to display , false if nothing needs to be displayed. |
assign_get_grade_details_for_print_overview(&$unmarkedsubmissions, $sqlassignmentids, $assignmentidparams,$assignment, $context) X-Ref |
This api generates html to be displayed to teachers in print overview section, related to the grading status of the given assignment's submissions. param: array $unmarkedsubmissions list of submissions of that are currently unmarked indexed by assignment id. param: string $sqlassignmentids sql clause used to filter open assignments. param: array $assignmentidparams sql params used to filter open assignments. param: stdClass $assignment current assignment param: context $context context of the assignment. return: bool|string html to display , false if nothing needs to be displayed. |
assign_print_recent_activity($course, $viewfullnames, $timestart) X-Ref |
Print recent activity from all assignments in a given course This is used by the recent activity block param: mixed $course the course to print activity for param: bool $viewfullnames boolean to determine whether to show full names or not param: int $timestart the time the rendering started return: bool true if activity was printed, false otherwise. |
assign_get_recent_mod_activity(&$activities,&$index,$timestart,$courseid,$cmid,$userid=0,$groupid=0) X-Ref |
Returns all assignments since a given time. param: array $activities The activity information is returned in this array param: int $index The current index in the activities array param: int $timestart The earliest activity to show param: int $courseid Limit the search to this course param: int $cmid The course module id param: int $userid Optional user id param: int $groupid Optional group id return: void |
assign_print_recent_mod_activity($activity, $courseid, $detail, $modnames) X-Ref |
Print recent activity from all assignments in a given course This is used by course/recent.php param: stdClass $activity param: int $courseid param: bool $detail param: array $modnames |
assign_scale_used($assignmentid, $scaleid) X-Ref |
Checks if a scale is being used by an assignment. This is used by the backup code to decide whether to back up a scale param: int $assignmentid param: int $scaleid return: boolean True if the scale is used by the assignment |
assign_scale_used_anywhere($scaleid) X-Ref |
Checks if scale is being used by any instance of assignment This is used to find out if scale used anywhere param: int $scaleid return: boolean True if the scale is used by any assignment |
assign_get_view_actions() X-Ref |
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. return: array |
assign_get_post_actions() X-Ref |
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. return: array |
assign_cron() X-Ref |
Call cron on the assign module. |
assign_get_extra_capabilities() X-Ref |
Returns all other capabilities used by this module. return: array Array of capability strings |
assign_grade_item_update($assign, $grades=null) X-Ref |
Create grade item for given assignment. param: stdClass $assign record with extra cmidnumber param: array $grades optional array/object of grade(s); 'reset' means reset grades in gradebook return: int 0 if ok, error code otherwise |
assign_get_user_grades($assign, $userid=0) X-Ref |
Return grade for given user or all users. param: stdClass $assign record of assign with an additional cmidnumber param: int $userid optional user id, 0 means all users return: array array of grades, false if none |
assign_update_grades($assign, $userid=0, $nullifnone=true) X-Ref |
Update activity grades. param: stdClass $assign database record param: int $userid specific user only, 0 means all param: bool $nullifnone - not used |
assign_get_file_areas($course, $cm, $context) X-Ref |
List the file areas that can be browsed. param: stdClass $course param: stdClass $cm param: stdClass $context return: array |
assign_get_file_info($browser,$areas,$course,$cm,$context,$filearea,$itemid,$filepath,$filename) X-Ref |
File browsing support for assign module. param: file_browser $browser param: object $areas param: object $course param: object $cm param: object $context param: string $filearea param: int $itemid param: string $filepath param: string $filename return: object file_info instance or null if not found |
assign_user_complete($course, $user, $coursemodule, $assign) X-Ref |
Prints the complete info about a user's interaction with an assignment. param: stdClass $course param: stdClass $user param: stdClass $coursemodule param: stdClass $assign the database assign record |
assign_rescale_activity_grades($course, $cm, $oldmin, $oldmax, $newmin, $newmax) X-Ref |
Rescale all grades for this activity and push the new grades to the gradebook. param: stdClass $course Course db record param: stdClass $cm Course module db record param: float $oldmin param: float $oldmax param: float $newmin param: float $newmax |
assign_user_outline($course, $user, $coursemodule, $assignment) X-Ref |
Print the grade information for the assignment for this user. param: stdClass $course param: stdClass $user param: stdClass $coursemodule param: stdClass $assignment |
assign_get_completion_state($course, $cm, $userid, $type) X-Ref |
Obtains the automatic completion state for this module based on any conditions in assign settings. param: object $course Course param: object $cm Course-module param: int $userid User ID param: bool $type Type of comparison (or/and; can be used as return value if no conditions) return: bool True if completed, false if not, $type if conditions not set. |
assign_pluginfile($course,$cm,context $context,$filearea,$args,$forcedownload,array $options=array() X-Ref |
Serves intro attachment files. param: mixed $course course or id of the course param: mixed $cm course module or id of the course module param: context $context param: string $filearea param: array $args param: bool $forcedownload param: array $options additional options affecting the file serving return: bool false if file not found, does not return if found - just send the file |
mod_assign_output_fragment_gradingpanel($args) X-Ref |
Serve the grading panel as a fragment. param: array $args List of named arguments for the fragment loader. return: string |
Generated: Thu Aug 11 10:00:09 2016 | Cross-referenced by PHPXref 0.7.1 |