-
Notifications
You must be signed in to change notification settings - Fork 1
/
htmler.php
executable file
·51 lines (33 loc) · 1.32 KB
/
htmler.php
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
<?PHP // $Id: view.php,v 1.17 2005/08/25 19:33:12 skodak Exp $
require_once('../../config.php');
require_once('lib.php');
//die();
$id = required_param('id', PARAM_INT); // Course Module ID
// =========================================================================
// security checks START - teachers edit; students view
// =========================================================================
if (!$cm = get_record('course_modules', 'id', $id)) {
error('Course Module ID is incorrectss');
}
if (!$course = get_record('course', 'id', $cm->course)) {
error('Course is misconfigured');
}
if (!$book = get_record('hiperbook', 'id', $cm->instance)) {
error('Course module is incorrect');
}
$navigation = '<a href="../../course/view.php?id='.$course->id.'">'.$course->shortname.'</a> ->';
$strbooks = get_string('modulenameplural', 'hiperbook');
$strbook = get_string('modulename', 'hiperbook');
$strTOC = get_string('TOC', 'hiperbook');
print_header( "$course->shortname: $book->name",
$course->fullname,
"$navigation <a href=\"index.php?id=$course->id\">$strbooks</a> -> $book->name",
'',
'',
true,
$buttons,
navmenu($course, $cm)
);
hiperbook_to_html($cm->id);
print_footer($course);
?>