ILIAS
release_8 Revision v8.19
◀ 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
n
o
p
r
s
t
u
v
w
x
+
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
j
l
m
p
s
t
u
+
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
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
g
h
i
m
n
p
r
s
t
u
v
x
+
Variables
$
a
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Modules
Pages
class.ilBlogExercise.php
Go to the documentation of this file.
1
<?php
2
23
class
ilBlogExercise
24
{
25
protected
ilObjUser
$user
;
26
protected
int
$node_id
;
27
protected
ilTree
$tree
;
28
29
public
function
__construct
(
30
int
$a_node_id
31
) {
32
global
$DIC
;
33
34
$this->tree = $DIC->repositoryTree();
35
$this->
user
= $DIC->user();
36
$this->node_id = $a_node_id;
37
}
38
39
public
function
getAssignmentsOfBlog
(): array
40
{
41
$user =
$this->user
;
42
$node_id =
$this->node_id
;
43
$tree =
$this->tree
;
44
45
$assignments = [];
46
47
$exercises =
ilExSubmission::findUserFiles
($user->
getId
(),
$node_id
);
48
// #0022794
49
if
(count($exercises) === 0) {
50
$exercises =
ilExSubmission::findUserFiles
($user->
getId
(), $node_id .
".sec"
);
51
}
52
if
(count($exercises) === 0) {
53
$exercises =
ilExSubmission::findUserFiles
($user->
getId
(), $node_id .
".zip"
);
54
}
55
if
($exercises) {
56
foreach
($exercises as
$exercise
) {
57
// #9988
58
$active_ref =
false
;
59
foreach
(
ilObject::_getAllReferences
($exercise[
"obj_id"
]) as
$ref_id
) {
60
if
(!$tree->
isSaved
(
$ref_id
)) {
61
$active_ref =
true
;
62
break
;
63
}
64
}
65
if
($active_ref) {
66
$assignments[] = [
67
"exc_id"
=> $exercise[
"obj_id"
],
68
"ass_id"
=> $exercise[
"ass_id"
]
69
];
70
}
71
}
72
}
73
return
$assignments;
74
}
75
}
ilBlogExercise\$tree
ilTree $tree
Definition:
class.ilBlogExercise.php:27
ilTree
ilTree\isSaved
isSaved(int $a_node_id)
Use method isDeleted.
Definition:
class.ilTree.php:1409
ilObject\_getAllReferences
static _getAllReferences(int $id)
get all reference ids for object ID
Definition:
class.ilObject.php:816
ilBlogExercise
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition:
class.ilBlogExercise.php:23
ilBlogExercise\__construct
__construct(int $a_node_id)
Definition:
class.ilBlogExercise.php:29
ILIAS\Repository\user
user()
Definition:
trait.GlobalDICDomainServices.php:61
$DIC
global $DIC
Definition:
feed.php:28
ilObjUser
$ref_id
$ref_id
Definition:
ltiauth.php:67
ilObject\getId
getId()
Definition:
class.ilObject.php:270
ilBlogExercise\$node_id
int $node_id
Definition:
class.ilBlogExercise.php:26
$exercise
$exercise
Definition:
trait.ilExAssignmentTypeGUIBase.php:35
ilBlogExercise\getAssignmentsOfBlog
getAssignmentsOfBlog()
Definition:
class.ilBlogExercise.php:39
ilExSubmission\findUserFiles
static findUserFiles(int $a_user_id, string $a_filetitle)
Check if given file was assigned Used in Blog/Portfolio.
Definition:
class.ilExSubmission.php:623
ilBlogExercise\$user
ilObjUser $user
Definition:
class.ilBlogExercise.php:25
Modules
Blog
Exercise
class.ilBlogExercise.php
Generated on Tue Apr 1 2025 22:01:16 for ILIAS by
1.8.13 (using
Doxyfile
)