ILIAS  release_8 Revision v8.24
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.

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

References $DIC, and read().

+ Here is the call graph for this function:

Member Function Documentation

◆ delete()

ilExcIndividualDeadline::delete ( )

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

108 : void
109 {
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 }

References $ilDB.

◆ getIndividualDeadline()

ilExcIndividualDeadline::getIndividualDeadline ( )

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

◆ 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.

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...

Referenced by ilExerciseMembers\deassignMember().

+ Here is the caller graph for this function:

◆ getStartingTimestamp()

ilExcIndividualDeadline::getStartingTimestamp ( )

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

◆ 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.

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

References $DIC, $ilDB, and $res.

Referenced by ilExAssignment\getCalculatedDeadlines().

+ Here is the caller graph for this function:

◆ read()

ilExcIndividualDeadline::read ( )

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

74 : void
75 {
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 }

References $ilDB.

Referenced by __construct().

+ Here is the caller graph for this function:

◆ save()

ilExcIndividualDeadline::save ( )

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

90 : void
91 {
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 }

References $ilDB.

◆ setIndividualDeadline()

ilExcIndividualDeadline::setIndividualDeadline ( int  $a_val)

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

64 : void
65 {
66 $this->individual_deadline = $a_val;
67 }

◆ setStartingTimestamp()

ilExcIndividualDeadline::setStartingTimestamp ( int  $a_val)

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

54 : void
55 {
56 $this->starting_timestamp = $a_val;
57 }

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.

◆ $individual_deadline

int ilExcIndividualDeadline::$individual_deadline = 0
protected

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

◆ $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.


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