ILIAS
release_7 Revision v7.30-3-g800a261c036
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
l
m
p
r
s
t
w
+
Functions
_
a
b
c
f
g
h
i
r
s
t
w
+
Variables
$
c
d
e
f
g
h
j
l
m
p
s
t
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Files
File List
+
Globals
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Modules
Pages
class.ilExcSubmissionRepository.php
Go to the documentation of this file.
1
<?php
2
3
/* Copyright (c) 1998-2019 ILIAS open source, Extended GPL, see docs/LICENSE */
4
10
class
ilExcSubmissionRepository
implements
ilExcSubmissionRepositoryInterface
11
{
12
const
TABLE_NAME
=
"exc_returned"
;
13
17
protected
$db
;
18
23
public
function
__construct
(
ilDBInterface
$db
= null)
24
{
25
global
$DIC
;
26
27
$this->db = (is_null(
$db
))
28
? $DIC->database()
29
:
$db
;
30
}
31
35
public
function
getUserId
(
int
$submission_id) : int
36
{
37
$q =
"SELECT user_id FROM "
. self::TABLE_NAME .
38
" WHERE returned_id = "
. $this->db->quote($submission_id,
"integer"
);
39
$usr_set = $this->db->query($q);
40
return
$this->db->fetchAssoc($usr_set);
41
}
42
46
public
function
hasSubmissions
(
int
$ass_id) : int
47
{
48
$query
=
"SELECT * FROM "
. self::TABLE_NAME .
49
" WHERE ass_id = "
. $this->db->quote($ass_id,
"integer"
) .
50
" AND (filename IS NOT NULL OR atext IS NOT NULL)"
.
51
" AND ts IS NOT NULL"
;
52
$res
= $this->db->query(
$query
);
53
return
(
int
)
$res
->numRows(
$res
);
54
}
55
61
public
function
updateWebDirAccessTime
(
int
$assignment_id,
int
$member_id)
62
{
63
$this->db->manipulate(
"UPDATE "
. self::TABLE_NAME .
64
" SET web_dir_access_time = "
. $this->db->quote(
ilUtil::now
(),
"timestamp"
) .
65
" WHERE ass_id = "
. $this->db->quote($assignment_id,
"integer"
) .
66
" AND user_id = "
. $this->db->quote($member_id,
"integer"
));
67
}
68
}
ilExcSubmissionRepository\__construct
__construct(ilDBInterface $db=null)
ilExcSubmissionRepository constructor.
Definition:
class.ilExcSubmissionRepository.php:23
ilExcSubmissionRepository
Submission repository.
Definition:
class.ilExcSubmissionRepository.php:10
ilExcSubmissionRepository\TABLE_NAME
const TABLE_NAME
Definition:
class.ilExcSubmissionRepository.php:12
ilExcSubmissionRepository\hasSubmissions
hasSubmissions(int $ass_id)
Get number of submissions from assignment id.int
Definition:
class.ilExcSubmissionRepository.php:46
ilExcSubmissionRepository\getUserId
getUserId(int $submission_id)
Get User who submitted.int
Definition:
class.ilExcSubmissionRepository.php:35
ilUtil\now
static now()
Return current timestamp in Y-m-d H:i:s format.
Definition:
class.ilUtil.php:3916
ilExcSubmissionRepository\updateWebDirAccessTime
updateWebDirAccessTime(int $assignment_id, int $member_id)
Update web_dir_access_time.
Definition:
class.ilExcSubmissionRepository.php:61
$res
foreach($_POST as $key=> $value) $res
Definition:
save_question_post_data.php:15
$DIC
global $DIC
Definition:
goto.php:24
ilDBInterface
$query
$query
Definition:
proxy_ylocal.php:13
ilExcSubmissionRepositoryInterface
Submission repository Interface.
Definition:
class.ilExcSubmissionInterface.php:10
ilExcSubmissionRepository\$db
$db
Definition:
class.ilExcSubmissionRepository.php:17
Modules
Exercise
Submission
classes
class.ilExcSubmissionRepository.php
Generated on Mon Apr 7 2025 21:00:59 for ILIAS by
1.8.13 (using
Doxyfile
)