|
19 | 19 | * @authors Rabea de Groot, Anna Heynkes, Friederike Schwager |
20 | 20 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
21 | 21 | */ |
| 22 | + |
| 23 | +use mod_pdfannotator\output\answermenu; |
| 24 | +use mod_pdfannotator\output\questionmenu; |
| 25 | +use mod_pdfannotator\output\reportmenu; |
| 26 | +use mod_pdfannotator\output\index; |
| 27 | + |
22 | 28 | defined('MOODLE_INTERNAL') || die; |
23 | 29 |
|
24 | 30 | require_once("$CFG->libdir/filelib.php"); |
|
35 | 41 | */ |
36 | 42 | function pdfannotator_display_embed($pdfannotator, $cm, $course, $file, $page = 1, $annoid = null, $commid = null) { |
37 | 43 | global $CFG, $PAGE, $OUTPUT, $USER; |
38 | | - require_once($CFG->dirroot . '/mod/pdfannotator/classes/output/index.php'); |
39 | 44 |
|
40 | 45 | // The revision attribute's existance is demanded by moodle for versioning and could be saved in the pdfannotator table in the future. |
41 | 46 | // Note, however, that we forbid file replacement in order to prevent a change of meaning in other people's comments. |
@@ -1575,7 +1580,6 @@ function pdfannotator_questionstable_add_row($thiscourse, $table, $question, $ur |
1575 | 1580 | $data = array($content, $author . '<br>' . $time, $question->votes, $question->answercount, $lastanswered, $pdfannotatorname); |
1576 | 1581 |
|
1577 | 1582 | if ($showdropdown) { |
1578 | | - require_once($CFG->dirroot . '/mod/pdfannotator/classes/output/questionmenu.php'); |
1579 | 1583 | $myrenderer = $PAGE->get_renderer('mod_pdfannotator'); |
1580 | 1584 | $dropdown = $myrenderer->render_dropdownmenu(new questionmenu($question->commentid, $urlparams)); |
1581 | 1585 | $data[] = $dropdown; |
@@ -1627,7 +1631,6 @@ function pdfannotator_answerstable_add_row($thiscourse, $table, $answer, $cmid, |
1627 | 1631 | $classname = 'dimmed_text'; |
1628 | 1632 | } |
1629 | 1633 |
|
1630 | | - require_once($CFG->dirroot . '/mod/pdfannotator/classes/output/answermenu.php'); |
1631 | 1634 | $myrenderer = $PAGE->get_renderer('mod_pdfannotator'); |
1632 | 1635 | $dropdown = $myrenderer->render_dropdownmenu(new answermenu($answer->annoid, $issubscribed, $cmid, $currentpage, $itemsperpage, $answerfilter)); |
1633 | 1636 |
|
@@ -1684,7 +1687,6 @@ function pdfannotator_reportstable_add_row($thiscourse, $table, $report, $cmid, |
1684 | 1687 | } |
1685 | 1688 |
|
1686 | 1689 | // Create action dropdown menu. |
1687 | | - require_once($CFG->dirroot . '/mod/pdfannotator/classes/output/reportmenu.php'); |
1688 | 1690 | $myrenderer = $PAGE->get_renderer('mod_pdfannotator'); |
1689 | 1691 | $dropdown = $myrenderer->render_dropdownmenu(new reportmenu($report, $cmid, $currentpage, $itemsperpage, $reportfilter)); |
1690 | 1692 |
|
|
0 commit comments