ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilStudyProgrammeSettings Class Reference
+ Collaboration diagram for ilStudyProgrammeSettings:

Public Member Functions

 __construct (int $a_id, protected ilStudyProgrammeTypeSettings $type_settings, protected ilStudyProgrammeAssessmentSettings $assessment_settings, protected ilStudyProgrammeDeadlineSettings $deadline_settings, protected ilStudyProgrammeValidityOfAchievedQualificationSettings $validity_of_qualification_settings, protected ilStudyProgrammeAutoMailSettings $automail_settings)
 
 getObjId ()
 Get the id of the study program. More...
 
 withObjId (int $obj_id)
 
 getLastChange ()
 Get the timestamp of the last change on this program or a sub program. More...
 
 updateLastChange ()
 Update the last change timestamp to the current time. More...
 
 setLastChange (DateTime $a_timestamp)
 Set the last change timestamp to the given time. More...
 
 setLPMode (int $a_mode)
 Set the lp mode. More...
 
 getLPMode ()
 Get the lp mode. More...
 
 getTypeSettings ()
 
 withTypeSettings (ilStudyProgrammeTypeSettings $type_settings)
 
 getAssessmentSettings ()
 
 withAssessmentSettings (ilStudyProgrammeAssessmentSettings $assessment_settings)
 
 getDeadlineSettings ()
 
 withDeadlineSettings (ilStudyProgrammeDeadlineSettings $deadline_settings)
 
 getValidityOfQualificationSettings ()
 
 withValidityOfQualificationSettings (ilStudyProgrammeValidityOfAchievedQualificationSettings $validity_of_qualification_settings)
 
 validationExpires ()
 
 getAutoMailSettings ()
 
 withAutoMailSettings (ilStudyProgrammeAutoMailSettings $automail_settings)
 

Data Fields

const MODE_UNDEFINED = 0
 
const MODE_POINTS = 1
 
const MODE_LP_COMPLETED = 2
 
const STATUS_DRAFT = 10
 
const STATUS_ACTIVE = 20
 
const STATUS_OUTDATED = 30
 
const NO_RESTART = -1
 
const NO_VALIDITY_OF_QUALIFICATION_PERIOD = -1
 
const NO_DEADLINE = -1
 
const DEFAULT_POINTS = 100
 
const DEFAULT_SUBTYPE = 0
 
const DATE_TIME_FORMAT = 'Y-m-d H:i:s'
 
const DATE_FORMAT = 'Y-m-d'
 

Static Public Attributes

static array $MODES
 

Protected Attributes

int $obj_id
 Id of this study program and the corresponding ILIAS-object as well. More...
 
string $last_change
 Timestamp of the moment the last change was made on this object or any object in the subtree of the program. More...
 
int $lp_mode
 Mode the calculation of the learning progress on this node is run in. More...
 
bool $access_ctrl_positions
 Is the access control governed by positions? More...
 

Detailed Description

Definition at line 21 of file class.ilStudyProgrammeSettings.php.

Constructor & Destructor Documentation

◆ __construct()

ilStudyProgrammeSettings::__construct ( int  $a_id,
protected ilStudyProgrammeTypeSettings  $type_settings,
protected ilStudyProgrammeAssessmentSettings  $assessment_settings,
protected ilStudyProgrammeDeadlineSettings  $deadline_settings,
protected ilStudyProgrammeValidityOfAchievedQualificationSettings  $validity_of_qualification_settings,
protected ilStudyProgrammeAutoMailSettings  $automail_settings 
)

Definition at line 88 of file class.ilStudyProgrammeSettings.php.

95 {
96 $this->obj_id = $a_id;
97 $this->type_settings = $type_settings;
98 $this->assessment_settings = $assessment_settings;
99 $this->deadline_settings = $deadline_settings;
100 $this->validity_of_qualification_settings = $validity_of_qualification_settings;
101 $this->automail_settings = $automail_settings;
102 }

Member Function Documentation

◆ getAssessmentSettings()

ilStudyProgrammeSettings::getAssessmentSettings ( )

Definition at line 188 of file class.ilStudyProgrammeSettings.php.

Referenced by ilStudyProgrammeSettingsDBRepository\update().

+ Here is the caller graph for this function:

◆ getAutoMailSettings()

ilStudyProgrammeSettings::getAutoMailSettings ( )

