5 require_once(dirname(__FILE__).
"/../../../../Services/ActiveRecord/class.ActiveRecord.php");
59 return "prg_settings";
149 if ($a_object->
getType() !=
"prg") {
150 throw new ilException(
"ilStudyProgramme::createSettingsForObject: " 151 .
"Object is no prg object.");
153 if(!$a_object->
getId()) {
154 throw new ilException(
"ilStudyProgramme::createSettingsForObject: " 155 .
"Object has no id.");
159 $prg->subtype_id = self::DEFAULT_SUBTYPE;
160 $prg->setObjId($a_object->
getId())
162 ->setLPMode(self::MODE_UNDEFINED)
163 ->setPoints(self::DEFAULT_POINTS)
170 $this->obj_id = $a_id;
231 throw new ilException(
"ilStudyProgramme::setLastChange: Given " 232 .
"timestamp is before current timestamp. That " 233 .
"is logically impossible.");
250 $a_points = (int)$a_points;
252 throw new ilException(
"ilStudyProgramme::setPoints: Points cannot " 253 .
"be smaller than zero.");
256 $this->points = $a_points;
279 $a_mode = (int)$a_mode;
280 if (!in_array($a_mode, self::$MODES)) {
281 throw new ilException(
"ilStudyProgramme::setLPMode: No lp mode: " 284 $this->lp_mode = $a_mode;
308 $a_status = (int)$a_status;
309 if (!in_array($a_status, self::$STATUS)) {
310 throw new ilException(
"ilStudyProgramme::setStatus: No lp mode: " 313 $this->status = $a_status;
setSubtypeId($subtype_id)
Sets the meta-data type id.
setStatus($a_status)
Set the status of the node.
Base class for ILIAS Exception handling.
Class ilObject Basic functions for all objects.
getLPMode()
Get the lp mode.
static _before(ilDateTime $start, ilDateTime $end, $a_compare_field='', $a_tz='')
compare two dates and check start is before end This method does not consider tz offsets.
updateLastChange()
Update the last change timestamp to the current time.
static now()
Return current timestamp in Y-m-d H:i:s format.
getObjId()
Get the id of the study program.
getId()
get object id public
getStatus()
Get the status.
static returnDbTableName()
getPoints()
Get the amount of points.
get($a_format, $a_format_str='', $a_tz='')
get formatted date
getType()
get object type public
Create styles array
The data for the language used.
static createForObject(ilObject $a_object)
Create new study program settings for an object.
setLastChange(ilDateTime $a_timestamp)
Set the last change timestamp to the given time.
getSubtypeId()
Return the meta-data subtype id.
getLastChange()
Get the timestamp of the last change on this program or a sub program.
setLPMode($a_mode)
Set the lp mode.
setPoints($a_points)
Set the amount of points.