[ Index ] |
PHP Cross Reference of moodle-2.8 |
[Source view] [Print] [Project Stats]
Library of functions and constants for module glossary (replace glossary with the name of your module and delete this line)
Copyright: | 1999 onwards Martin Dougiamas {@link http://moodle.com} |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 3127 lines (115 kb) |
Included or required: | 13 times |
Referenced: | 0 times |
Includes or requires: | 1 file lib/xmlize.php |
glossary_add_instance($glossary) X-Ref |
param: object $glossary return: int |
glossary_update_instance($glossary) X-Ref |
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. param: object $glossary return: bool |
glossary_delete_instance($id) X-Ref |
Given an ID of an instance of this module, this function will permanently delete the instance and any data that depends on it. param: int $id glossary id return: bool success |
glossary_user_outline($course, $user, $mod, $glossary) X-Ref |
Return 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 param: object $course param: object $user param: object $mod param: object $glossary return: object|null |
glossary_get_user_entries($glossaryid, $userid) X-Ref |
param: int $glossaryid param: int $userid return: array |
glossary_user_complete($course, $user, $mod, $glossary) X-Ref |
Print a detailed representation of what a user has done with a given particular instance of this module, for user activity reports. param: object $course param: object $user param: object $mod param: object $glossary |
glossary_get_recent_mod_activity(&$activities, &$index, $timestart, $courseid, $cmid, $userid = 0, $groupid = 0) X-Ref |
Returns all glossary entries since a given time for specified glossary param: array $activities sequentially indexed array of objects param: int $index param: int $timestart param: int $courseid param: int $cmid param: int $userid defaults to 0 param: int $groupid defaults to 0 return: void adds items into $activities and increases $index |
glossary_print_recent_mod_activity($activity, $courseid, $detail, $modnames, $viewfullnames) X-Ref |
Outputs the glossary entry indicated by $activity param: object $activity the activity object the glossary resides in param: int $courseid the id of the course the glossary resides in param: bool $detail not used, but required for compatibilty with other modules param: int $modnames not used, but required for compatibilty with other modules param: bool $viewfullnames not used, but required for compatibilty with other modules return: void |
glossary_print_recent_activity($course, $viewfullnames, $timestart) X-Ref |
Given a course and a time, this module should find recent activity that has occurred in glossary activities and print it out. Return true if there was output, or false is there was none. param: object $course param: object $viewfullnames param: int $timestart return: bool |
glossary_log_info($log) X-Ref |
param: object $log |
glossary_cron() X-Ref |
Function to be run periodically according to the moodle cron This function searches for things that need to be done, such as sending out mail, toggling flags etc ... return: bool |
glossary_get_user_grades($glossary, $userid=0) X-Ref |
Return grade for given user or all users. param: stdClass $glossary A glossary instance param: int $userid Optional user id, 0 means all users return: array An array of grades, false if none |
glossary_rating_permissions($contextid, $component, $ratingarea) X-Ref |
Return rating related permissions param: int $contextid the context id param: string $component The component we want to get permissions for param: string $ratingarea The ratingarea that we want to get permissions for return: array an associative array of the user's rating permissions |
glossary_rating_validate($params) X-Ref |
Validates a submitted rating param: array $params submitted data return: boolean true if the rating is valid. Will throw rating_exception if not |
glossary_update_grades($glossary=null, $userid=0, $nullifnone=true) X-Ref |
Update activity grades param: stdClass $glossary Null means all glossaries (with extra cmidnumber property) param: int $userid specific user only, 0 means all param: bool $nullifnone If true and the user has no grade then a grade item with rawgrade == null will be inserted |
glossary_grade_item_update($glossary, $grades=NULL) X-Ref |
Create/update grade item for given glossary param: stdClass $glossary object with extra cmidnumber param: mixed $grades Optional array/object of grade(s); 'reset' means reset grades in gradebook return: int, 0 if ok, error code otherwise |
glossary_grade_item_delete($glossary) X-Ref |
Delete grade item for given glossary param: object $glossary object |
glossary_scale_used($glossaryid,$scaleid) X-Ref |
param: int $gloassryid param: int $scaleid return: bool |
glossary_scale_used_anywhere($scaleid) X-Ref |
Checks if scale is being used by any instance of glossary This is used to find out if scale used anywhere param: int $scaleid return: boolean True if the scale is used by any glossary |
glossary_get_available_formats() X-Ref |
This function return an array of valid glossary_formats records Everytime it's called, every existing format is checked, new formats are included if detected and old formats are deleted and any glossary using an invalid format is updated to the default (dictionary). return: array |
glossary_debug($debug,$text,$br=1) X-Ref |
param: bool $debug param: string $text param: int $br |
glossary_get_entries($glossaryid, $entrylist, $pivot = "") X-Ref |
param: int $glossaryid param: string $entrylist param: string $pivot return: array |
glossary_get_entries_search($concept, $courseid) X-Ref |
param: object $concept param: string $courseid return: array |
glossary_print_entry($course, $cm, $glossary, $entry, $mode='',$hook='',$printicons = 1, $displayformat = -1, $printview = false) X-Ref |
param: object $course param: object $course param: object $glossary param: object $entry param: string $mode param: string $hook param: int $printicons param: int $displayformat param: bool $printview return: mixed |
glossary_print_entry_default($entry, $glossary, $cm) X-Ref |
Default (old) print format used if custom function doesn't exist in format param: object $entry param: object $glossary param: object $cm return: void Output is echo'd |
glossary_print_entry_concept($entry, $return=false) X-Ref |
Print glossary concept/term as a heading <h4> param: object $entry |
glossary_print_entry_definition($entry, $glossary, $cm) X-Ref |
param: object $entry param: object $glossary param: object $cm |
glossary_print_entry_aliases($course, $cm, $glossary, $entry,$mode='',$hook='', $type = 'print') X-Ref |
param: object $course param: object $cm param: object $glossary param: object $entry param: string $mode param: string $hook param: string $type return: string|void |
glossary_print_entry_icons($course, $cm, $glossary, $entry, $mode='',$hook='', $type = 'print') X-Ref |
param: object $course param: object $cm param: object $glossary param: object $entry param: string $mode param: string $hook param: string $type return: string|void |
glossary_print_entry_lower_section($course, $cm, $glossary, $entry, $mode, $hook, $printicons, $aliases=true) X-Ref |
param: object $course param: object $cm param: object $glossary param: object $entry param: string $mode param: object $hook param: bool $printicons param: bool $aliases return: void |
glossary_print_entry_attachment($entry, $cm, $format = null, $unused1 = null, $unused2 = null) X-Ref |
Print the list of attachments for this glossary entry param: object $entry param: object $cm The coursemodule param: string $format The format for this view (html, or text) param: string $unused1 This parameter is no longer used param: string $unused2 This parameter is no longer used |
glossary_print_entry_approval($cm, $entry, $mode, $align="right", $insidetable=true) X-Ref |
param: object $cm param: object $entry param: string $mode param: string $align param: bool $insidetable |
glossary_search($course, $searchterms, $extended = 0, $glossary = NULL) X-Ref |
It returns all entries from all glossaries that matches the specified criteria within a given $course. It performs an $extended search if necessary. It restrict the search to only one $glossary if the $glossary parameter is set. param: object $course param: array $searchterms param: int $extended param: object $glossary return: array |
glossary_search_entries($searchterms, $glossary, $extended) X-Ref |
param: array $searchterms param: object $glossary param: bool $extended return: array |
glossary_print_attachments($entry, $cm, $type=NULL, $unused = null) X-Ref |
if return=html, then return a html string. if return=text, then return a text-only string. otherwise, print HTML for non-images, and return image HTML if attachment is an image, $align set its aligment. param: object $entry param: object $cm param: string $type html, txt, empty param: string $unused This parameter is no longer used return: string image string or nothing depending on $type param |
glossary_get_file_areas($course, $cm, $context) X-Ref |
Lists all browsable file areas param: stdClass $course course object param: stdClass $cm course module object param: stdClass $context context object return: array |
glossary_get_file_info($browser, $areas, $course, $cm, $context, $filearea, $itemid, $filepath, $filename) X-Ref |
File browsing support for glossary module. param: file_browser $browser param: array $areas param: stdClass $course param: cm_info $cm param: context $context param: string $filearea param: int $itemid param: string $filepath param: string $filename return: file_info_stored file_info_stored instance or null if not found |
glossary_pluginfile($course, $cm, $context, $filearea, $args, $forcedownload, array $options=array() X-Ref |
Serves the glossary attachments. Implements needed access control ;-) param: stdClass $course course object param: stdClass $cm course module object param: stdClsss $context context object param: string $filearea file area param: array $args extra arguments param: bool $forcedownload whether or not force download param: array $options additional options affecting the file serving return: bool false if file not found, does not return if found - justsend the file |
glossary_print_tabbed_table_end() X-Ref |
No description |
glossary_print_approval_menu($cm, $glossary,$mode, $hook, $sortkey = '', $sortorder = '') X-Ref |
param: object $cm param: object $glossary param: string $mode param: string $hook param: string $sortkey param: string $sortorder |
glossary_print_import_menu($cm, $glossary, $mode, $hook, $sortkey='', $sortorder = '') X-Ref |
param: object $cm param: object $glossary param: string $hook param: string $sortkey param: string $sortorder |
glossary_print_export_menu($cm, $glossary, $mode, $hook, $sortkey='', $sortorder = '') X-Ref |
param: object $cm param: object $glossary param: string $hook param: string $sortkey param: string $sortorder |
glossary_print_alphabet_menu($cm, $glossary, $mode, $hook, $sortkey='', $sortorder = '') X-Ref |
param: object $cm param: object $glossary param: string $hook param: string $sortkey param: string $sortorder |
glossary_print_author_menu($cm, $glossary,$mode, $hook, $sortkey = '', $sortorder = '') X-Ref |
param: object $cm param: object $glossary param: string $hook param: string $sortkey param: string $sortorder |
glossary_print_categories_menu($cm, $glossary, $hook, $category) X-Ref |
param: object $cm param: object $glossary param: string $hook param: object $category |
glossary_print_all_links($cm, $glossary, $mode, $hook) X-Ref |
param: object $cm param: object $glossary param: string $mode param: string $hook |
glossary_print_special_links($cm, $glossary, $mode, $hook) X-Ref |
param: object $cm param: object $glossary param: string $mode param: string $hook |
glossary_print_alphabet_links($cm, $glossary, $mode, $hook, $sortkey, $sortorder) X-Ref |
param: object $glossary param: string $mode param: string $hook param: string $sortkey param: string $sortorder |
glossary_print_sorting_links($cm, $mode, $sortkey = '',$sortorder = '') X-Ref |
param: object $cm param: string $mode param: string $sortkey param: string $sortorder |
glossary_sort_entries( $entry0, $entry1 ) X-Ref |
param: object $entry0 param: object $entry1 return: int [-1 | 0 | 1] |
glossary_print_entry_ratings($course, $entry) X-Ref |
param: object $course param: object $entry return: bool |
glossary_print_dynaentry($courseid, $entries, $displayformat = -1) X-Ref |
param: int $courseid param: array $entries param: int $displayformat |
glossary_generate_export_csv($entries, $aliases, $categories) X-Ref |
param: array $entries param: array $aliases param: array $categories return: string |
glossary_generate_export_file($glossary, $ignored = "", $hook = 0) X-Ref |
param: object $glossary param: string $ignored invalid parameter param: int|string $hook return: string |
glossary_read_imported_file($file_content) X-Ref |
Read import file and convert to current charset param: string $file return: string |
glossary_start_tag($tag,$level=0,$endline=false) X-Ref |
Return the xml start tag param: string $tag param: int $level param: bool $endline return: string |
glossary_end_tag($tag,$level=0,$endline=true) X-Ref |
Return the xml end tag param: string $tag param: int $level param: bool $endline return: string |
glossary_full_tag($tag,$level=0,$endline=true,$content) X-Ref |
Return the start tag, the contents and the end tag param: string $tag param: int $level param: bool $endline param: string $content return: string |
glossary_count_unrated_entries($glossaryid, $userid) X-Ref |
How many unrated entries are in the given glossary for a given user? param: int $glossaryid param: int $userid return: int |
glossary_get_paging_bar($totalcount, $page, $perpage, $baseurl, $maxpageallowed=99999, $maxdisplay=20, $separator=" ", $specialtext="", $specialvalue=-1, $previousandnext = true) X-Ref |
Returns the html code to represent any pagging bar. Paramenters are: The function dinamically show the first and last pages, and "scroll" over pages. Fully compatible with Moodle's print_paging_bar() function. Perhaps some day this could replace the general one. ;-) param: int $totalcount total number of records to be displayed param: int $page page currently selected (0 based) param: int $perpage number of records per page param: string $baseurl url to link in each page, the string 'page=XX' will be added automatically. param: int $maxpageallowed Optional maximum number of page allowed. param: int $maxdisplay Optional maximum number of page links to show in the bar param: string $separator Optional string to be used between pages in the bar param: string $specialtext Optional string to be showed as an special link param: string $specialvalue Optional value (page) to be used in the special link param: bool $previousandnext Optional to decide if we want the previous and next links return: string |
glossary_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 |
glossary_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 |
glossary_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 glossary. param: object $mform form passed by reference |
glossary_reset_course_form_defaults($course) X-Ref |
Course reset form defaults. return: array |
glossary_reset_gradebook($courseid, $type='') X-Ref |
Removes all grades from gradebook param: int $courseid The ID of the course to reset param: string $type The optional type of glossary. 'main', 'secondary' or '' |
glossary_reset_userdata($data) X-Ref |
Actual implementation of the reset course functionality, delete all the glossary responses for course $data->courseid. param: $data the data submitted from the reset course. return: array status array |
glossary_get_extra_capabilities() X-Ref |
Returns all other caps used in module return: array |
glossary_supports($feature) X-Ref |
param: string $feature FEATURE_xx constant for requested feature return: mixed True if module supports feature, null if doesn't know |
glossary_get_completion_state($course,$cm,$userid,$type) X-Ref |
Obtains the automatic completion state for this glossary based on any conditions in glossary 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. (If no conditions, then return |
glossary_extend_navigation($navigation, $course, $module, $cm) X-Ref |
No description |
glossary_extend_settings_navigation(settings_navigation $settings, navigation_node $glossarynode) X-Ref |
Adds module specific settings to the settings block param: settings_navigation $settings The settings navigation object param: navigation_node $glossarynode The node to add module settings to |
glossary_comment_permissions($comment_param) X-Ref |
Running addtional permission check on plugin, for example, plugins may have switch to turn on/off comments option, this callback will affect UI display, not like pluginname_comment_validate only throw exceptions. Capability check has been done in comment->check_permissions(), we don't need to do it again here. param: stdClass $comment_param { return: array |
glossary_comment_validate($comment_param) X-Ref |
Validate comment parameter before perform other comments actions param: stdClass $comment_param { return: boolean |
glossary_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 |
Generated: Fri Nov 28 20:29:05 2014 | Cross-referenced by PHPXref 0.7.1 |