ILIAS
eassessment Revision 61809
◀ ilDoc Overview
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
Examples
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Groups
Pages
class.ilObjExerciseAccess.php
Go to the documentation of this file.
1
<?php
2
/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4
include_once(
"classes/class.ilObjectAccess.php"
);
5
15
class
ilObjExerciseAccess
extends
ilObjectAccess
16
{
17
30
function
_getCommands
()
31
{
32
$commands = array
33
(
34
array(
"permission"
=>
"read"
,
"cmd"
=>
"showOverview"
,
"lang_var"
=>
"show"
,
35
"default"
=>
true
),
36
array(
"permission"
=>
"write"
,
"cmd"
=>
"edit"
,
"lang_var"
=>
"edit"
)
37
);
38
39
return
$commands;
40
}
41
42
function
_lookupRemainingWorkingTimeString
($a_obj_id)
43
{
44
global
$ilDB
,
$lng
;
45
46
$q =
"SELECT time_stamp FROM exc_data WHERE obj_id = "
.
47
$ilDB->quote($a_obj_id,
"integer"
);
48
$set = $ilDB->query($q);
49
$rec = $ilDB->fetchAssoc($set);
50
51
if
($rec[
"time_stamp"
] - time() <= 0)
52
{
53
$time_str = $lng->txt(
"exc_time_over_short"
);
54
}
55
else
56
{
57
$time_diff =
ilUtil::int2array
($rec[
"time_stamp"
] - time(), null);
58
$time_str =
ilUtil::timearray2string
($time_diff);
59
}
60
return
$time_str;
61
}
62
66
function
_checkGoto
($a_target)
67
{
68
global $ilAccess;
69
70
$t_arr = explode(
"_"
, $a_target);
71
72
if
($t_arr[0] !=
"exc"
|| ((
int
) $t_arr[1]) <= 0)
73
{
74
return
false
;
75
}
76
77
if
($ilAccess->checkAccess(
"read"
,
""
, $t_arr[1]))
78
{
79
return
true
;
80
}
81
return
false
;
82
}
83
}
84
85
?>
Modules
Exercise
classes
class.ilObjExerciseAccess.php
Generated on Mon Apr 25 2016 19:01:09 for ILIAS by
1.8.1.2 (using
Doxyfile
)