ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 ()
 
 setRequested (bool $a_val)
 
 getRequested ()
 
 read ()
 
 save ()
 
 delete ()
 

Static Public Member Functions

static getInstance (int $a_ass_id, int $a_participant_id, bool $a_is_team=false)
 
static deleteForAssignment (int $ass_id)
 
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

bool $requested = false
 
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 34 of file class.ilExcIndividualDeadline.php.

38 {
39 global $DIC;
40 $this->participant_id = $a_participant_id;
41 $this->is_team = $a_is_team;
42 $this->ass_id = $a_ass_id;
43 $this->db = $DIC->database();
44 $this->read();
45 }
global $DIC
Definition: shib_login.php:26

References $DIC, and read().

+ Here is the call graph for this function:

Member Function Documentation

◆ delete()

ilExcIndividualDeadline::delete ( )

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

121 : void
122 {
124
125 $ilDB->manipulate(
126 "DELETE FROM exc_idl " .
127 " WHERE ass_id = " . $this->db->quote($this->ass_id, "integer") .
128 " AND member_id = " . $this->db->quote($this->participant_id, "integer") .
129 " AND is_team = " . $this->db->quote($this->is_team, "integer")
130 );
131 }

References $ilDB.

◆ deleteForAssignment()

static ilExcIndividualDeadline::deleteForAssignment ( int  $ass_id)
static

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

133 : void
134 {
135 global $DIC;
136
137 $ilDB = $DIC->database();
138
139 $ilDB->manipulate(
140 "DELETE FROM exc_idl " .
141 " WHERE ass_id = " . $ilDB->quote($ass_id, "integer")
142 );
143 }

References $ass_id, $DIC, and $ilDB.

Referenced by ilExAssignment\delete().

+ Here is the caller graph for this function:

◆ getIndividualDeadline()

ilExcIndividualDeadline::getIndividualDeadline ( )

Definition at line 70 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 47 of file class.ilExcIndividualDeadline.php.

52 return new self($a_ass_id, $a_participant_id, $a_is_team);
53 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

Referenced by ilExerciseMembers\deassignMember(), ILIAS\Exercise\IndividualDeadline\IndividualDeadlineManager\deleteAllOfUserInExercise(), and ilExAssignmentTeam\getTeamId().

+ Here is the caller graph for this function:

◆ getRequested()

ilExcIndividualDeadline::getRequested ( )

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

80 : bool
81 {
82 return $this->requested;
83 }

◆ getStartingTimestamp()

ilExcIndividualDeadline::getStartingTimestamp ( )

Definition at line 60 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 152 of file class.ilExcIndividualDeadline.php.

152 : array
153 {
154 global $DIC;
155
156 $ilDB = $DIC->database();
157 $res = array();
158
159 $set = $ilDB->query("SELECT * FROM exc_idl" .
160 " WHERE ass_id = " . $ilDB->quote($a_ass_id, "integer"));
161 while ($row = $ilDB->fetchAssoc($set)) {
162 $res[] = array("member_id" => $row["member_id"],
163 "is_team" => $row["is_team"],
164 "starting_ts" => $row["starting_ts"]);
165 }
166
167 return $res;
168 }
$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 85 of file class.ilExcIndividualDeadline.php.

85 : void
86 {
88
89 $set = $ilDB->query(
90 "SELECT * FROM exc_idl " .
91 " WHERE ass_id = " . $this->db->quote($this->ass_id, "integer") .
92 " AND member_id = " . $this->db->quote($this->participant_id, "integer") .
93 " AND is_team = " . $this->db->quote($this->is_team, "integer")
94 );
95 if ($rec = $this->db->fetchAssoc($set)) {
96 $this->setIndividualDeadline((int) $rec["tstamp"]);
97 $this->setStartingTimestamp((int) $rec["starting_ts"]);
98 $this->setRequested((bool) $rec["requested"]);
99 }
100 }

References $ilDB.

Referenced by __construct().

+ Here is the caller graph for this function:

◆ save()

ilExcIndividualDeadline::save ( )

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

102 : void
103 {
105
106 $ilDB->replace(
107 "exc_idl",
108 array(
109 "ass_id" => array("integer", $this->ass_id),
110 "member_id" => array("integer", $this->participant_id),
111 "is_team" => array("integer", $this->is_team)
112 ),
113 array(
114 "tstamp" => array("integer", $this->getIndividualDeadline()),
115 "starting_ts" => array("integer", $this->getStartingTimestamp()),
116 "requested" => array("integer", (int) $this->getRequested())
117 )
118 );
119 }

References $ilDB.

◆ setIndividualDeadline()

ilExcIndividualDeadline::setIndividualDeadline ( int  $a_val)

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

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

◆ setRequested()

ilExcIndividualDeadline::setRequested ( bool  $a_val)

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

75 : void
76 {
77 $this->requested = $a_val;
78 }

◆ setStartingTimestamp()

ilExcIndividualDeadline::setStartingTimestamp ( int  $a_val)

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

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

Field Documentation

◆ $ass_id

int ilExcIndividualDeadline::$ass_id
protected

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

◆ $db

ilDBInterface ilExcIndividualDeadline::$db
protected

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

◆ $individual_deadline

int ilExcIndividualDeadline::$individual_deadline = 0
protected

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

◆ $is_team

bool ilExcIndividualDeadline::$is_team
protected

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

◆ $participant_id

int ilExcIndividualDeadline::$participant_id
protected

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

◆ $requested

bool ilExcIndividualDeadline::$requested = false
protected

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

◆ $starting_timestamp

int ilExcIndividualDeadline::$starting_timestamp = 0
protected

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


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