ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
ilStudyProgrammeSettings 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 ilStudyProgrammeSettings:

Public Member Functions

 __construct (int $a_id, ilStudyProgrammeTypeSettings $type_settings, ilStudyProgrammeAssessmentSettings $assessment_settings, ilStudyProgrammeDeadlineSettings $deadline_settings, ilStudyProgrammeValidityOfAchievedQualificationSettings $validity_of_qualification_settings, ilStudyProgrammeAutoMailSettings $automail_settings)
 
 getObjId ()
 Get the id of the study program. More...
 
 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...
 
ilStudyProgrammeTypeSettings $type_settings
 
ilStudyProgrammeAssessmentSettings $assessment_settings
 
ilStudyProgrammeDeadlineSettings $deadline_settings
 
ilStudyProgrammeValidityOfAchievedQualificationSettings $validity_of_qualification_settings
 
ilStudyProgrammeAutoMailSettings $automail_settings
 

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

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

Constructor & Destructor Documentation

◆ __construct()

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

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

References $assessment_settings, $automail_settings, $deadline_settings, $type_settings, and $validity_of_qualification_settings.

101  {
102  $this->obj_id = $a_id;
103  $this->type_settings = $type_settings;
104  $this->assessment_settings = $assessment_settings;
105  $this->deadline_settings = $deadline_settings;
106  $this->validity_of_qualification_settings = $validity_of_qualification_settings;
107  $this->automail_settings = $automail_settings;
108  }
ilStudyProgrammeTypeSettings $type_settings
ilStudyProgrammeAutoMailSettings $automail_settings
ilStudyProgrammeDeadlineSettings $deadline_settings
ilStudyProgrammeValidityOfAchievedQualificationSettings $validity_of_qualification_settings
ilStudyProgrammeAssessmentSettings $assessment_settings

Member Function Documentation

◆ getAssessmentSettings()

ilStudyProgrammeSettings::getAssessmentSettings ( )

◆ getAutoMailSettings()

ilStudyProgrammeSettings::getAutoMailSettings ( )

◆ getDeadlineSettings()

ilStudyProgrammeSettings::getDeadlineSettings ( )

◆ getLastChange()

ilStudyProgrammeSettings::getLastChange ( )

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

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

Referenced by ilStudyProgrammeSettingsDBRepository\update().

121  : DateTime
122  {
123  return DateTime::createFromFormat(self::DATE_TIME_FORMAT, $this->last_change);
124  }
+ Here is the caller graph for this function:

◆ getLPMode()

ilStudyProgrammeSettings::getLPMode ( )

Get the lp mode.

Returns
int one of self::$MODES

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

References $lp_mode.

Referenced by ilStudyProgrammeSettingsDBRepository\update().

170  : int
171  {
172  return $this->lp_mode;
173  }
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 113 of file class.ilStudyProgrammeSettings.php.

References $obj_id.

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

113  : int
114  {
115  return $this->obj_id;
116  }
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 ( )

◆ 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 141 of file class.ilStudyProgrammeSettings.php.

Referenced by updateLastChange().

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

◆ 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 154 of file class.ilStudyProgrammeSettings.php.

References updateLastChange().

155  {
156  if (!in_array($a_mode, self::$MODES)) {
157  throw new ilException("ilStudyProgramme::setLPMode: No lp mode: "
158  . "'$a_mode'");
159  }
160  $this->lp_mode = $a_mode;
161  $this->updateLastChange();
162  return $this;
163  }
updateLastChange()
Update the last change timestamp to the current time.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ updateLastChange()

ilStudyProgrammeSettings::updateLastChange ( )

Update the last change timestamp to the current time.

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

References setLastChange().

Referenced by setLPMode().

130  {
131  $this->setLastChange(new DateTime());
132  return $this;
133  }
setLastChange(DateTime $a_timestamp)
Set the last change timestamp to the given time.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ validationExpires()

ilStudyProgrammeSettings::validationExpires ( )

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

References getValidityOfQualificationSettings().

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

◆ withAssessmentSettings()

ilStudyProgrammeSettings::withAssessmentSettings ( ilStudyProgrammeAssessmentSettings  $assessment_settings)

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

References $assessment_settings.

195  $clone = clone $this;
196  $clone->assessment_settings = $assessment_settings;
197  $clone->updateLastChange();
198  return $clone;
199  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilStudyProgrammeAssessmentSettings $assessment_settings

◆ withAutoMailSettings()

ilStudyProgrammeSettings::withAutoMailSettings ( ilStudyProgrammeAutoMailSettings  $automail_settings)

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

References $automail_settings.

241  $clone = clone $this;
242  $clone->automail_settings = $automail_settings;
243  return $clone;
244  }
ilStudyProgrammeAutoMailSettings $automail_settings
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ withDeadlineSettings()

ilStudyProgrammeSettings::withDeadlineSettings ( ilStudyProgrammeDeadlineSettings  $deadline_settings)

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

References $deadline_settings.

209  $clone = clone $this;
210  $clone->deadline_settings = $deadline_settings;
211  return $clone;
212  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilStudyProgrammeDeadlineSettings $deadline_settings

◆ withTypeSettings()

ilStudyProgrammeSettings::withTypeSettings ( ilStudyProgrammeTypeSettings  $type_settings)

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

References $type_settings.

181  {
182  $clone = clone $this;
183  $clone->type_settings = $type_settings;
184  return $clone;
185  }
ilStudyProgrammeTypeSettings $type_settings
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ withValidityOfQualificationSettings()

ilStudyProgrammeSettings::withValidityOfQualificationSettings ( ilStudyProgrammeValidityOfAchievedQualificationSettings  $validity_of_qualification_settings)

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

References $validity_of_qualification_settings.

222  $clone = clone $this;
223  $clone->validity_of_qualification_settings = $validity_of_qualification_settings;
224  return $clone;
225  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilStudyProgrammeValidityOfAchievedQualificationSettings $validity_of_qualification_settings

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.

◆ $assessment_settings

ilStudyProgrammeAssessmentSettings ilStudyProgrammeSettings::$assessment_settings
protected

◆ $automail_settings

ilStudyProgrammeAutoMailSettings ilStudyProgrammeSettings::$automail_settings
protected

◆ $deadline_settings

ilStudyProgrammeDeadlineSettings ilStudyProgrammeSettings::$deadline_settings
protected

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

◆ $type_settings

ilStudyProgrammeTypeSettings ilStudyProgrammeSettings::$type_settings
protected

◆ $validity_of_qualification_settings

ilStudyProgrammeValidityOfAchievedQualificationSettings ilStudyProgrammeSettings::$validity_of_qualification_settings
protected

◆ DATE_FORMAT

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

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

◆ DATE_TIME_FORMAT

const ilStudyProgrammeSettings::DATE_TIME_FORMAT = 'Y-m-d H:i:s'

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