|
By dservos:
CONTRIB-497
* Added flare libbary to repo as it is needed to build the flash front end. Lib is located at /grade/report/visual/flare_visualization/flare/. For more information see http://flare.prefuse.org/
* Added more visualizations.
* Added settings/preferences page for the report.
* Added printable version.
* Added more documentation.
* Added README.txt
* Cleaned up code.
* Fixed a bunch of small bugs.
|
| 1 |
<?php |
<?php |
| 2 |
|
/////////////////////////////////////////////////////////////////////////// |
| 3 |
|
// // |
| 4 |
|
// NOTICE OF COPYRIGHT // |
| 5 |
|
// // |
| 6 |
|
// Moodle - Modular Object-Oriented Dynamic Learning Environment // |
| 7 |
|
// http://moodle.org // |
| 8 |
|
// // |
| 9 |
|
// Copyright (C) 1999 onwards Martin Dougiamas http://moodle.com // |
| 10 |
|
// // |
| 11 |
|
// This program is free software; you can redistribute it and/or modify // |
| 12 |
|
// it under the terms of the GNU General Public License as published by // |
| 13 |
|
// the Free Software Foundation; either version 2 of the License, or // |
| 14 |
|
// (at your option) any later version. // |
| 15 |
|
// // |
| 16 |
|
// This program is distributed in the hope that it will be useful, // |
| 17 |
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of // |
| 18 |
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // |
| 19 |
|
// GNU General Public License for more details: // |
| 20 |
|
// // |
| 21 |
|
// http://www.gnu.org/copyleft/gpl.html // |
| 22 |
|
// // |
| 23 |
|
/////////////////////////////////////////////////////////////////////////// |
| 24 |
|
|
| 25 |
require_once $CFG->dirroot . '/grade/report/visual/visualizations/visualization.php'; |
require_once $CFG->dirroot . '/grade/report/visual/visualizations/visualization.php'; |
| 26 |
|
|
| 27 |
class grade_distribution extends visualization { |
class grade_distribution extends visualization { |
| 49 |
//$this->nodeshape = visualization::SHAPE_VERTICAL_BAR; |
//$this->nodeshape = visualization::SHAPE_VERTICAL_BAR; |
| 50 |
//$this->edgeshape = visualization::SHAPE_BEZIER; |
//$this->edgeshape = visualization::SHAPE_BEZIER; |
| 51 |
|
|
| 52 |
$this->edges = array(new edge('grade', array('item', 'group'))); |
$this->edges = array(new edge('grade', array('group', 'item'))); |
| 53 |
|
|
| 54 |
$this->xaxis = 'grade'; |
$this->xaxis = 'grade'; |
| 55 |
$this->yaxis = 'students'; |
$this->yaxis = 'students'; |
| 69 |
$this->xaxislabel = get_string('grade', 'gradereport_visual'); |
$this->xaxislabel = get_string('grade', 'gradereport_visual'); |
| 70 |
$this->title = get_string('gradedistribution:title', 'gradereport_visual'); |
$this->title = get_string('gradedistribution:title', 'gradereport_visual'); |
| 71 |
|
|
| 72 |
$this->capabilities = null; |
$this->capability = 'gradereport/visual:vis:grade_distribution'; |
| 73 |
|
|
| 74 |
$this->colorencoderedge = new encoder(encoder::ENCODER_COLOR, 'item', array(2)); |
$this->colorencoderedge = new encoder(encoder::ENCODER_COLOR, 'item', array(2)); |
| 75 |
$this->colorencodernode = new encoder(encoder::ENCODER_COLOR, 'item', array(1)); |
$this->colorencodernode = new encoder(encoder::ENCODER_COLOR, 'item', array(1)); |