ILIAS  release_8 Revision v8.23
ilExcIndividualDeadline Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Collaboration diagram for ilExcIndividualDeadline:

Public Member Functions

 setStartingTimestamp (int $a_val)
 
 getStartingTimestamp ()
 
 setIndividualDeadline (int $a_val)
 
 getIndividualDeadline ()
 
 read ()
 
 save ()
 
 delete ()
 

Static Public Member Functions

static getInstance (int $a_ass_id, int $a_participant_id, bool $a_is_team=false)
 
static getStartingTimestamps (int $a_ass_id)
 Get starting timestamp data for an assignment. More...
 

Protected Member Functions

 __construct (int $a_ass_id, int $a_participant_id, bool $a_is_team)
 

Protected Attributes

int $participant_id
 
bool $is_team
 
int $ass_id
 
ilDBInterface $db
 
int $starting_timestamp = 0
 
int $individual_deadline = 0
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Individual deadlines

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

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

Constructor & Destructor Documentation

◆ __construct()

ilExcIndividualDeadline::__construct ( int  $a_ass_id,
int  $a_participant_id,
bool  $a_is_team 
)
protected

Definition at line 33 of file class.ilExcIndividualDeadline.php.

References $DIC, and read().

37  {
38  global $DIC;
39  $this->participant_id = $a_participant_id;
40  $this->is_team = $a_is_team;
41  $this->ass_id = $a_ass_id;
42  $this->db = $DIC->database();
43  $this->read();
44  }
global $DIC
Definition: feed.php:28
+ Here is the call graph for this function:

Member Function Documentation

◆ delete()

ilExcIndividualDeadline::delete ( )

Definition at line 108 of file class.ilExcIndividualDeadline.php.

References $db, and $ilDB.

108  : void
109  {
110  $ilDB = $this->db;
111 
112  $ilDB->manipulate(
113  "DELETE FROM exc_idl " .
114  " WHERE ass_id = " . $this->db->quote($this->ass_id, "integer") .
115  " AND member_id = " . $this->db->quote($this->participant_id, "integer") .
116  " AND is_team = " . $this->db->quote($this->is_team, "integer")
117  );
118  }

◆ getIndividualDeadline()

ilExcIndividualDeadline::getIndividualDeadline ( )

Definition at line 69 of file class.ilExcIndividualDeadline.php.

References $individual_deadline.

Referenced by save().

69  : int
70  {
72  }
+ Here is the caller graph for this function:

◆ getInstance()

static ilExcIndividualDeadline::getInstance ( int  $a_ass_id,
int  $a_participant_id,
bool  $a_is_team = false 
)
static

Definition at line 46 of file class.ilExcIndividualDeadline.php.

Referenced by ilExAssignmentTeam\adoptTeams(), ilExerciseMembers\deassignMember(), ilExcAssMemberState\getInstanceByIds(), ilExAssignmentTeam\getTeamId(), and ilExAssignment\setIndividualDeadline().

51  return new self($a_ass_id, $a_participant_id, $a_is_team);
52  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the caller graph for this function:

◆ getStartingTimestamp()

ilExcIndividualDeadline::getStartingTimestamp ( )

Definition at line 59 of file class.ilExcIndividualDeadline.php.

References $starting_timestamp.

Referenced by save().

59  : int
60  {
62  }
+ Here is the caller graph for this function:

◆ getStartingTimestamps()

static ilExcIndividualDeadline::getStartingTimestamps ( int  $a_ass_id)
static

Get starting timestamp data for an assignment.

This is mainly used by ilExAssignment to determine the calculated deadlines

Parameters
int$a_ass_id
Returns
array

Definition at line 127 of file class.ilExcIndividualDeadline.php.

References $DIC, $ilDB, and $res.

Referenced by ilExAssignment\getCalculatedDeadlines().

