3 require_once
'Modules/IndividualAssessment/interfaces/Settings/interface.ilIndividualAssessmentSettingsStorage.php';
4 require_once
'Modules/IndividualAssessment/classes/Settings/class.ilIndividualAssessmentSettings.php';
5 require_once
'Modules/IndividualAssessment/classes/Settings/class.ilIndividualAssessmentInfoSettings.php';
6 require_once
'Modules/IndividualAssessment/classes/class.ilObjIndividualAssessment.php';
29 $values = array(
"obj_id" => array(
"integer", $settings->
getId())
30 ,
"content" => array(
"text", $settings->
content())
33 ,
"file_required" => array(
"integer", $settings->
fileRequired())
36 $this->db->insert(self::IASS_SETTINGS_TABLE,
$values);
38 $values = array(
"obj_id" => array(
"integer", $settings->
getId()));
39 $this->db->insert(self::IASS_SETTINGS_INFO_TABLE,
$values);
48 $obj_id = $obj->
getId();
49 assert(is_numeric($obj_id));
50 $sql =
"SELECT content, record_template, event_time_place_required, file_required\n" 51 .
" FROM " . self::IASS_SETTINGS_TABLE .
"\n" 52 .
" WHERE obj_id = " . $this->db->quote($obj_id,
'integer');
54 if (
$res = $this->db->fetchAssoc($this->db->query($sql))) {
58 $res[
"record_template"],
59 (
bool)
$res[
"event_time_place_required"],
60 (
bool) $res[
'file_required']
74 $where = array(
"obj_id" => array(
"integer", $settings->
getId()));
79 ,
"file_required" => array(
"integer", $settings->
fileRequired())
82 $this->db->update(self::IASS_SETTINGS_TABLE,
$values, $where);
94 $obj_id = $obj->
getId();
95 assert(is_numeric($obj_id));
96 $sql =
"SELECT contact, responsibility, phone, mails, consultation_hours" 97 .
" FROM " . self::IASS_SETTINGS_INFO_TABLE .
" WHERE obj_id = " . $this->db->quote($obj_id,
'integer');
99 if (
$res = $this->db->fetchAssoc($this->db->query($sql))) {
103 $res[
"responsibility"],
106 $res[
'consultation_hours']
122 $where = array(
"obj_id" => array(
"integer", $settings->
id()));
126 ,
"phone" => array(
"text", $settings->
phone())
127 ,
"mails" => array(
"text", $settings->
mails())
131 $this->db->update(self::IASS_SETTINGS_INFO_TABLE,
$values, $where);
139 $sql =
"DELETE FROM " . self::IASS_SETTINGS_TABLE .
" WHERE obj_id = %s";
140 $this->db->manipulateF($sql, array(
"integer"), array($obj->
getId()));
142 $sql =
"DELETE FROM " . self::IASS_SETTINGS_INFO_TABLE .
" WHERE obj_id = %s";
143 $this->db->manipulateF($sql, array(
"integer"), array($obj->
getId()));
loadInfoSettings(ilObjIndividualAssessment $obj)
Load info-screen settings corresponding to obj.
For the purpose of streamlining the grading and learning-process status definition outside of tests...
A settings storage handler to write iass settings to db.
static _exists($a_id, $a_reference=false, $a_type=null)
checks if an object exists in object_data
An object carrying settings of an Individual Assessment obj beyond the standart information.
eventTimePlaceRequired()
Get the value of the checkbox event_time_place_require.
A simple carrier for iass info-settings.
const IASS_SETTINGS_TABLE
const IASS_SETTINGS_INFO_TABLE
A general storage interface for Individual assessment settings.
recordTemplate()
Get the record template to be used as default record with corresponding object.
foreach($_POST as $key=> $value) $res
getId()
get object id public
updateSettings(ilIndividualAssessmentSettings $settings)
Update settings entry.
content()
Get the content of this assessment, e.g.
loadSettings(ilObjIndividualAssessment $obj)
Load settings corresponding to obj.ilIndividualAssessmentSettings $settings
getId()
Get the id of corrwsponding iass-object.
fileRequired()
Get the value of the checkbox file_required.
deleteSettings(ilObjIndividualAssessment $obj)
Delete settings entry corresponding to obj.ilIndividualAssessmentSettings $settings ...
createSettings(ilIndividualAssessmentSettings $settings)
Create a entry corresponding to $settings.
updateInfoSettings(ilIndividualAssessmentInfoSettings $settings)
Update info-screen settings entry.