Definition at line 234 of file class.ilStudyProgrammeSettings.php.

Referenced by ilStudyProgrammeSettingsDBRepository\update().

+ Here is the caller graph for this function:

◆ getDeadlineSettings()

ilStudyProgrammeSettings::getDeadlineSettings ( )

Definition at line 202 of file class.ilStudyProgrammeSettings.php.

Referenced by ilStudyProgrammeSettingsDBRepository\update().

+ Here is the caller graph for this function:

◆ getLastChange()

ilStudyProgrammeSettings::getLastChange ( )

Get the timestamp of the last change on this program or a sub program.

Definition at line 122 of file class.ilStudyProgrammeSettings.php.

122 : DateTime
123 {
124 return DateTime::createFromFormat(self::DATE_TIME_FORMAT, $this->last_change);
125 }

Referenced by ilStudyProgrammeSettingsTest\testPRGSettingsLPMode(), and ilStudyProgrammeSettingsDBRepository\update().

+ Here is the caller graph for this function:

◆ getLPMode()

ilStudyProgrammeSettings::getLPMode ( )

Get the lp mode.

Returns
int one of self::$MODES

Definition at line 171 of file class.ilStudyProgrammeSettings.php.

171 : int
172 {
173 return $this->lp_mode;
174 }
int $lp_mode
Mode the calculation of the learning progress on this node is run in.

References $lp_mode.

Referenced by ilStudyProgrammeSettingsDBRepository\update().

+ Here is the caller graph for this function:

◆ getObjId()

ilStudyProgrammeSettings::getObjId ( )

Get the id of the study program.

Definition at line 107 of file class.ilStudyProgrammeSettings.php.

107 : int
108 {
109 return $this->obj_id;
110 }
int $obj_id
Id of this study program and the corresponding ILIAS-object as well.

References $obj_id.

Referenced by ilStudyProgrammeTypeDBRepository\getStudyProgrammeIdsByTypeId(), ilStudyProgrammeSettingsDBRepository\update(), and ilObjStudyProgramme\updateSettings().

+ Here is the caller graph for this function:

◆ getTypeSettings()

ilStudyProgrammeSettings::getTypeSettings ( )

Definition at line 176 of file class.ilStudyProgrammeSettings.php.

177 {
178 return $this->type_settings;
179 }

Referenced by ilStudyProgrammeSettingsDBRepository\update().

+ Here is the caller graph for this function:

◆ getValidityOfQualificationSettings()

ilStudyProgrammeSettings::getValidityOfQualificationSettings ( )

Definition at line 215 of file class.ilStudyProgrammeSettings.php.

Referenced by ilStudyProgrammeSettingsDBRepository\update().

+ Here is the caller graph for this function:

◆ setLastChange()

ilStudyProgrammeSettings::setLastChange ( DateTime  $a_timestamp)

Set the last change timestamp to the given time.

Throws when given time is smaller than current timestamp since that is logically impossible.

Definition at line 142 of file class.ilStudyProgrammeSettings.php.

143 {
144 $this->last_change = $a_timestamp->format(self::DATE_TIME_FORMAT);
145 return $this;
146 }

Referenced by ilStudyProgrammeSettingsTest\testPRGSettingsLPMode(), and updateLastChange().

+ Here is the caller graph for this function:

◆ setLPMode()

ilStudyProgrammeSettings::setLPMode ( int  $a_mode)

Set the lp mode.

Throws when program is not in draft status.

Parameters
integer$a_mode- one of self::$MODES

Definition at line 155 of file class.ilStudyProgrammeSettings.php.

156 {
157 if (!in_array($a_mode, self::$MODES)) {
158 throw new ilException("ilStudyProgramme::setLPMode: No lp mode: "
159 . "'$a_mode'");
160 }
161 $this->lp_mode = $a_mode;
162 $this->updateLastChange();
163 return $this;
164 }
Base class for ILIAS Exception handling.
updateLastChange()
Update the last change timestamp to the current time.

References updateLastChange().

Referenced by ilStudyProgrammeSettingsTest\testPRGSettingsLPMode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateLastChange()

ilStudyProgrammeSettings::updateLastChange ( )

Update the last change timestamp to the current time.

Definition at line 130 of file class.ilStudyProgrammeSettings.php.

