function read($a_force_db = false) { parent::read(); if ($this->getId() != ROLE_FOLDER_ID) { $this->setDescription($this->lng->txt("obj_" . $this->getType() . "_local_desc") . $this->getTitle() . $this->getDescription()); $this->setTitle($this->lng->txt("obj_" . $this->getType() . "_local")); } }
/** * read object */ function read() { global $ilDB; parent::read(); $q = "SELECT * FROM file_based_lm WHERE id = " . $ilDB->quote($this->getId(), "integer"); $lm_set = $ilDB->query($q); $lm_rec = $ilDB->fetchAssoc($lm_set); $this->setOnline(ilUtil::yn2tf($lm_rec["is_online"])); $this->setStartFile((string) $lm_rec["startfile"]); }
/** * Read pool data */ function read() { global $ilDB; parent::read(); $set = $ilDB->query("SELECT * FROM mep_data " . " WHERE id = " . $ilDB->quote($this->getId(), "integer")); if ($rec = $ilDB->fetchAssoc($set)) { $this->setDefaultWidth($rec["default_width"]); $this->setDefaultHeight($rec["default_height"]); } $this->tree = ilObjMediaPool::getPoolTree($this->getId()); }
/** * read style folder data */ function read() { global $ilDB; parent::read(); // get styles of style folder $q = "SELECT * FROM style_folder_styles, style_data WHERE folder_id = " . $ilDB->quote($this->getId(), "integer") . " AND style_id = style_data.id"; $style_set = $ilDB->query($q); $this->styles = array(); while ($style_rec = $ilDB->fetchAssoc($style_set)) { $this->styles[$style_rec["style_id"]] = array("id" => $style_rec["style_id"], "title" => ilObject::_lookupTitle($style_rec["style_id"]), "category" => $style_rec["category"]); } $this->styles = ilUtil::sortArray($this->styles, "title", "asc", false, true); }
function read() { global $ilDB; parent::read(); // put here object specific stuff if ($this->getId()) { $set = $ilDB->query('SELECT * FROM booking_settings' . ' WHERE booking_pool_id = ' . $ilDB->quote($this->getId(), 'integer')); $row = $ilDB->fetchAssoc($set); $this->setOffline($row['pool_offline']); $this->setPublicLog($row['public_log']); $this->setNumberOfSlots($row['slots_no']); $this->setScheduleType($row['schedule_type']); } }
/** * read object */ function read() { global $ilDB; parent::read(); $lm_set = $ilDB->queryF('SELECT * FROM sahs_lm WHERE id = %s', array('integer'), array($this->getId())); while ($lm_rec = $ilDB->fetchAssoc($lm_set)) { $this->setOnline(ilUtil::yn2tf($lm_rec["c_online"])); $this->setAutoReviewChar($lm_rec["auto_review"]); $this->setAPIAdapterName($lm_rec["api_adapter"]); $this->setDefaultLessonMode($lm_rec["default_lesson_mode"]); $this->setAPIFunctionsPrefix($lm_rec["api_func_prefix"]); $this->setCreditMode($lm_rec["credit"]); $this->setSubType($lm_rec["c_type"]); $this->setEditable($lm_rec["editable"]); $this->setStyleSheetId($lm_rec["stylesheet"]); $this->setMaxAttempt($lm_rec["max_attempt"]); $this->setModuleVersion($lm_rec["module_version"]); $this->setAssignedGlossary($lm_rec["glossary"]); $this->setTries($lm_rec["question_tries"]); $this->setLocalization($lm_rec["localization"]); $this->setSession(ilUtil::yn2tf($lm_rec["unlimited_session"])); $this->setNoMenu(ilUtil::yn2tf($lm_rec["no_menu"])); $this->setHideNavig(ilUtil::yn2tf($lm_rec["hide_navig"])); $this->setFourth_edition(ilUtil::yn2tf($lm_rec["fourth_edition"])); $this->setSequencing(ilUtil::yn2tf($lm_rec["sequencing"])); $this->setInteractions(ilUtil::yn2tf($lm_rec["interactions"])); $this->setObjectives(ilUtil::yn2tf($lm_rec["objectives"])); $this->setComments(ilUtil::yn2tf($lm_rec["comments"])); $this->setTime_from_lms(ilUtil::yn2tf($lm_rec["time_from_lms"])); $this->setDebug(ilUtil::yn2tf($lm_rec["debug"])); $this->setDebugPw($lm_rec["debugpw"]); $this->setSequencingExpertMode($lm_rec["seq_exp_mode"]); $this->setOpenMode($lm_rec["open_mode"]); $this->setWidth($lm_rec["width"]); $this->setHeight($lm_rec["height"]); $this->setAutoContinue(ilUtil::yn2tf($lm_rec["auto_continue"])); $this->setAuto_last_visited(ilUtil::yn2tf($lm_rec["auto_last_visited"])); $this->setCheck_values(ilUtil::yn2tf($lm_rec["check_values"])); $this->setOfflineMode(ilUtil::yn2tf($lm_rec["offline_mode"])); $this->setAutoSuspend(ilUtil::yn2tf($lm_rec["auto_suspend"])); $this->setIe_compatibility(ilUtil::yn2tf($lm_rec["ie_compatibility"])); $this->setIe_force_render(ilUtil::yn2tf($lm_rec["ie_force_render"])); include_once "./Services/Style/classes/class.ilObjStyleSheet.php"; if (ilObject::_lookupType($this->getStyleSheetId()) != "sty") { $this->setStyleSheetId(0); } } }
/** * read data of content object */ function read() { global $ilDB; parent::read(); # echo "Content<br>\n"; $this->lm_tree = new ilTree($this->getId()); $this->lm_tree->setTableNames('lm_tree', 'lm_data'); $this->lm_tree->setTreeTablePK("lm_id"); $this->readProperties(); // read auto glossaries $set = $ilDB->query("SELECT * FROM lm_glossaries " . " WHERE lm_id = " . $ilDB->quote($this->getId(), "integer")); $glos = array(); while ($rec = $ilDB->fetchAssoc($set)) { $glos[] = $rec["glo_id"]; } $this->setAutoGlossaries($glos); //parent::read(); }
/** * read data of content object */ function read() { global $ilDB; parent::read(); # echo "Glossary<br>\n"; $q = "SELECT * FROM glossary WHERE id = " . $ilDB->quote($this->getId(), "integer"); $gl_set = $ilDB->query($q); $gl_rec = $ilDB->fetchAssoc($gl_set); $this->setOnline(ilUtil::yn2tf($gl_rec["is_online"])); $this->setVirtualMode($gl_rec["virtual"]); $this->setPublicExportFile("xml", $gl_rec["public_xml_file"]); $this->setPublicExportFile("html", $gl_rec["public_html_file"]); $this->setActiveGlossaryMenu(ilUtil::yn2tf($gl_rec["glo_menu_active"])); $this->setActiveDownloads(ilUtil::yn2tf($gl_rec["downloads_active"])); $this->setPresentationMode($gl_rec["pres_mode"]); $this->setSnippetLength($gl_rec["snippet_length"]); $this->setShowTaxonomy($gl_rec["show_tax"]); include_once "./Services/Style/classes/class.ilObjStyleSheet.php"; $this->setStyleSheetId((int) ilObjStyleSheet::lookupObjectStyle($this->getId())); }
/** * loads a record "user" from database * @access private */ function read() { global $ilErr, $ilDB; // Alex: I have removed the JOIN to rbac_ua, since there seems to be no // use (3.11.0 alpha) /*$q = "SELECT * FROM usr_data ". "LEFT JOIN rbac_ua ON usr_data.usr_id=rbac_ua.usr_id ". "WHERE usr_data.usr_id= ".$ilDB->quote($this->id); */ $r = $ilDB->queryF("SELECT * FROM usr_data " . "WHERE usr_id= %s", array("integer"), array($this->id)); if ($data = $ilDB->fetchAssoc($r)) { // convert password storage layout used by table usr_data into // storage layout used by class ilObjUser if ($data["passwd"] == "" && $data["i2passwd"] != "") { $data["passwd_type"] = IL_PASSWD_CRYPT; $data["passwd"] = $data["i2passwd"]; } else { $data["passwd_type"] = IL_PASSWD_MD5; //$data["passwd"] = $data["passwd"]; (implicit) } unset($data["i2passw"]); // this assign must not be set via $this->assignData($data) // because this method will be called on profile updates and // would set this values to 0, because they arent posted from form $this->setLastPasswordChangeTS($data['last_password_change']); $this->setLoginAttempts($data['login_attempts']); // fill member vars in one shot $this->assignData($data); //get userpreferences from usr_pref table $this->readPrefs(); //set language to default if not set if ($this->prefs["language"] == "") { $this->prefs["language"] = $this->oldPrefs["language"]; } //check skin-setting include_once "./Services/Style/classes/class.ilStyleDefinition.php"; if ($this->prefs["skin"] == "" || !ilStyleDefinition::skinExists($this->prefs["skin"])) { $this->prefs["skin"] = $this->oldPrefs["skin"]; } $this->skin = $this->prefs["skin"]; //check style-setting (skins could have more than one stylesheet if ($this->prefs["style"] == "" || !ilStyleDefinition::skinExists($this->skin, $this->prefs["style"])) { //load default (css) $this->prefs["style"] = $this->ilias->ini->readVariable("layout", "style"); } if (empty($this->prefs["hits_per_page"])) { $this->prefs["hits_per_page"] = 10; } } else { $ilErr->raiseError("<b>Error: There is no dataset with id " . $this->id . "!</b><br />class: " . get_class($this) . "<br />Script: " . __FILE__ . "<br />Line: " . __LINE__, $ilErr->FATAL); } $this->readUserDefinedFields(); parent::read(); }
function read() { global $ilDB; parent::read(); $query = "SELECT * FROM exc_data " . "WHERE obj_id = " . $ilDB->quote($this->getId(), "integer"); $res = $ilDB->query($query); while ($row = $ilDB->fetchObject($res)) { $this->setInstruction($row->instruction); $this->setTimestamp($row->time_stamp); $pm = $row->pass_mode == "" ? "all" : $row->pass_mode; $this->setPassMode($pm); $this->setShowSubmissions($row->show_submissions); if ($row->pass_mode == "nr") { $this->setPassNr($row->pass_nr); } $this->setCompletionBySubmission($row->compl_by_submission == 1 ? true : false); $this->setCertificateVisibility($row->certificate_visibility); } $this->members_obj = new ilExerciseMembers($this); // GET FILE ASSIGNED TO EXERCISE // $this->file_obj = new ilFileDataExercise($this->getId()); // $this->files = $this->file_obj->getFiles(); return true; }
/** * read * * @access public * @return */ public function read() { global $ilDB; parent::read(); $query = "SELECT * FROM container_reference " . "WHERE obj_id = " . $ilDB->quote($this->getId(), 'integer') . " "; $res = $ilDB->query($query); while ($row = $res->fetchRow(DB_FETCHMODE_OBJECT)) { $this->setTargetId($row->target_obj_id); $this->setTitleType($row->title_type); } $ref_ids = ilObject::_getAllReferences($this->getTargetId()); $this->setTargetRefId(current($ref_ids)); if ($this->getTitleType() == ilContainerReference::TITLE_TYPE_REUSE) { #$this->title = $this->lng->txt('reference_of').' '.ilObject::_lookupTitle($this->getTargetId()); $this->title = ilObject::_lookupTitle($this->getTargetId()); } }
/** * read object data from db into object * @param boolean */ public function read($a_force_db = false) { parent::read($a_force_db); $settings = new ilSetting('disk_quota'); $this->diskQuotaEnabled = $settings->get('enabled') == true; $this->diskQuotaReminderMailEnabled = $settings->get('reminder_mail_enabled') == true; $this->isDiskQuotaSummaryMailEnabled($settings->get('summary_mail_enabled') == 1 ? true : false); $this->setSummaryRecipients($settings->get('summary_rcpt')); }
/** * Read wiki data */ function read() { global $ilDB; parent::read(); $query = "SELECT * FROM il_wiki_data WHERE id = " . $ilDB->quote($this->getId(), "integer"); $set = $ilDB->query($query); $rec = $ilDB->fetchAssoc($set); $this->setOnline($rec["is_online"]); $this->setStartPage($rec["startpage"]); $this->setShortTitle($rec["short"]); $this->setRatingOverall($rec["rating_overall"]); $this->setRating($rec["rating"]); $this->setRatingAsBlock($rec["rating_side"]); $this->setRatingForNewPages($rec["rating_new"]); $this->setRatingCategories($rec["rating_ext"]); $this->setPublicNotes($rec["public_notes"]); $this->setIntroduction($rec["introduction"]); $this->setImportantPages($rec["imp_pages"]); $this->setPageToc($rec["page_toc"]); $this->setEmptyPageTemplate($rec["empty_page_templ"]); include_once "./Services/Style/classes/class.ilObjStyleSheet.php"; $this->setStyleSheetId((int) ilObjStyleSheet::lookupObjectStyle($this->getId())); }
/** * read style properties */ function read() { global $ilDB; parent::read(); $q = "SELECT * FROM style_parameter WHERE style_id = " . $ilDB->quote($this->getId(), "integer") . " ORDER BY tag, class, type "; $style_set = $ilDB->query($q); $ctag = ""; $cclass = ""; $ctype = ""; $this->style = array(); while ($style_rec = $ilDB->fetchAssoc($style_set)) { if ($style_rec["tag"] != $ctag || $style_rec["class"] != $cclass || $style_rec["type"] != $ctype) { // add current tag array to style array if (is_array($tag)) { $this->style[] = $tag; } $tag = array(); } $ctag = $style_rec["tag"]; $cclass = $style_rec["class"]; $ctype = $style_rec["type"]; $tag[] = $style_rec; $this->style_class[$ctype][$cclass][$style_rec["parameter"]] = $style_rec["value"]; } if (is_array($tag)) { $this->style[] = $tag; } //var_dump($this->style_class); $q = "SELECT * FROM style_data WHERE id = " . $ilDB->quote($this->getId(), "integer"); $res = $ilDB->query($q); $sty = $ilDB->fetchAssoc($res); $this->setUpToDate((bool) $sty["uptodate"]); $this->setScope($sty["category"]); // get style characteristics records $this->chars = array(); $this->chars_by_type = array(); $q = "SELECT * FROM style_char WHERE style_id = " . $ilDB->quote($this->getId(), "integer") . " ORDER BY type ASC, characteristic ASC"; $par_set = $ilDB->query($q); while ($par_rec = $ilDB->fetchAssoc($par_set)) { $this->chars[] = array("type" => $par_rec["type"], "class" => $par_rec["characteristic"], "hide" => $par_rec["hide"]); $this->chars_by_type[$par_rec["type"]][] = $par_rec["characteristic"]; if ($par_rec["hide"]) { $this->hidden_chars[$par_rec["type"] . ":" . $par_rec["characteristic"]] = true; } } }
/** * read media object data from db */ function read() { //echo "<br>ilObjMediaObject:read"; parent::read(); // get media items ilMediaItem::_getMediaItemsOfMOb($this); }
/** * read session data * * @access public * @param * @return */ public function read() { parent::read(); $query = "SELECT * FROM event WHERE " . "obj_id = " . $this->db->quote($this->getId(), 'integer') . " "; $res = $this->db->query($query); while ($row = $res->fetchRow(DB_FETCHMODE_OBJECT)) { $this->setLocation($row->location); $this->setName($row->tutor_name); $this->setPhone($row->tutor_phone); $this->setEmail($row->tutor_email); $this->setDetails($row->details); $this->enableRegistration((bool) $row->registration); $this->event_id = $row->event_id; } $this->initAppointments(); $this->initFiles(); }
/** * loads "role" from database * @access private */ function read() { global $ilDB; $query = "SELECT * FROM role_data WHERE role_id= " . $ilDB->quote($this->id, 'integer') . " "; $res = $ilDB->query($query); if ($res->numRows() > 0) { $data = $ilDB->fetchAssoc($res); // fill member vars in one shot $this->assignData($data); } else { $this->ilias->raiseError("<b>Error: There is no dataset with id " . $this->id . "!</b><br />class: " . get_class($this) . "<br />Script: " . __FILE__ . "<br />Line: " . __LINE__, $this->ilias->FATAL); } parent::read(); }
/** * read * * @access public * @param * @return */ public function read() { parent::read(); include_once "./Services/Container/classes/class.ilContainerSortingSettings.php"; $this->setOrderType(ilContainerSortingSettings::_lookupSortMode($this->getId())); include_once "./Services/Style/classes/class.ilObjStyleSheet.php"; $this->setStyleSheetId((int) ilObjStyleSheet::lookupObjectStyle($this->getId())); }
/** * read object data from db into object * @param boolean */ public function read($a_force_db = false) { parent::read($a_force_db); global $ilClientIniFile; $this->webdavEnabled = $ilClientIniFile->readVariable('file_access', 'webdav_enabled') == '1'; $this->webdavActionsVisible = $ilClientIniFile->readVariable('file_access', 'webdav_actions_visible') == '1'; $this->downloadWithUploadedFilename = $ilClientIniFile->readVariable('file_access', 'download_with_uploaded_filename') == '1'; $ilClientIniFile->ERROR = false; require_once 'Services/Administration/classes/class.ilSetting.php'; $settings = new ilSetting('file_access'); $this->inlineFileExtensions = $settings->get('inline_file_extensions', ''); $this->customWebfolderInstructionsEnabled = $settings->get('custom_webfolder_instructions_enabled', '0') == '1'; $this->customWebfolderInstructions = $settings->get('custom_webfolder_instructions', ''); }
/** * read data of content object */ function read() { parent::read(); # echo "Content<br>\n"; $this->lm_tree = new ilTree($this->getId()); $this->lm_tree->setTableNames('lm_tree', 'lm_data'); $this->lm_tree->setTreeTablePK("lm_id"); $this->readProperties(); //parent::read(); }
/** * read object data from db into object * @param boolean * @access public */ function read($a_force_db = false) { parent::read($a_force_db); $this->loadFromDb(); }
/** * Read data from db */ final function read($a_force_db = false) { parent::read($a_force_db); $this->doRead(); }
/** * read */ function read() { global $ilDB; parent::read(); }
/** * Read media cast */ function read() { global $ilDB; parent::read(); $this->readItems(); $query = "SELECT * FROM il_media_cast_data WHERE id = " . $ilDB->quote($this->getId(), "integer"); $set = $ilDB->query($query); $rec = $ilDB->fetchAssoc($set); $this->setOnline($rec["is_online"]); $this->setPublicFiles($rec["public_files"]); $this->setDownloadable($rec["downloadable"]); $this->setDefaultAccess($rec["def_access"]); $this->setOrder($rec["sortmode"]); $this->setViewMode($rec["viewmode"]); }