[moodle] / contrib / plugins / grade / report / visual / index.php Repository:

View of /contrib/plugins/grade/report/visual/index.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (download) (annotate)
Tue Jul 1 15:30:01 2008 WST (16 months, 3 weeks ago) by dservos
Branch: MAIN
CONTRIB-497
Start of the grade/report/visual plug-in for displaying charts and graphs using flare as part of the GSoC animated grade statistics report project.

Currently only one visualization has been added and it is still in a rough state.

The code for the swf can be found in the flare_visualization dir.

Lots more work ahead to get the plug-in 100%.
<?php
require_once '../../../config.php';
require_once $CFG->libdir.'/gradelib.php';
require_once $CFG->dirroot.'/grade/lib.php';

$courseid = required_param('id');

/// basic access checks
if(isset($DB) && !is_null($DB)) {
    $course = $DB->get_record('course', array('id' => $courseid));
} else {
    $course = get_record('course', 'id', $courseid);
}
if (!$course) {
        print_error('nocourseid');
}
require_login($course);
$context = get_context_instance(CONTEXT_COURSE, $course->id);
require_capability('gradereport/visual:view', $context);

/// last selected report session tracking
if (!isset($USER->grade_last_report)) {
    $USER->grade_last_report = array();
}
$USER->grade_last_report[$course->id] = 'visual';

/// Build navigation
$strgrades  = get_string('grades');
$reportname = get_string('modulename', 'gradereport_visual');
$navigation = grade_build_nav(__FILE__, $reportname, $courseid);

//grade_regrade_final_grades($courseid);

/// Print header
print_header_simple($strgrades.': '.$reportname, ': '.$strgrades, $navigation, '', '', true, null, navmenu($course), false, null);

/// Print the plugin selector at the top
print_grade_plugin_selector($courseid, 'report', 'stats');

// Add tabs
$currenttab = 'visualreport';
require('tabs.php');

require('flex.php');

/// Print footer
print_footer($course);
?>

Moodle CVS Admin
ViewVC Help
Powered by ViewVC 1.0.7