131 {
132 $this->setLastChange(new DateTime());
133 return $this;
134 }
setLastChange(DateTime $a_timestamp)
Set the last change timestamp to the given time.

References setLastChange().

Referenced by setLPMode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ validationExpires()

ilStudyProgrammeSettings::validationExpires ( )

Definition at line 228 of file class.ilStudyProgrammeSettings.php.

228 : bool
229 {
230 return !is_null($this->getValidityOfQualificationSettings()->getQualificationDate()) ||
232 }

◆ withAssessmentSettings()

ilStudyProgrammeSettings::withAssessmentSettings ( ilStudyProgrammeAssessmentSettings  $assessment_settings)

Definition at line 193 of file class.ilStudyProgrammeSettings.php.

196 $clone = clone $this;
197 $clone->assessment_settings = $assessment_settings;
198 $clone->updateLastChange();
199 return $clone;
200 }

◆ withAutoMailSettings()

ilStudyProgrammeSettings::withAutoMailSettings ( ilStudyProgrammeAutoMailSettings  $automail_settings)

Definition at line 239 of file class.ilStudyProgrammeSettings.php.

242 $clone = clone $this;
243 $clone->automail_settings = $automail_settings;
244 return $clone;
245 }

◆ withDeadlineSettings()

ilStudyProgrammeSettings::withDeadlineSettings ( ilStudyProgrammeDeadlineSettings  $deadline_settings)

Definition at line 207 of file class.ilStudyProgrammeSettings.php.

210 $clone = clone $this;
211 $clone->deadline_settings = $deadline_settings;
212 return $clone;
213 }

◆ withObjId()

ilStudyProgrammeSettings::withObjId ( int  $obj_id)

Definition at line 112 of file class.ilStudyProgrammeSettings.php.

112 : self
113 {
114 $clone = clone $this;
115 $clone->obj_id = $obj_id;
116 return $clone;
117 }

References $obj_id.

◆ withTypeSettings()

ilStudyProgrammeSettings::withTypeSettings ( ilStudyProgrammeTypeSettings  $type_settings)

Definition at line 181 of file class.ilStudyProgrammeSettings.php.

182 {
183 $clone = clone $this;
184 $clone->type_settings = $type_settings;
185 return $clone;
186 }

◆ withValidityOfQualificationSettings()

ilStudyProgrammeSettings::withValidityOfQualificationSettings ( ilStudyProgrammeValidityOfAchievedQualificationSettings  $validity_of_qualification_settings)

Definition at line 220 of file class.ilStudyProgrammeSettings.php.

223 $clone = clone $this;
224 $clone->validity_of_qualification_settings = $validity_of_qualification_settings;
225 return $clone;
226 }

Field Documentation

◆ $access_ctrl_positions

bool ilStudyProgrammeSettings::$access_ctrl_positions
protected

Is the access control governed by positions?

Definition at line 86 of file class.ilStudyProgrammeSettings.php.

◆ $last_change

string ilStudyProgrammeSettings::$last_change
protected

Timestamp of the moment the last change was made on this object or any object in the subtree of the program.

Definition at line 76 of file class.ilStudyProgrammeSettings.php.

◆ $lp_mode

int ilStudyProgrammeSettings::$lp_mode
protected

Mode the calculation of the learning progress on this node is run in.

Definition at line 81 of file class.ilStudyProgrammeSettings.php.

Referenced by getLPMode().

◆ $MODES

◆ $obj_id

int ilStudyProgrammeSettings::$obj_id
protected

Id of this study program and the corresponding ILIAS-object as well.

Definition at line 70 of file class.ilStudyProgrammeSettings.php.

Referenced by getObjId(), and withObjId().

◆ DATE_FORMAT

const ilStudyProgrammeSettings::DATE_FORMAT = 'Y-m-d'

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

◆ DATE_TIME_FORMAT

◆ DEFAULT_POINTS

◆ DEFAULT_SUBTYPE

◆ MODE_LP_COMPLETED

◆ MODE_POINTS

◆ MODE_UNDEFINED

◆ NO_DEADLINE

const ilStudyProgrammeSettings::NO_DEADLINE = -1

◆ NO_RESTART

◆ NO_VALIDITY_OF_QUALIFICATION_PERIOD

◆ STATUS_ACTIVE

◆ STATUS_DRAFT

◆ STATUS_OUTDATED


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