Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/tag/coursetagslib.php File Reference

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)

Function Documentation

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

Parameters:
int$courseid
bool$showfeedback

Definition at line 420 of file coursetagslib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

coursetag_delete_keyword ( tagid,
userid,
courseid 
)

Deletes a personal tag for a user for a course.

$CFG

Parameters:
int$tagid
int$userid
int$courseid

Definition at line 356 of file coursetagslib.php.

Here is the call graph for this function:

coursetag_get_all_tags ( sort = 'name',
numtags = 0 
)

Returns an ordered array of tags (replaces popular_tags_count() allowing sorting).

$CFG

Parameters:
string$sortoptional selected sorting, default is alpha sort (name) also timemodified or popularity
int$numtagsoptional number of tags to display, default of 20 is set in the block, 0 returns all
Returns:
array

Definition at line 101 of file coursetagslib.php.

Here is the caller graph for this function:

coursetag_get_jscript ( coursetagdivs = '')

Returns javascript for use in tags block and supporting pages

Parameters:
string$coursetagdivscomma separated divs ids $CFG

Definition at line 243 of file coursetagslib.php.

Here is the caller graph for this function:

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.

Here is the caller graph for this function:

coursetag_get_records ( courseid,
userid 
)

Returns all tags created by a user for a course

$CFG

Parameters:
int$courseid
int$userid

Definition at line 286 of file coursetagslib.php.

Get courses tagged with a tag

Parameters:
int$tagid
Returns:
array of course objects

Definition at line 391 of file coursetagslib.php.

coursetag_get_tags ( courseid,
userid = 0,
tagtype = '',
numtags = 0,
sort = 'name' 
)

coursetagslib.php

Author:
j.beedell@open.ac.uk July07 Returns an ordered array of tags associated with visible courses (boosted replacement of get_all_tags() allowing association with user and tagtype).

$CFG

Parameters:
int$courseid,a0 will return all distinct tags for visible courses
int$useridoptional the user id, a default of 0 will return all users tags for the course
string$tagtypeoptional 'official' or 'default', empty returns both tag types
int$numtagsoptional number of tags to display, default of 80 is set in the block, 0 returns all
string$sortoptional selected sorting, default is alpha sort (name) also timemodified or popularity
Returns:
array

Definition at line 21 of file coursetagslib.php.

Here is the caller graph for this function:

coursetag_print_cloud ( tagcloud,
return = false,
max_size = 180,
min_size = 80 
)

Prints a tag cloud

Parameters:
array$tagcloudarray of tag objects (fields: id, name, rawname, count and flag)
int$max_sizemaximum text size, in percentage
int$min_sizeminimum text size, in percentage
$returnif true return html string

Definition at line 169 of file coursetagslib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

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

Parameters:
array$tagssimple array of keywords to be stored
integer$courseid
integer$userid
string$tagtypeofficial or default only
string$myurloptional for logging creation of course tags

Definition at line 310 of file coursetagslib.php.

Here is the call graph for this function:

 All Data Structures Namespaces Files Functions Variables Enumerations