|
Moodle
2.2.1
http://www.collinsharper.com
|
Go to the source code of this file.
Functions | |
| coursetag_get_tags ($courseid, $userid=0, $tagtype='', $numtags=0, $sort='name') | |
| coursetag_get_all_tags ($sort='name', $numtags=0) | |
| coursetag_sort ($a, $b) | |
| coursetag_print_cloud ($tagcloud, $return=false, $max_size=180, $min_size=80) | |
| coursetag_get_jscript ($coursetagdivs= '') | |
| coursetag_get_jscript_links ($elementid, $coursetagslinks) | |
| coursetag_get_records ($courseid, $userid) | |
| coursetag_store_keywords ($tags, $courseid, $userid=0, $tagtype='official', $myurl='') | |
| coursetag_delete_keyword ($tagid, $userid, $courseid) | |
| coursetag_get_tagged_courses ($tagid) | |
| coursetag_delete_course_tags ($courseid, $showfeedback=false) | |
| coursetag_delete_course_tags | ( | $ | courseid, |
| $ | showfeedback = false |
||
| ) |
Course tagging function used only during the deletion of a course (called by lib/moodlelib.php) to clean up associated tags
| int | $courseid | |
| bool | $showfeedback |
Definition at line 420 of file coursetagslib.php.


| coursetag_delete_keyword | ( | $ | tagid, |
| $ | userid, | ||
| $ | courseid | ||
| ) |
Deletes a personal tag for a user for a course.
$CFG
| int | $tagid | |
| int | $userid | |
| int | $courseid |
Definition at line 356 of file coursetagslib.php.

| coursetag_get_all_tags | ( | $ | sort = 'name', |
| $ | numtags = 0 |
||
| ) |
Returns an ordered array of tags (replaces popular_tags_count() allowing sorting).
$CFG
| string | $sort | optional selected sorting, default is alpha sort (name) also timemodified or popularity |
| int | $numtags | optional number of tags to display, default of 20 is set in the block, 0 returns all |
Definition at line 101 of file coursetagslib.php.

| coursetag_get_jscript | ( | $ | coursetagdivs = '' | ) |
Returns javascript for use in tags block and supporting pages
| string | $coursetagdivs | comma separated divs ids $CFG |
Definition at line 243 of file coursetagslib.php.

| coursetag_get_jscript_links | ( | $ | elementid, |
| $ | coursetagslinks | ||
| ) |
Returns javascript to create the links in the tag block footer.
Definition at line 267 of file coursetagslib.php.

| coursetag_get_records | ( | $ | courseid, |
| $ | userid | ||
| ) |
Returns all tags created by a user for a course
$CFG
| int | $courseid | |
| int | $userid |
Definition at line 286 of file coursetagslib.php.
| coursetag_get_tagged_courses | ( | $ | tagid | ) |
Get courses tagged with a tag
| int | $tagid |
Definition at line 391 of file coursetagslib.php.
| coursetag_get_tags | ( | $ | courseid, |
| $ | userid = 0, |
||
| $ | tagtype = '', |
||
| $ | numtags = 0, |
||
| $ | sort = 'name' |
||
| ) |
$CFG
| int | $courseid,a | 0 will return all distinct tags for visible courses |
| int | $userid | optional the user id, a default of 0 will return all users tags for the course |
| string | $tagtype | optional 'official' or 'default', empty returns both tag types |
| int | $numtags | optional number of tags to display, default of 80 is set in the block, 0 returns all |
| string | $sort | optional selected sorting, default is alpha sort (name) also timemodified or popularity |
Definition at line 21 of file coursetagslib.php.

| coursetag_print_cloud | ( | $ | tagcloud, |
| $ | return = false, |
||
| $ | max_size = 180, |
||
| $ | min_size = 80 |
||
| ) |
Prints a tag cloud
| array | $tagcloud | array of tag objects (fields: id, name, rawname, count and flag) |
| int | $max_size | maximum text size, in percentage |
| int | $min_size | minimum text size, in percentage |
| $return | if true return html string |
Definition at line 169 of file coursetagslib.php.


| coursetag_sort | ( | $ | a, |
| $ | b | ||
| ) |
Callback function for coursetag_get_tags() and coursetag_get_all_tags() only $CFG
Definition at line 141 of file coursetagslib.php.
| coursetag_store_keywords | ( | $ | tags, |
| $ | courseid, | ||
| $ | userid = 0, |
||
| $ | tagtype = 'official', |
||
| $ | myurl = '' |
||
| ) |
Stores a tag for a course for a user
$CFG
| array | $tags | simple array of keywords to be stored |
| integer | $courseid | |
| integer | $userid | |
| string | $tagtype | official or default only |
| string | $myurl | optional for logging creation of course tags |
Definition at line 310 of file coursetagslib.php.
