-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathview.php
More file actions
59 lines (48 loc) · 2.2 KB
/
view.php
File metadata and controls
59 lines (48 loc) · 2.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?php
// This file is part of the Moodle module "EJSApp booking system"
//
// EJSApp booking system is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// EJSApp booking system is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
//
// EJSApp booking system has been developed by:
// - Francisco José Calvillo Muñoz: fcalvillo9@alumno.uned.es
// - Luis de la Torre: ldelatorre@dia.uned.es
// - Ruben Heradio: rheradio@issi.uned.es
//
// at the Computer Science and Automatic Control, Spanish Open University
// (UNED), Madrid, Spain.
/**
* Prints a particular instance of ejsappbooking
*
* @package mod_ejsappbooking
* @copyright 2012 Francisco José Calvillo Muñoz, Luis de la Torre and Ruben Heradio
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
global $DB, $CFG, $USER, $PAGE, $OUTPUT;
require_once(dirname(dirname(dirname(__FILE__))) . '/config.php');
require_once(dirname(__FILE__) . '/lib.php');
require_once(dirname(__FILE__) . '/ejsappbooking_model.class.php');
require_once(dirname(__FILE__) . '/ejsappbooking_view.class.php');
require_once($CFG->dirroot . '/filter/multilang/filter.php');
require_once($CFG->dirroot . '/user/profile/lib.php'); // userprofile
$id = optional_param('id', 0, PARAM_INT); // We need course_module ID, or
$n = optional_param('n', 0, PARAM_INT); // ejsappbooking instance ID
$CFG->cachejs = false;
$PAGE->set_cacheable(false);
$model = new ejsappbooking_model($id, $n);
$view = new ejsappbooking_view(
$id, $model->get_mod_url(), $model->get_mod_name(), $model->get_course_name(),
$model->get_mod_intro(), $model->get_remlabs(), $model->get_practices($id),
$model->get_user_timezone_str(), $model->get_timezone_edit_url()
);
$view->render();