Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/report/stats/graph.php File Reference

Go to the source code of this file.

Namespaces

namespace  report

Variables

 $courseid = required_param('course', PARAM_INT)
 $report = required_param('report', PARAM_INT)
 $time = required_param('time', PARAM_INT)
 $mode = required_param('mode', PARAM_INT)
 $userid = optional_param('userid', 0, PARAM_INT)
 $roleid = optional_param('roleid',0,PARAM_INT)
 $url = new moodle_url('/report/stats/graph.php', array('course'=>$courseid, 'report'=>$report, 'time'=>$time, 'mode'=>$mode, 'userid'=>$userid, 'roleid'=>$roleid))
 $course = $DB->get_record("course", array("id"=>$courseid), '*', MUST_EXIST)
 $coursecontext = context_course::instance($course->id)
 $param = stats_get_parameters($time,$report,$course->id,$mode)
if(!empty($userid)) $sql
 $stats = $DB->get_records_sql($sql, $param->params)
 $graph = new graph(750,400)
$graph parameter ['legend'] = 'outside-right'
$graph parameter ['legend_size'] = 10
$graph parameter ['x_axis_angle'] = 90
$graph parameter ['title'] = false
$graph y_tick_labels = null

Variable Documentation

$course = $DB->get_record("course", array("id"=>$courseid), '*', MUST_EXIST)

Definition at line 40 of file graph.php.

$coursecontext = context_course::instance($course->id)

Definition at line 41 of file graph.php.

Definition at line 30 of file graph.php.

$graph = new graph(750,400)

Definition at line 92 of file graph.php.

Definition at line 33 of file graph.php.

$param = stats_get_parameters($time,$report,$course->id,$mode)

Definition at line 69 of file graph.php.

$report = required_param('report', PARAM_INT)

Definition at line 31 of file graph.php.

$roleid = optional_param('roleid',0,PARAM_INT)

Definition at line 35 of file graph.php.

if (!empty($userid)) $sql
Initial value:
 'SELECT '.((empty($param->fieldscomplete)) ? 'id,roleid,timeend,' : '').$param->fields
.' FROM {stats_'.$param->table.'} WHERE '
.(($course->id == SITEID) ? '' : ' courseid = '.$course->id.' AND ')
 .((!empty($userid)) ? ' userid = '.$userid.' AND ' : '')
 .((!empty($roleid)) ? ' roleid = '.$roleid.' AND ' : '')
 . ((!empty($param->stattype)) ? ' stattype = \''.$param->stattype.'\' AND ' : '')
 .' timeend >= '.$param->timeafter
.' '.$param->extras
.' ORDER BY timeend DESC'

Definition at line 76 of file graph.php.

$stats = $DB->get_records_sql($sql, $param->params)

Definition at line 86 of file graph.php.

Definition at line 32 of file graph.php.

$url = new moodle_url('/report/stats/graph.php', array('course'=>$courseid, 'report'=>$report, 'time'=>$time, 'mode'=>$mode, 'userid'=>$userid, 'roleid'=>$roleid))

Definition at line 37 of file graph.php.

Definition at line 34 of file graph.php.

$graph parameter['legend'] = 'outside-right'

Definition at line 94 of file graph.php.

$graph parameter['legend_size'] = 10

Definition at line 95 of file graph.php.

$graph parameter['x_axis_angle'] = 90

Definition at line 96 of file graph.php.

$graph parameter['title'] = false

Definition at line 97 of file graph.php.

Definition at line 98 of file graph.php.

 All Data Structures Namespaces Files Functions Variables Enumerations