ILIAS  trunk Revision v11.0_alpha-1715-g7fc467680fb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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 ilObjStudyProgrammeSettingsGUI\buildFormElements(), and ilStudyProgrammeSettingsDBRepository\update().

189  {
190  return $this->assessment_settings;
191  }
+ Here is the caller graph for this function:

◆ getAutoMailSettings()

ilStudyProgrammeSettings::getAutoMailSettings ( )

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

Referenced by ilObjStudyProgrammeSettingsGUI\buildFormElements(), and ilStudyProgrammeSettingsDBRepository\update().

235  {
236  return $this->automail_settings;
237  }
+ Here is the caller graph for this function:

◆ getDeadlineSettings()

ilStudyProgrammeSettings::getDeadlineSettings ( )

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

Referenced by ilObjStudyProgrammeSettingsGUI\buildFormElements(), and ilStudyProgrammeSettingsDBRepository\update().

203  {
204  return $this->deadline_settings;
205  }
+ 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.

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

122  : DateTime
123  {
124  return DateTime::createFromFormat(self::DATE_TIME_FORMAT, $this->last_change);
125  }
+ 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.

References $lp_mode.

Referenced by ilStudyProgrammeSettingsDBRepository\update().

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

References $obj_id.

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

107  : int
108  {
109  return $this->obj_id;
110  }
int $obj_id
Id of this study program and the corresponding ILIAS-object as well.
+ Here is the caller graph for this function:

◆ getTypeSettings()

ilStudyProgrammeSettings::getTypeSettings ( )

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

Referenced by ilObjStudyProgrammeSettingsGUI\buildFormElements(), and ilStudyProgrammeSettingsDBRepository\update().

177  {
178  return $this->type_settings;
179  }
+ Here is the caller graph for this function:

◆ getValidityOfQualificationSettings()

ilStudyProgrammeSettings::getValidityOfQualificationSettings ( )

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

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

143  {
144  $this->last_change = $a_timestamp->format(self::DATE_TIME_FORMAT);
145  return $this;
146  }
+ 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.

References updateLastChange().

Referenced by ilStudyProgrammeSettingsTest\testPRGSettingsLPMode().

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  }
updateLastChange()
Update the last change timestamp to the current time.
+ 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.

References setLastChange().

Referenced by setLPMode().

131  {
132  $this->setLastChange(new DateTime());
133  return $this;
134  }
setLastChange(DateTime $a_timestamp)
Set the last change timestamp to the given time.
+ 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.

References getValidityOfQualificationSettings().

228  : bool
229  {
230  return !is_null($this->getValidityOfQualificationSettings()->getQualificationDate()) ||
231  $this->getValidityOfQualificationSettings()->getQualificationPeriod() !== self::NO_VALIDITY_OF_QUALIFICATION_PERIOD;
232  }
+ Here is the call graph for this function:

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

References $obj_id.

112  : self
113  {
114  $clone = clone $this;
115  $clone->obj_id = $obj_id;
116  return $clone;
117  }
int $obj_id
Id of this study program and the corresponding ILIAS-object as well.

◆ 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

array ilStudyProgrammeSettings::$MODES
static
Initial value:
= [
self::MODE_UNDEFINED,
self::MODE_POINTS,
self::MODE_LP_COMPLETED
]

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

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