Development:lib/graphlib.php: различия между версиями

Материал из База знаний Центра ПУСК МФТИ
1>Jamiesensei
мНет описания правки
 
м 1 версия импортирована
 
(нет различий)

Текущая версия от 08:59, 21 октября 2024

Moodle's graphlib.php is 'Class: Graph Drawing Class 2' by Herman Veluwenkamp with a couple of small modifications.

The modifications tell graphlib where to fetch the fonts for the current language.

There are some examples of how to use the class to make various graphs at the bottom of this page.

In the examples you need to replace :

include 'graph.php'; 

with :

include '../config.php';
include $CFG->dirroot.'/lib/graphlib.php';

You don't need this assignment in Moodle :

$chart->parameter['path_to_fonts'] = 'fonts/'; // path to where fonts are stored

This is handled properly by Moodle modifications of the class for the current language.