forked from intelliboard/intelliboard
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.php
More file actions
70 lines (65 loc) · 2.36 KB
/
Copy pathconfig.php
File metadata and controls
70 lines (65 loc) · 2.36 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
60
61
62
63
64
65
66
67
68
69
70
<?php
// IntelliBoard.net
//
// IntelliBoard.net is built to work with any LMS designed in Moodle
// with the goal to deliver educational data analytics to single dashboard instantly.
// With power to turn this analytical data into simple and easy to read reports,
// IntelliBoard.net will become your primary reporting tool.
//
// Moodle
//
// Moodle 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.
//
// IntelliBoard.net is built as a local plugin for Moodle.
/**
* IntelliBoard.net
*
*
* @package intelliboard
* @copyright 2015 IntelliBoard, Inc
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @created by IntelliBoard, Inc
* @website www.intelliboard.net
*/
require('../../config.php');
require_once($CFG->libdir . '/filelib.php');
require_once($CFG->libdir.'/adminlib.php');
require('externallib.php');
require_login();
require_capability('local/intelliboard:view', context_system::instance());
admin_externalpage_setup('intelliboardsettings');
$reports = optional_param_array('report', array(), PARAM_INT);
if($reports){
set_config("reports", implode(",", $reports), "local_intelliboard");
}
$params = array(
'url'=>$CFG->wwwroot,
'email'=>$USER->email,
'firstname'=>$USER->firstname,
'lastname'=>$USER->lastname,
'reports'=>get_config('local_intelliboard', 'reports'),
'type'=>'settings',
'do'=>'reportslist'
);
$c = new curl;
$intelliboard = json_decode($c->post('https://intelliboard.net/dashboard/api', $params));
$PAGE->set_url(new moodle_url("/local/intelliboard/settings.php"));
$PAGE->set_pagelayout('report');
$PAGE->set_pagetype('settings');
$PAGE->set_context(context_system::instance());
$PAGE->set_title(get_string('intelliboardroot', 'local_intelliboard'));
$PAGE->set_heading(get_string('intelliboardroot', 'local_intelliboard'));
$PAGE->requires->css('/local/intelliboard/assets/css/style.css');
echo $OUTPUT->header();
?>
<div class="intelliboard-page">
<?php include("views/menu.php"); ?>
<div class="intelliboard-content"><?php echo $intelliboard->content; ?></div>
<a href="<?php echo $CFG->wwwroot; ?>/admin/settings.php?section=local_intelliboard">Advanced Setting</a>
<?php include("views/footer.php"); ?>
</div>
<?php
echo $OUTPUT->footer();