DEFAULT_PAGE_SIZE
DEFAULT_PAGE_SIZE
mod_ejsappbooking |
backup_ejsappbooking_activity_structure_step | Define the complete EJSApp-Booking structure for backup |
backup_ejsappbooking_activity_task | EJSAppBooking backup task that provides all the settings and steps to perform one complete backup of the activity |
mod_ejsappbooking_mod_form | Module instance settings form |
restore_ejsappbooking_activity_structure_step | Structure step to restore one EJSAppBooking activity |
restore_ejsappbooking_activity_task | ejsappbooking restore task that provides all the settings and steps to perform one complete restore of the activity |
ejsappbooking_add_instance(object $ejsappbooking) : integer
Saves a new instance of the ejsappbooking into the database
Given an object containing all the necessary data, (defined by the form in mod_form.php) this function will create a new instance and return the id number of the new instance.
object | $ejsappbooking | An object from the form in mod_form.php |
The id of the newly inserted ejsappbooking record
ejsappbooking_cron() : boolean
Function to be run periodically according to the moodle cron This function checks whether all users and all ejsapps are in the ejsappbooking_usersaccess database. If not, it adds them. It is necessary when a ejsappbooking instance has already been added to a course and then new ejsapp are added or new users are enrolled to that course. Also, the function checks if there are users and ejsapps in the ejsappbooking_usersaccess database that no longer exist. In that case, it deletes them.
ejsappbooking_delete_instance(integer $id) : boolean
Removes an instance of the ejsappbooking from the database
Given an ID of an instance of this module, this function will permanently delete the instance and any data that depends on it.
integer | $id | Id of the module instance |
Success/Failure
ejsappbooking_extend_navigation(\navigation_node $navref, \stdClass $course, \stdClass $module, \cm_info $cm)
Extends the global navigation tree by adding ejsappbooking nodes if there is a relevant content
This can be called by an AJAX request so do not rely on $PAGE as it might not be set up properly.
\navigation_node | $navref | An object representing the navigation tree node of the ejsappbooking module instance |
\stdClass | $course | |
\stdClass | $module | |
\cm_info | $cm |
ejsappbooking_extend_settings_navigation(\settings_navigation $settings, $ejsappbookingnode) : void
This function extends the settings navigation block for the site.
It is safe to rely on PAGE here as we will only ever be within the module context when this is called
\settings_navigation | $settings | |
$ejsappbookingnode |
ejsappbooking_get_file_areas(\stdClass $course, \stdClass $cm, \stdClass $context) : array
Returns the lists of all browsable file areas within the given module context
The file area 'intro' for the activity introduction field is added automatically by \file_browser::get_file_info_context_module()
\stdClass | $course | |
\stdClass | $cm | |
\stdClass | $context |
of [(string)filearea] => (string)description
ejsappbooking_get_file_info(\file_browser $browser, array $areas, \stdClass $course, \stdClass $cm, \stdClass $context, string $filearea, integer $itemid, string $filepath, string $filename) : \file_info
File browsing support for ejsappbooking file areas
\file_browser | $browser | |
array | $areas | |
\stdClass | $course | |
\stdClass | $cm | |
\stdClass | $context | |
string | $filearea | |
integer | $itemid | |
string | $filepath | |
string | $filename |
instance or null if not found
ejsappbooking_get_recent_mod_activity(array $activities, integer $index, integer $timestart, integer $courseid, integer $cmid, integer $userid, integer $groupid) : void
Prepares the recent activity data
This callback function is supposed to populate the passed array with custom activity records. These records are then rendered into HTML via ejsappbooking_print_recent_mod_activity().
array | $activities | sequentially indexed array of objects with the 'cmid' property |
integer | $index | the index in the $activities to use for the next record |
integer | $timestart | append activity since this time |
integer | $courseid | the id of the course we produce the report for |
integer | $cmid | course module id |
integer | $userid | check for a particular user's activity only, defaults to 0 (all users) |
integer | $groupid | check for a particular group's activity only, defaults to 0 (all groups) |
ejsappbooking_pluginfile(\stdClass $course, \stdClass $cm, \stdClass $context, string $filearea, array $args, boolean $forcedownload, array $options = array())
Serves the files from the ejsappbooking file areas
\stdClass | $course | the course object |
\stdClass | $cm | the course module object |
\stdClass | $context | the ejsappbooking's context |
string | $filearea | the name of the file area |
array | $args | extra arguments (itemid, path) |
boolean | $forcedownload | whether or not force download |
array | $options | additional options affecting the file serving |
ejsappbooking_print_recent_activity( $course, $viewfullnames, $timestart) : boolean
Given a course and a time, this module should find recent activity that has occurred in ejsappbooking activities and print it out.
Return true if there was output, or false is there was none.
$course | ||
$viewfullnames | ||
$timestart |
ejsappbooking_update_instance(object $ejsappbooking) : boolean
Updates an instance of the ejsappbooking in the database
Given an object containing all the necessary data, (defined by the form in mod_form.php) this function will update an existing instance with new data.
object | $ejsappbooking | An object from the form in mod_form.php |
Success/Fail
ejsappbooking_user_complete(\stdClass $course, \stdClass $user, \cm_info $mod, \stdClass $ejsappbooking) : \void,
Prints a detailed representation of what a user has done with a given particular instance of this module, for user activity reports.
\stdClass | $course | the current course record |
\stdClass | $user | the record of the user we are generating report for |
\cm_info | $mod | course module info |
\stdClass | $ejsappbooking | the module instance record |
is supposed to echp directly
ejsappbooking_user_outline(integer $course, $user, $mod, $ejsappbooking) : \stdClass|null
Returns a small object with summary information about what a user has done with a given particular instance of this module Used for user activity reports.
$return->time = the time they did it $return->info = a short text description
integer | $course | |
$user | ||
$mod | ||
$ejsappbooking |