|
By dservos:
CONTRIB-497
*Added new visualization, Grade Distribution
*Fixed some minor bugs
*Made abstract visualization class for creating visualizations by making classes witch extend it.
*Made visual_settings.php witch takes a visualization class and truns it in to XML witch flex can read in.
*Made flex visualization application read in XML formated settings as well as tab formated data from moodle and combind them to make a custom visualization.
*Made flex visualization application read and use langue strings from moodle.
*Added printer firendly tab
TODO:
*Add more visualizations
*Refactor some of the flex/actionscript code
*More douctenation
*More UI functions for the flex application
|
| 27 |
* Outputs data for a visulasation in tab format. |
* Outputs data for a visulasation in tab format. |
| 28 |
*/ |
*/ |
| 29 |
|
|
| 30 |
|
error_reporting(0); |
| 31 |
|
|
| 32 |
/// Get a session id from the URI request and make a cookie |
/// Get a session id from the URI request and make a cookie |
| 33 |
/// for it temparaly. This is needed as the flex application will |
/// for it temparaly. This is needed as the flex application will |
| 34 |
/// not have the users oringal cookie and only the session information |
/// not have the users oringal cookie and only the session information |
| 46 |
require_once $CFG->dirroot.'/grade/report/visual/lib.php'; |
require_once $CFG->dirroot.'/grade/report/visual/lib.php'; |
| 47 |
|
|
| 48 |
$courseid = required_param('id'); |
$courseid = required_param('id'); |
| 49 |
|
$visid = optional_param('visid'); |
| 50 |
|
|
| 51 |
/// basic access checks |
/// basic access checks |
| 52 |
if(isset($DB) && !is_null($DB)) { |
if(isset($DB) && !is_null($DB)) { |
| 67 |
grade_regrade_final_grades($courseid); |
grade_regrade_final_grades($courseid); |
| 68 |
|
|
| 69 |
/// Get report object |
/// Get report object |
| 70 |
$report = new grade_report_visual($courseid, $gpr, $context); |
$report = new grade_report_visual($courseid, $gpr, $context, $visid); |
| 71 |
$report->load_users(); |
$report->load_users(); |
| 72 |
$report->harvest_data(); |
$report->harvest_data(); |
| 73 |
$report->report_data(); |
$report->report_data(); |
| 74 |
|
$report->adapt_data(); |
|
/// Output data in tab format. |
|
|
echo $report->get_tab(); |
|
| 75 |
|
|
| 76 |
/// Clean up cookie if it was created. |
/// Clean up cookie if it was created. |
| 77 |
if($cookiewasset) { |
if($cookiewasset) { |