ILIAS
Release_4_4_x_branch Revision 61816
◀ 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(
"./Services/Object/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"
=>
"listAssignments"
,
"lang_var"
=>
"edit_assignments"
),
37
array(
"permission"
=>
"write"
,
"cmd"
=>
"edit"
,
"lang_var"
=>
"settings"
)
38
);
39
40
return
$commands;
41
}
42
43
function
_lookupRemainingWorkingTimeString
($a_obj_id)
44
{
45
global $ilDB,
$lng
;
46
47
$q =
"SELECT MIN(time_stamp) mtime, COUNT(*) cnt FROM exc_assignment WHERE exc_id = "
.
48
$ilDB->quote($a_obj_id,
"integer"
).
49
" AND time_stamp > "
.$ilDB->quote(time(),
"integer"
);
50
$set = $ilDB->query($q);
51
$rec = $ilDB->fetchAssoc($set);
52
53
if
($rec[
"mtime"
] > 0)
54
{
55
$time_diff =
ilUtil::int2array
($rec[
"mtime"
] - time(), null);
56
$rec[
"mtime"
] =
ilUtil::timearray2string
($time_diff);
57
}
58
return
$rec;
59
}
60
64
function
_checkGoto
($a_target)
65
{
66
global $ilAccess;
67
68
$t_arr = explode(
"_"
, $a_target);
69
70
if
($t_arr[0] !=
"exc"
|| ((
int
) $t_arr[1]) <= 0)
71
{
72
return
false
;
73
}
74
75
if
($ilAccess->checkAccess(
"read"
,
""
, $t_arr[1]))
76
{
77
return
true
;
78
}
79
return
false
;
80
}
81
}
82
83
?>
Modules
Exercise
classes
class.ilObjExerciseAccess.php
Generated on Wed Apr 27 2016 20:01:13 for ILIAS by
1.8.1.2 (using
Doxyfile
)