127  : array
128  {
129  global $DIC;
130 
131  $ilDB = $DIC->database();
132  $res = array();
133 
134  $set = $ilDB->query("SELECT * FROM exc_idl" .
135  " WHERE ass_id = " . $ilDB->quote($a_ass_id, "integer"));
136  while ($row = $ilDB->fetchAssoc($set)) {
137  $res[] = array("member_id" => $row["member_id"],
138  "is_team" => $row["is_team"],
139  "starting_ts" => $row["starting_ts"]);
140  }
141 
142  return $res;
143  }
$res
Definition: ltiservices.php:69
global $DIC
Definition: feed.php:28
+ Here is the caller graph for this function:

◆ read()

ilExcIndividualDeadline::read ( )

Definition at line 74 of file class.ilExcIndividualDeadline.php.

References $db, $ilDB, setIndividualDeadline(), and setStartingTimestamp().

Referenced by __construct().

74  : void
75  {
76  $ilDB = $this->db;
77 
78  $set = $ilDB->query(
79  "SELECT * FROM exc_idl " .
80  " WHERE ass_id = " . $this->db->quote($this->ass_id, "integer") .
81  " AND member_id = " . $this->db->quote($this->participant_id, "integer") .
82  " AND is_team = " . $this->db->quote($this->is_team, "integer")
83  );
84  if ($rec = $this->db->fetchAssoc($set)) {
85  $this->setIndividualDeadline((int) $rec["tstamp"]);
86  $this->setStartingTimestamp((int) $rec["starting_ts"]);
87  }
88  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ save()

ilExcIndividualDeadline::save ( )

Definition at line 90 of file class.ilExcIndividualDeadline.php.

References $db, $ilDB, getIndividualDeadline(), and getStartingTimestamp().

90  : void
91  {
92  $ilDB = $this->db;
93 
94  $ilDB->replace(
95  "exc_idl",
96  array(
97  "ass_id" => array("integer", $this->ass_id),
98  "member_id" => array("integer", $this->participant_id),
99  "is_team" => array("integer", $this->is_team)
100  ),
101  array(
102  "tstamp" => array("integer", $this->getIndividualDeadline()),
103  "starting_ts" => array("integer", $this->getStartingTimestamp())
104  )
105  );
106  }
+ Here is the call graph for this function:

◆ setIndividualDeadline()

ilExcIndividualDeadline::setIndividualDeadline ( int  $a_val)

Definition at line 64 of file class.ilExcIndividualDeadline.php.

Referenced by read().

64  : void
65  {
66  $this->individual_deadline = $a_val;
67  }
+ Here is the caller graph for this function:

◆ setStartingTimestamp()

ilExcIndividualDeadline::setStartingTimestamp ( int  $a_val)

Definition at line 54 of file class.ilExcIndividualDeadline.php.

Referenced by read().

54  : void
55  {
56  $this->starting_timestamp = $a_val;
57  }
+ Here is the caller graph for this function:

Field Documentation

◆ $ass_id

int ilExcIndividualDeadline::$ass_id
protected

Definition at line 28 of file class.ilExcIndividualDeadline.php.

◆ $db

ilDBInterface ilExcIndividualDeadline::$db
protected

Definition at line 29 of file class.ilExcIndividualDeadline.php.

Referenced by delete(), read(), and save().

◆ $individual_deadline

int ilExcIndividualDeadline::$individual_deadline = 0
protected

Definition at line 31 of file class.ilExcIndividualDeadline.php.

Referenced by getIndividualDeadline().

◆ $is_team

bool ilExcIndividualDeadline::$is_team
protected

Definition at line 27 of file class.ilExcIndividualDeadline.php.

◆ $participant_id

int ilExcIndividualDeadline::$participant_id
protected

Definition at line 26 of file class.ilExcIndividualDeadline.php.

◆ $starting_timestamp

int ilExcIndividualDeadline::$starting_timestamp = 0
protected

Definition at line 30 of file class.ilExcIndividualDeadline.php.

Referenced by getStartingTimestamp().


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