Skip to content

Commit

Permalink
Replace external chart.js file with local file
Browse files Browse the repository at this point in the history
  • Loading branch information
AngelFQC committed Feb 8, 2019
1 parent 616a15e commit 7298224
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions main/inc/lib/tracking.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -5964,8 +5964,7 @@ public static function show_course_detail($user_id, $course_code, $session_id)
*/
public static function generate_session_exercise_graph($names, $my_results, $average)
{
$cdnChartJs = 'https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.3/Chart.min.js';
$html .= Display::tag('script', '', array('src' => $cdnChartJs));
$html = api_get_js('chartjs/Chart.js');
$canvas = Display::tag('canvas', '', array('id' => 'session_graph_chart'));
$html .= Display::tag('div',$canvas, array('style' => 'width:100%'));
$jsStr = " var data = {
Expand Down

0 comments on commit 7298224

Please sign in to comment.