renderer.php 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628
  1. <?php
  2. // This file is part of Moodle - http://moodle.org/
  3. //
  4. // Moodle is free software: you can redistribute it and/or modify
  5. // it under the terms of the GNU General Public License as published by
  6. // the Free Software Foundation, either version 3 of the License, or
  7. // (at your option) any later version.
  8. //
  9. // Moodle is distributed in the hope that it will be useful,
  10. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. // GNU General Public License for more details.
  13. //
  14. // You should have received a copy of the GNU General Public License
  15. // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
  16. /**
  17. * Competence Graph
  18. *
  19. * Competence graph format allows the visualization of courses with competencies in a graph.
  20. * In the course structure, teacher associates activities to competencies. Each course module
  21. * can have restrictions between them, so a module is opened only when the student accomplish
  22. * its requirements. In student visualization, the structure of the course is presented as a
  23. * graph. In such graph, each node is a resource available to the student that can be handled.
  24. * Subgraphs in the main graph represent competences. As students can have different paths in
  25. * the course, the plugin registers all the steps that a student produces.
  26. *
  27. * @package course/format
  28. * @subpackage competencegraph
  29. * @version 0.1
  30. * @author Laboratório de Informática na Educação <http://www.usp.br/line>
  31. * @link http://www.usp.br/line/competencegraph
  32. * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
  33. */
  34. defined('MOODLE_INTERNAL') || die();
  35. use core_competency\course_competency;
  36. use core_competency\api;
  37. use core_competency\course_module_competency;
  38. require_once($CFG->dirroot . '/course/format/renderer.php');
  39. require_once($CFG->dirroot . '/course/format/competencegraph/lib.php');
  40. class format_competencegraph_renderer extends format_section_renderer_base {
  41. public function __construct(moodle_page $page, $target) {
  42. parent::__construct($page, $target);
  43. global $PAGE;
  44. //$this->courserenderer = $PAGE->get_renderer('core','course');
  45. $this->courseformat = course_get_format($page->course); // Needed for collapsed topics settings retrieval.
  46. $page->set_other_editing_capability('moodle/course:setcurrentsection');
  47. $this->userisediting = $page->user_is_editing();
  48. $this->rtl = right_to_left();
  49. if (strcmp($page->theme->name, 'boost') === 0) {
  50. $this->bsnewgrid = true;
  51. } else if (!empty($page->theme->parents)) {
  52. if (in_array('boost', $page->theme->parents) === true) {
  53. $this->bsnewgrid = true;
  54. }
  55. }
  56. }
  57. protected function start_section_list() {
  58. if ($this->bsnewgrid) {
  59. return html_writer::start_tag('ul', array('class' => 'ctopics bsnewgrid'));
  60. } else {
  61. return html_writer::start_tag('ul', array('class' => 'ctopics'));
  62. }
  63. }
  64. protected function end_section_list() {
  65. return html_writer::end_tag('ul');
  66. }
  67. protected function page_title() {
  68. return get_string('sectionname', 'format_competencegrah');
  69. }
  70. public function set_portable($portable) {
  71. switch ($portable) {
  72. case 1:
  73. $this->mobiletheme = true;
  74. break;
  75. case 2:
  76. $this->tablettheme = true;
  77. break;
  78. default:
  79. $this->mobiletheme = false;
  80. $this->tablettheme = false;
  81. break;
  82. }
  83. }
  84. public function print_graph_teacher_view($course, $sections, $mods, $modnames, $modnamesused) {
  85. $context = context_course::instance($course->id);
  86. if (has_capability('moodle/course:update', $context)) {
  87. $maintabs = array(
  88. new tabobject( 'tab_list', '?id='.$course->id.'&format=list', get_string('listview', 'format_competencegraph'), get_string('listview', 'format_competencegraph') ),
  89. new tabobject( 'tab_graph', '?id='.$course->id.'&format=graph', get_string('graphview', 'format_competencegraph'), get_string('graphview', 'format_competencegraph') )
  90. );
  91. $active = 'tab_graph';
  92. print_tabs( array($maintabs), $active );
  93. echo $this->get_js_dependencies_sigma_graph();
  94. $this->print_test_graph($course, $sections, $mods, $modnames, $modnamesused);
  95. }
  96. }
  97. public function print_nodes_graph($course, $sections, $mods, $modnames, $modnamesused) {
  98. $context = context_course::instance($course->id);
  99. $colors = ['#617db4', '#668f3c', '#c6583e', '#b956af', '#fcba03', '#03fcf0', '#fc0339', '#a6ffc8', '#000000'];
  100. if (has_capability('moodle/course:update', $context)) {
  101. // Print the competencies as name section:
  102. $list_competencies = course_competency::list_course_competencies($course->id);
  103. $all_mod_info_printed = array();
  104. $modinfo = get_fast_modinfo($course);
  105. $count = 0;
  106. foreach ($list_competencies as $competence) {
  107. $idcompetence = $competence->get('competencyid');
  108. api::read_competency($idcompetence)->get('shortname');
  109. $list_modules = course_module_competency::list_course_modules($idcompetence, $course->id);
  110. foreach ($list_modules as $item) {
  111. array_push($all_mod_info_printed, $item);
  112. }
  113. foreach ($list_modules as $modnumber) {
  114. $mod = $modinfo->cms[$modnumber];
  115. echo "g.nodes.push({
  116. id: 'n".($mod->id . $count)."',
  117. label: '".$mod->name."',
  118. x: Math.random(),
  119. y: Math.random(),
  120. size: 1,
  121. color: '".$colors[$count]."'
  122. });\n";
  123. }
  124. $count++;
  125. }
  126. $list_mod_without_competences = array();
  127. foreach ($modinfo->cms as $tempmod) {
  128. if (!in_array($tempmod->id, $all_mod_info_printed)) {
  129. array_push($list_mod_without_competences, $tempmod->id);
  130. }
  131. }
  132. }
  133. }
  134. public function print_multiple_section_page($course, $sections, $mods, $modnames, $modnamesused) {
  135. $context = context_course::instance($course->id);
  136. global $OUTPUT;
  137. if (has_capability('moodle/course:update', $context)) {
  138. echo $this->get_css_list_teacher();
  139. //$this->print_modules_page_teacher_list($course, $sections, $mods, $modnames, $modnamesused);
  140. $modinfo = get_fast_modinfo($course);
  141. $course = $this->courseformat->get_course();
  142. $context = context_course::instance($course->id);
  143. $sections = $modinfo->get_section_info_all();
  144. // General section if non-empty.
  145. $thissection = $sections[0];
  146. if ($thissection->summary or ! empty($modinfo->sections[0]) or $this->userisediting) {
  147. print('<div class="tohidden firstitem">');
  148. echo $this->section_header($thissection, $course, false, 0);
  149. print('</div>');
  150. echo $this->courserenderer->course_section_add_cm_control($course, $thissection->section, 0);
  151. }
  152. $maintabs = array(
  153. new tabobject( 'tab_list', '?id='.$course->id.'&format=list', get_string('listview', 'format_competencegraph'), get_string('listview', 'format_competencegraph') ),
  154. new tabobject( 'tab_graph', '?id='.$course->id.'&format=graph', get_string('graphview', 'format_competencegraph'), get_string('graphview', 'format_competencegraph') )
  155. );
  156. $active = 'tab_list';
  157. print_tabs( array($maintabs), $active );
  158. // Print the competencies as name section:
  159. $list_competencies = course_competency::list_course_competencies($course->id);
  160. if (count($list_competencies) < 1) {
  161. echo '<div class="coursewithoutcompetence"> <i class="fa fa-exclamation-triangle" aria-hidden="true"></i>' . get_string('coursewithoutcompetence', 'format_competencegraph') . '</div>';
  162. }
  163. $all_mod_info_printed = array();
  164. foreach ($list_competencies as $competence) {
  165. $idcompetence = $competence->get('competencyid');
  166. echo '<h4 class="sectionname"><span><a href="#">' . api::read_competency($idcompetence)->get('shortname') . '</a></span></h4>';
  167. $list_modules = course_module_competency::list_course_modules($idcompetence, $course->id);
  168. if (!$list_modules || count($list_modules) < 1) {
  169. echo '<div class="emptycompetence"><i class="fa fa-info-circle" aria-hidden="true"></i>' . get_string('emptycompetence', 'format_competencegraph') . "</div>";
  170. }
  171. echo $this->course_section_cm_list($course, null, 0, array(), $list_modules);
  172. foreach ($list_modules as $item) {
  173. array_push($all_mod_info_printed, $item);
  174. }
  175. }
  176. $list_mod_without_competences = array();
  177. foreach ($modinfo->cms as $tempmod) {
  178. if (!in_array($tempmod->id, $all_mod_info_printed)) {
  179. array_push($list_mod_without_competences, $tempmod->id);
  180. }
  181. }
  182. if (count($list_mod_without_competences) > 0) {
  183. echo '<h4 class="withoutcompetence"><span><a href="#">' . get_string('itemswithoutcompetence', 'format_competencegraph') . '</a></span></h4>';
  184. echo $this->course_section_cm_list($course, null, 0, array(), $list_mod_without_competences);
  185. }
  186. $sections = $modinfo->get_section_info_all();
  187. // General section if non-empty.
  188. $thissection = $sections[0];
  189. if ($thissection->summary or ! empty($modinfo->sections[0]) or $this->userisediting) {
  190. print('<div class="tohidden">');
  191. echo $this->section_header($thissection, $course, false, 0);
  192. print('</div>');
  193. echo $this->courserenderer->course_section_add_cm_control($course, $thissection->section, 0);
  194. }
  195. }
  196. }
  197. public function course_section_cm_list($course, $section, $sectionreturn = null, $displayoptions = array(), $includeditems = array()) {
  198. global $USER;
  199. $output = '';
  200. $modinfo = get_fast_modinfo($course);
  201. $completioninfo = new completion_info($course);
  202. // check if we are currently in the process of moving a module with JavaScript disabled
  203. $ismoving = $this->page->user_is_editing() && ismoving($course->id);
  204. if ($ismoving) {
  205. $movingpix = new pix_icon('movehere', get_string('movehere'), 'moodle', array('class' => 'movetarget'));
  206. $strmovefull = strip_tags(get_string("movefull", "", "'$USER->activitycopyname'"));
  207. }
  208. // Get the list of modules visible to user (excluding the module being moved if there is one)
  209. $moduleshtml = array();
  210. foreach ($includeditems as $modnumber) {
  211. $mod = $modinfo->cms[$modnumber];
  212. if ($mod->availability)
  213. echo $modnumber . ':: ';
  214. print_r($mod->availability);
  215. if ($ismoving and $mod->id == $USER->activitycopy) {
  216. // do not display moving mod
  217. continue;
  218. }
  219. if ($modulehtml = $this->courserenderer->course_section_cm_list_item($course,
  220. $completioninfo, $mod, $sectionreturn, $displayoptions)) {
  221. $moduleshtml[$modnumber] = $modulehtml;
  222. }
  223. }
  224. $sectionoutput = '';
  225. if (!empty($moduleshtml) || $ismoving) {
  226. foreach ($moduleshtml as $modnumber => $modulehtml) {
  227. if ($ismoving) {
  228. $movingurl = new moodle_url('/course/mod.php', array('moveto' => $modnumber, 'sesskey' => sesskey()));
  229. $sectionoutput .= html_writer::tag('li',
  230. html_writer::link($movingurl, $this->output->render($movingpix), array('title' => $strmovefull)),
  231. array('class' => 'movehere'));
  232. }
  233. $sectionoutput .= $modulehtml;
  234. }
  235. if ($ismoving) {
  236. $movingurl = new moodle_url('/course/mod.php', array('movetosection' => $section->id, 'sesskey' => sesskey()));
  237. $sectionoutput .= html_writer::tag('li',
  238. html_writer::link($movingurl, $this->output->render($movingpix), array('title' => $strmovefull)),
  239. array('class' => 'movehere'));
  240. }
  241. }
  242. // Always output the section module list.
  243. $output .= html_writer::tag('ul', $sectionoutput, array('class' => 'section img-text'));
  244. return $output;
  245. }
  246. public function print_modules_page_teacher_list($course, $sections, $mods, $modnames, $modnamesused) {
  247. $modinfo = get_fast_modinfo($course);
  248. $course = $this->courseformat->get_course();
  249. $context = context_course::instance($course->id);
  250. //echo $this->start_section_list();
  251. $sections = $modinfo->get_section_info_all();
  252. // General section if non-empty.
  253. $thissection = $sections[0];
  254. if ($thissection->summary or ! empty($modinfo->sections[0]) or $this->userisediting) {
  255. echo $this->section_header($thissection, $course, false, 0);
  256. //echo $this->course_section_cm_list($course, $thissection, 0);
  257. echo $this->courserenderer->course_section_add_cm_control($course, $thissection->section, 0);
  258. }
  259. $coursenumsections = $this->courseformat->get_last_section_number();
  260. if ($coursenumsections > 0) {
  261. $sectiondisplayarray = array();
  262. $currentsectionfirst = false;
  263. if ((!$this->userisediting)) {
  264. $currentsectionfirst = true;
  265. }
  266. if (($this->userisediting)) {
  267. $section = 1;
  268. } else {
  269. $timenow = time();
  270. $weekofseconds = 604800;
  271. $course->enddate = $course->startdate + ($weekofseconds * $coursenumsections);
  272. $section = $coursenumsections;
  273. $weekdate = $course->enddate; // This should be 0:00 Monday of that week.
  274. $weekdate -= 7200; // Subtract two hours to avoid possible DST problems.
  275. }
  276. $numsections = $coursenumsections; // Because we want to manipulate this for column breakpoints.
  277. if (($this->userisediting == false)) {
  278. $loopsection = 1;
  279. $numsections = 0;
  280. while ($loopsection <= $coursenumsections) {
  281. $nextweekdate = $weekdate - ($weekofseconds);
  282. if ((($thissection->uservisible ||
  283. ($thissection->visible && !$thissection->available && !empty($thissection->availableinfo))) &&
  284. ($nextweekdate <= $timenow)) == true) {
  285. $numsections++; // Section not shown so do not count in columns calculation.
  286. }
  287. $weekdate = $nextweekdate;
  288. $section--;
  289. $loopsection++;
  290. }
  291. // Reset.
  292. $section = $coursenumsections;
  293. $weekdate = $course->enddate; // This should be 0:00 Monday of that week.
  294. $weekdate -= 7200; // Subtract two hours to avoid possible DST problems.
  295. }
  296. echo $this->end_section_list();
  297. $loopsection = 1;
  298. $breaking = false; // Once the first section is shown we can decide if we break on another column.
  299. while ($loopsection <= $coursenumsections) {
  300. $thissection = $modinfo->get_section_info($section);
  301. /* Show the section if the user is permitted to access it, OR if it's not available
  302. but there is some available info text which explains the reason & should display. */
  303. if (($this->userisediting)) {
  304. $showsection = $thissection->uservisible ||
  305. ($thissection->visible && !$thissection->available && !empty($thissection->availableinfo));
  306. } else {
  307. $showsection = ($thissection->uservisible ||
  308. ($thissection->visible && !$thissection->available && !empty($thissection->availableinfo))) &&
  309. ($nextweekdate <= $timenow);
  310. }
  311. if (($currentsectionfirst == true) && ($showsection == true)) {
  312. // Show the section if we were meant to and it is the current section:....
  313. $showsection = ($course->marker == $section);
  314. }
  315. if (!$showsection) {
  316. // Hidden section message is overridden by 'unavailable' control.
  317. $testhidden = false;
  318. if ($testhidden) {
  319. if (!$course->hiddensections && $thissection->available) {
  320. $thissection->ishidden = true;
  321. $sectiondisplayarray[] = $thissection;
  322. }
  323. }
  324. } else {
  325. $thissection->isshown = true;
  326. $sectiondisplayarray[] = $thissection;
  327. }
  328. if (($this->userisediting)) {
  329. $section++;
  330. } else {
  331. $section--;
  332. if (($this->userisediting == false)) {
  333. $weekdate = $nextweekdate;
  334. }
  335. }
  336. $loopsection++;
  337. if (($currentsectionfirst == true) && ($loopsection > $coursenumsections)) {
  338. // Now show the rest.
  339. $currentsectionfirst = false;
  340. $loopsection = 1;
  341. $section = 1;
  342. }
  343. if ($section > $coursenumsections) {
  344. // Activities inside this section are 'orphaned', this section will be printed as 'stealth' below.
  345. break;
  346. }
  347. }
  348. foreach ($sectiondisplayarray as $thissection) {
  349. if (!empty($thissection->ishidden)) {
  350. echo $this->section_hidden($thissection);
  351. } else if (!empty($thissection->issummary)) {
  352. echo $this->section_summary($thissection, $course, null);
  353. } else if (!empty($thissection->isshown)) {
  354. //echo $this->section_header($thissection, $course, false, 0);
  355. if ($thissection->uservisible) {
  356. //echo $this->course_section_cm_list($course, $thissection, 0);
  357. //echo $this->courserenderer->course_section_add_cm_control($course, $thissection->section, 0);
  358. }
  359. echo html_writer::end_tag('div');
  360. }
  361. unset($sections[$thissection->section]);
  362. }
  363. }
  364. }
  365. private function get_css_list_teacher() {
  366. $style = "<style>";
  367. $style .= ".sectionname, .withoutcompetence {
  368. border-top: 1px solid #cfdacf;
  369. margin-top: 1em;
  370. padding-top: .3em;
  371. }
  372. .emptycompetence {
  373. margin-left: 1.5em;
  374. opacity: .8;
  375. }
  376. .emptycompetence i {
  377. margin-right: .5em;
  378. }
  379. .tohidden .right.side {
  380. display: none;
  381. }
  382. .tohidden li {
  383. list-style-type: none;
  384. }
  385. .coursewithoutcompetence {
  386. border: 1px solid gray;
  387. padding: 1em;
  388. border-radius: .5em;
  389. margin: 1em;
  390. color: #c63100;
  391. }
  392. .coursewithoutcompetence i {
  393. opacity: .8;
  394. margin-right: .5em;
  395. }
  396. .firstitem .section-modchooser-link {
  397. float: right;
  398. }";
  399. return $style . "</style>";
  400. }
  401. private function print_test_graph($course, $sections, $mods, $modnames, $modnamesused) {
  402. echo '<div id="container">
  403. <style>
  404. #graph-container {
  405. top: 0;
  406. bottom: 0;
  407. left: 0;
  408. right: 0;
  409. position: absolute;
  410. }
  411. </style>
  412. <div id="graph-container"></div>
  413. </div>';
  414. echo "<script>
  415. // generate a random graph
  416. var i,
  417. s,
  418. img,
  419. N = 10,
  420. E = 50,
  421. g = {
  422. nodes: [],
  423. edges: []
  424. },
  425. colors = [
  426. '#617db4',
  427. '#668f3c',
  428. '#c6583e',
  429. '#b956af'
  430. ];";
  431. $this->print_nodes_graph($course, $sections, $mods, $modnames, $modnamesused);
  432. echo "
  433. /*for (i = 0; i < E; i++) {
  434. g.edges.push({
  435. id: 'e' + i,
  436. source: 'n' + (Math.random() * N | 0),
  437. target: 'n' + (Math.random() * N | 0),
  438. type: ['arrow'][0],
  439. size: 1,
  440. color: '#bdbdbd'
  441. });
  442. }*/
  443. s = new sigma({
  444. graph: g,
  445. renderer: {
  446. // IMPORTANT:
  447. // This works only with the canvas renderer, so the
  448. // renderer type set as canvas is necessary here.
  449. container: document.getElementById('graph-container'),
  450. type: 'canvas'
  451. },
  452. settings: {
  453. minNodeSize: 1,
  454. maxNodeSize: 10,
  455. minEdgeSize: 0.1,
  456. maxEdgeSize: 2,
  457. enableEdgeHovering: true,
  458. edgeHoverSizeRatio: 2
  459. }
  460. });
  461. </script>
  462. ";
  463. }
  464. private function get_js_dependencies_sigma_graph() {
  465. global $CFG;
  466. $dirjs = $CFG->wwwroot . '/course/format/competencegraph/js/sigma';
  467. $o = '<script src="'.$dirjs.'/src/sigma.core.js"></script>
  468. <script src="'.$dirjs.'/src/conrad.js"></script>
  469. <script src="'.$dirjs.'/src/utils/sigma.utils.js"></script>
  470. <script src="'.$dirjs.'/src/utils/sigma.polyfills.js"></script>
  471. <script src="'.$dirjs.'/src/sigma.settings.js"></script>
  472. <script src="'.$dirjs.'/src/classes/sigma.classes.dispatcher.js"></script>
  473. <script src="'.$dirjs.'/src/classes/sigma.classes.configurable.js"></script>
  474. <script src="'.$dirjs.'/src/classes/sigma.classes.graph.js"></script>
  475. <script src="'.$dirjs.'/src/classes/sigma.classes.camera.js"></script>
  476. <script src="'.$dirjs.'/src/classes/sigma.classes.quad.js"></script>
  477. <script src="'.$dirjs.'/src/classes/sigma.classes.edgequad.js"></script>
  478. <script src="'.$dirjs.'/src/captors/sigma.captors.mouse.js"></script>
  479. <script src="'.$dirjs.'/src/captors/sigma.captors.touch.js"></script>
  480. <script src="'.$dirjs.'/src/renderers/sigma.renderers.canvas.js"></script>
  481. <script src="'.$dirjs.'/src/renderers/sigma.renderers.webgl.js"></script>
  482. <script src="'.$dirjs.'/src/renderers/sigma.renderers.svg.js"></script>
  483. <script src="'.$dirjs.'/src/renderers/sigma.renderers.def.js"></script>
  484. <script src="'.$dirjs.'/src/renderers/webgl/sigma.webgl.nodes.def.js"></script>
  485. <script src="'.$dirjs.'/src/renderers/webgl/sigma.webgl.nodes.fast.js"></script>
  486. <script src="'.$dirjs.'/src/renderers/webgl/sigma.webgl.edges.def.js"></script>
  487. <script src="'.$dirjs.'/src/renderers/webgl/sigma.webgl.edges.fast.js"></script>
  488. <script src="'.$dirjs.'/src/renderers/webgl/sigma.webgl.edges.arrow.js"></script>
  489. <script src="'.$dirjs.'/src/renderers/canvas/sigma.canvas.labels.def.js"></script>
  490. <script src="'.$dirjs.'/src/renderers/canvas/sigma.canvas.hovers.def.js"></script>
  491. <script src="'.$dirjs.'/src/renderers/canvas/sigma.canvas.nodes.def.js"></script>
  492. <script src="'.$dirjs.'/src/renderers/canvas/sigma.canvas.edges.def.js"></script>
  493. <script src="'.$dirjs.'/src/renderers/canvas/sigma.canvas.edges.curve.js"></script>
  494. <script src="'.$dirjs.'/src/renderers/canvas/sigma.canvas.edges.arrow.js"></script>
  495. <script src="'.$dirjs.'/src/renderers/canvas/sigma.canvas.edges.curvedArrow.js"></script>
  496. <script src="'.$dirjs.'/src/renderers/canvas/sigma.canvas.edgehovers.def.js"></script>
  497. <script src="'.$dirjs.'/src/renderers/canvas/sigma.canvas.edgehovers.curve.js"></script>
  498. <script src="'.$dirjs.'/src/renderers/canvas/sigma.canvas.edgehovers.arrow.js"></script>
  499. <script src="'.$dirjs.'/src/renderers/canvas/sigma.canvas.edgehovers.curvedArrow.js"></script>
  500. <script src="'.$dirjs.'/src/renderers/canvas/sigma.canvas.extremities.def.js"></script>
  501. <script src="'.$dirjs.'/src/renderers/svg/sigma.svg.utils.js"></script>
  502. <script src="'.$dirjs.'/src/renderers/svg/sigma.svg.nodes.def.js"></script>
  503. <script src="'.$dirjs.'/src/renderers/svg/sigma.svg.edges.def.js"></script>
  504. <script src="'.$dirjs.'/src/renderers/svg/sigma.svg.edges.curve.js"></script>
  505. <script src="'.$dirjs.'/src/renderers/svg/sigma.svg.labels.def.js"></script>
  506. <script src="'.$dirjs.'/src/renderers/svg/sigma.svg.hovers.def.js"></script>
  507. <script src="'.$dirjs.'/src/middlewares/sigma.middlewares.rescale.js"></script>
  508. <script src="'.$dirjs.'/src/middlewares/sigma.middlewares.copy.js"></script>
  509. <script src="'.$dirjs.'/src/misc/sigma.misc.animation.js"></script>
  510. <script src="'.$dirjs.'/src/misc/sigma.misc.bindEvents.js"></script>
  511. <script src="'.$dirjs.'/src/misc/sigma.misc.bindDOMEvents.js"></script>
  512. <script src="'.$dirjs.'/src/misc/sigma.misc.drawHovers.js"></script>
  513. <!-- END SIGMA IMPORTS -->
  514. <script src="'.$dirjs.'/sigma.renderers.customEdgeShapes/sigma.canvas.edges.dashed.js"></script>
  515. <script src="'.$dirjs.'/sigma.renderers.customEdgeShapes/sigma.canvas.edges.dotted.js"></script>
  516. <script src="'.$dirjs.'/sigma.renderers.customEdgeShapes/sigma.canvas.edges.parallel.js"></script>
  517. <script src="'.$dirjs.'/sigma.renderers.customEdgeShapes/sigma.canvas.edges.tapered.js"></script>
  518. <script src="'.$dirjs.'/sigma.renderers.customEdgeShapes/sigma.canvas.edgehovers.dashed.js"></script>
  519. <script src="'.$dirjs.'/sigma.renderers.customEdgeShapes/sigma.canvas.edgehovers.dotted.js"></script>
  520. <script src="'.$dirjs.'/sigma.renderers.customEdgeShapes/sigma.canvas.edgehovers.parallel.js"></script>
  521. <script src="'.$dirjs.'/sigma.renderers.customEdgeShapes/sigma.canvas.edgehovers.tapered.js"></script>';
  522. return $o;
  523. }
  524. }