-
Notifications
You must be signed in to change notification settings - Fork 0
/
details.php
40 lines (33 loc) · 1.27 KB
/
details.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
<?php
/**
*
* @package mahara
* @subpackage artefact-learning
* @author Gregor Anzelj
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL
* @copyright (C) 2013-2022 Gregor Anzelj <[email protected]>
*
*/
define('INTERNAL', 1);
define('MENUITEM', 'create/learning');
define('SECTION_PLUGINTYPE', 'artefact');
define('SECTION_PLUGINNAME', 'learning');
define('SECTION_PAGE', 'details');
require(dirname(dirname(dirname(__FILE__))) . '/init.php');
safe_require('artefact', 'learning');
define('TITLE', get_string('learningdetails','artefact.learning'));
$id = param_integer('id');
$learning = new ArtefactTypeLearning($id);
if (!$USER->can_edit_artefact($learning)) {
throw new AccessDeniedException(get_string('accessdenied', 'error'));
}
$learning->files = ArtefactTypeLearning::get_stage_attachments($id);
$smarty = smarty(array('paginator', 'expandable'));
setpageicon($smarty, 'icon-graduation-cap');
$smarty->assign('learning', $learning);
$smarty->assign('id', $learning->get('id'));
$smarty->assign('description', $learning->get('description'));
$smarty->assign('tags', $learning->get('tags'));
$smarty->assign('owner', $learning->get('owner'));
$smarty->assign('PAGEHEADING', $learning->get('title'));
$smarty->display('artefact:learning:details.tpl');