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

Go to the source code of this file.

Data Structures

class  graded_users_iterator
class  grade_plugin_info
class  grade_plugin_return
class  grade_structure
class  grade_seq
class  grade_tree
class  grade_helper

Namespaces

namespace  moodlecore

Functions

 print_graded_users_selector ($course, $actionpage, $userid=0, $groupid=0, $includeall=true, $return=false)
 grade_get_graded_users_select ($report, $course, $userid, $groupid, $includeall)
 print_grade_plugin_selector ($plugin_info, $active_type, $active_plugin, $return=false)
 grade_print_tabs ($active_type, $active_plugin, $plugin_info, $return=false)
 grade_get_plugin_info ($courseid, $active_type, $active_plugin)
 print_grade_page_head ($courseid, $active_type, $active_plugin=null, $heading=false, $return=false, $buttons=false, $shownavigation=true)
 grade_build_nav ($path, $pagename=null, $id=null)
 grade_button ($type, $courseid, $object)
 grade_extend_settings ($plugininfo, $courseid)

Function Documentation

grade_build_nav ( path,
pagename = null,
id = null 
)

Function central to gradebook for building and printing the navigation (breadcrumb trail).

Parameters:
string$pathThe path of the calling script (using __FILE__?)
string$pagenameThe language string to use as the last part of the navigation (non-link)
mixed$idEither a plain integer (assuming the key is 'id') or an array of keys and values (e.g courseid => $courseid, itemid...)
Returns:
string

Definition at line 911 of file lib.php.

Here is the call graph for this function:

grade_button ( type,
courseid,
object 
)

Local shortcut function for creating an edit/delete button for a grade_* object.

Parameters:
string$type'edit' or 'delete'
int$courseidThe Course ID
grade_*$object The grade_* object
Returns:
string html

Definition at line 2166 of file lib.php.

Here is the call graph for this function:

grade_extend_settings ( plugininfo,
courseid 
)

This method adds settings to the settings block for the grade system and its plugins

moodle_page $PAGE

Definition at line 2193 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

grade_get_graded_users_select ( report,
course,
userid,
groupid,
includeall 
)

Definition at line 311 of file lib.php.

Here is the caller graph for this function:

grade_get_plugin_info ( courseid,
active_type,
active_plugin 
)

grade_get_plugin_info

Parameters:
int$courseidThe course id
string$active_typetype of plugin on current page - import, export, report or edit
string$active_pluginactive plugin type - grader, user, cvs, ...
Returns:
array

Definition at line 475 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

grade_print_tabs ( active_type,
active_plugin,
plugin_info,
return = false 
)

Print grading plugin selection tab-based navigation.

Parameters:
string$active_typetype of plugin on current page - import, export, report or edit
string$active_pluginactive plugin type - grader, user, cvs, ...
array$plugin_infoArray of plugins
boolean$returnreturn as string
Returns:
nothing or string if $return true

Definition at line 405 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

print_grade_page_head ( courseid,
active_type,
active_plugin = null,
heading = false,
return = false,
buttons = false,
shownavigation = true 
)

Prints the page headers, breadcrumb trail, page heading, (optional) dropdown navigation menu and (optional) navigation tabs for any gradebook page. All gradebook pages MUST use these functions in favour of the usual print_header(), print_header_simple(), print_heading() etc. !IMPORTANT! Use of tabs.php file in gradebook pages is forbidden unless tabs are switched off at the site level for the gradebook ($CFG->grade_navmethod = GRADE_NAVMETHOD_DROPDOWN).

Parameters:
int$courseidCourse id
string$active_typeThe type of the current page (report, settings, import, export, scales, outcomes, letters)
string$active_pluginThe plugin of the current page (grader, fullview etc...)
string$headingThe heading of the page. Tries to guess if none is given
boolean$returnWhether to return (true) or echo (false) the HTML generated by this function
string$bodytagsAdditional attributes that will be added to the <body> tag
string$buttonsAdditional buttons to display on the page
boolean$shownavigationshould the gradebook navigation drop down (or tabs) be shown?
Returns:
string HTML code or nothing if $return == false

Definition at line 633 of file lib.php.

Here is the call graph for this function:

print_grade_plugin_selector ( plugin_info,
active_type,
active_plugin,
return = false 
)

Print grading plugin selection popup form.

Parameters:
array$plugin_infoAn array of plugins containing information for the selector
boolean$returnreturn as string
Returns:
nothing or string if $return true

Definition at line 349 of file lib.php.

Here is the caller graph for this function:

print_graded_users_selector ( course,
actionpage,
userid = 0,
groupid = 0,
includeall = true,
return = false 
)

Print a selection popup form of the graded users in a course.

Deprecated:
since 2.0
Parameters:
int$courseid of the course
string$actionpageThe page receiving the data from the popoup form
int$useridid of the currently selected user (or 'all' if they are all selected)
int$groupidid of requested group, 0 means all
int$includeallbool include all option
bool$returnIf true, will return the HTML, otherwise, will print directly
Returns:
null

Definition at line 306 of file lib.php.

Here is the call graph for this function:

 All Data Structures Namespaces Files Functions Variables Enumerations