ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
ilBlogExercise Class Reference

Blog Exercise. More...

+ Collaboration diagram for ilBlogExercise:

Public Member Functions

 __construct ($a_node_id)
 
 getAssignmentsOfBlog ()
 

Protected Attributes

 $user
 
 $node_id
 
 $tree
 

Detailed Description

Blog Exercise.

Author
killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..com

Definition at line 10 of file class.ilBlogExercise.php.

Constructor & Destructor Documentation

◆ __construct()

ilBlogExercise::__construct (   $a_node_id)

Definition at line 24 of file class.ilBlogExercise.php.

References $DIC, and user().

25  {
26  global $DIC;
27 
28  $this->tree = $DIC->repositoryTree();
29  $this->user = $DIC->user();
30  $this->node_id = $a_node_id;
31  }
user()
Definition: user.php:4
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:

Member Function Documentation

◆ getAssignmentsOfBlog()

ilBlogExercise::getAssignmentsOfBlog ( )
Returns
array

Definition at line 36 of file class.ilBlogExercise.php.

References $exercise, $node_id, $tree, $user, ilObject\_getAllReferences(), and ilExSubmission\findUserFiles().

37  {
41 
42  $assignments = [];
43 
44  $exercises = ilExSubmission::findUserFiles($user->getId(), $node_id);
45  // #0022794
46  if (!$exercises) {
47  $exercises = ilExSubmission::findUserFiles($user->getId(), $node_id . ".sec");
48  }
49  if ($exercises) {
50  foreach ($exercises as $exercise) {
51  // #9988
52  $active_ref = false;
53  foreach (ilObject::_getAllReferences($exercise["obj_id"]) as $ref_id) {
54  if (!$tree->isSaved($ref_id)) {
55  $active_ref = true;
56  break;
57  }
58  }
59  if ($active_ref) {
60  $assignments[] = [
61  "exc_id" => $exercise["obj_id"],
62  "ass_id" => $exercise["ass_id"]
63  ];
64  }
65  }
66  }
67  return $assignments;
68  }
static _getAllReferences($a_id)
get all reference ids of object
static findUserFiles($a_user_id, $a_filetitle)
Check if given file was assigned.
+ Here is the call graph for this function:

Field Documentation

◆ $node_id

ilBlogExercise::$node_id
protected

Definition at line 17 of file class.ilBlogExercise.php.

Referenced by getAssignmentsOfBlog().

◆ $tree

ilBlogExercise::$tree
protected

Definition at line 22 of file class.ilBlogExercise.php.

Referenced by getAssignmentsOfBlog().

◆ $user

ilBlogExercise::$user
protected

Definition at line 15 of file class.ilBlogExercise.php.

Referenced by getAssignmentsOfBlog().


The documentation for this class was generated from the following file: