|
By dservos:
CONTRIB-497
*Added more visualizations
*Added selector UI Widget for flex/flare visualization
*Refactored some of flex actionscript code.
*Added defaults for selected group and items in visualizations.
*Improved removal of nodes and edges when an item or group is deselected in a legend.
*Fixed a memory leak realting to the removal and addtion of nodes.
*Added more options for and control of the flex/flare based visualization from the Moodle back end.
|
| 87 |
/// Build grade tree |
/// Build grade tree |
| 88 |
$this->gtree = new grade_tree($this->courseid, false); |
$this->gtree = new grade_tree($this->courseid, false); |
| 89 |
|
|
| 90 |
|
$this->load_visualizations(); |
| 91 |
|
$this->set_up_flashvars(); |
| 92 |
|
|
| 93 |
/// Set up Groups |
/// Set up Groups |
| 94 |
/*if ($this->get_pref('stats', 'showgroups') || is_null($this->get_pref('stats', 'showgroups'))) { |
if($visid && grade_report_visual::get_visualization($visid)->usegroups) { |
|
if(is_callable(array($this, 'setup_groups'))) { |
|
| 95 |
$this->setup_groups(); |
$this->setup_groups(); |
|
} else { |
|
|
$this->local_setup_groups(); |
|
| 96 |
} |
} |
|
}*/ |
|
|
|
|
|
$this->load_visualizations(); |
|
|
$this->set_up_flashvars(); |
|
| 97 |
} |
} |
| 98 |
|
|
| 99 |
/// Added to keep grade_report happy |
/// Added to keep grade_report happy |
| 382 |
} |
} |
| 383 |
} |
} |
| 384 |
|
|
| 385 |
|
public static function truncate($string, $max = 25, $end = '...') { |
| 386 |
|
if(strlen($string) <= $max) { |
| 387 |
|
return $string; |
| 388 |
|
} |
| 389 |
|
|
| 390 |
|
return substr_replace($string, $end, $max - strlen($end)); |
| 391 |
|
} |
| 392 |
|
|
| 393 |
/** |
/** |
| 394 |
* Returns the data for a visulazation in json format. |
* Returns the data for a visulazation in json format. |
| 395 |
* TODO: Use moodle's json encoding functions rather then phps. |
* TODO: Use moodle's json encoding functions rather then phps. |
| 404 |
} |
} |
| 405 |
} |
} |
| 406 |
|
|
|
|
|
| 407 |
/** |
/** |
| 408 |
* Returns the data for a visulasation in tab format. |
* Returns the data for a visulasation in tab format. |
| 409 |
* @param boolean $return if true return a string, other wise echo the data. |
* @param boolean $return if true return a string, other wise echo the data. |