|
1 | 1 | <?php
|
2 | 2 | /* For licensing terms, see /license.txt */
|
| 3 | + |
| 4 | +use ChamiloSession as Session; |
| 5 | + |
3 | 6 | /**
|
4 | 7 | * Exercise list: This script shows the list of exercises for administrators and students.
|
5 | 8 | * @package chamilo.exercise
|
6 | 9 | * @author hubert.borderiou
|
7 | 10 | *
|
8 | 11 | */
|
9 | 12 |
|
10 |
| -use ChamiloSession as Session; |
11 |
| - |
12 |
| -// including the global library |
13 | 13 | require_once '../inc/global.inc.php';
|
14 | 14 |
|
15 | 15 | // Setting the tabs
|
16 | 16 | $this_section = SECTION_COURSES;
|
17 |
| - |
18 | 17 | $htmlHeadXtra[] = api_get_jqgrid_js();
|
| 18 | +$_course = api_get_course_info(); |
19 | 19 |
|
20 | 20 | // Access control
|
21 | 21 | api_protect_course_script(true, false, true);
|
22 | 22 |
|
23 | 23 | // including additional libraries
|
24 | 24 | require_once 'hotpotatoes.lib.php';
|
25 | 25 |
|
26 |
| - |
27 | 26 | // document path
|
28 | 27 | $documentPath = api_get_path(SYS_COURSE_PATH).$_course['path']."/document";
|
29 | 28 |
|
|
37 | 36 | $TBL_LP_ITEM_VIEW = Database :: get_course_table(TABLE_LP_ITEM_VIEW);
|
38 | 37 |
|
39 | 38 | $course_id = api_get_course_int_id();
|
40 |
| -$hotpotatoes_path = isset($_REQUEST['path']) ? $_REQUEST['path'] : null; |
| 39 | +$hotpotatoes_path = isset($_REQUEST['path']) ? Security::remove_XSS($_REQUEST['path']) : null; |
41 | 40 | $filter_user = isset($_REQUEST['filter_by_user']) ? intval($_REQUEST['filter_by_user']) : null;
|
42 | 41 |
|
43 | 42 | if (empty($hotpotatoes_path)) {
|
|
73 | 72 | if ($is_allowedToEdit && $origin != 'learnpath') {
|
74 | 73 | // the form
|
75 | 74 | if (api_is_platform_admin() || api_is_course_admin() || api_is_course_tutor() || api_is_course_coach()) {
|
76 |
| - $actions .= '<a id="export_opener" href="'.api_get_self().'?export_report=1&path='.Security::remove_XSS($hotpotatoes_path).' ">'.Display::return_icon('save.png', get_lang('Export'),'',ICON_SIZE_MEDIUM).'</a>'; |
| 75 | + $actions .= '<a id="export_opener" href="'.api_get_self().'?export_report=1&path='.$hotpotatoes_path.' ">'. |
| 76 | + Display::return_icon('save.png', get_lang('Export'),'',ICON_SIZE_MEDIUM).'</a>'; |
77 | 77 | }
|
78 | 78 | } else {
|
79 |
| - $actions .= '<a href="exercise.php">' . Display :: return_icon('back.png', get_lang('GoBackToQuestionList'),'',ICON_SIZE_MEDIUM).'</a>'; |
| 79 | + $actions .= '<a href="exercise.php">' . |
| 80 | + Display :: return_icon('back.png', get_lang('GoBackToQuestionList'),'',ICON_SIZE_MEDIUM).'</a>'; |
80 | 81 | }
|
81 | 82 |
|
82 | 83 | if ($is_allowedToEdit) {
|
|
0 commit comments