ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilObjAssessmentFolder Class Reference

Class ilObjAssessmentFolder. More...

+ Inheritance diagram for ilObjAssessmentFolder:
+ Collaboration diagram for ilObjAssessmentFolder:

Public Member Functions

 __construct ($a_id=0, $a_call_by_reference=true)
 Constructor @access public. More...
 
 update ()
 update object data More...
 
 delete ()
 delete object and all related data More...
 
 _enableAssessmentLogging ($a_enable)
 enable assessment logging More...
 
 _setLogLanguage ($a_language)
 set the log language More...
 
 _setForbiddenQuestionTypes ($a_types)
 Sets the forbidden questiontypes for ILIAS. More...
 
 _setManualScoring ($type_ids)
 Set the manual scoring settings. More...
 
 getNrOfLogEntries ($test_obj_id)
 Returns the number of log entries for a given test id. More...
 
 getFullPath ($ref_id)
 Returns the full path output of an object. More...
 
 deleteLogEntries ($a_array)
 Deletes the log entries for a given array of test object IDs. More...
 
 getAssessmentProcessLockMode ()
 
 setAssessmentProcessLockMode ($lockMode)
 
 getSkillTriggeringNumAnswersBarrier ()
 
 setSkillTriggeringNumAnswersBarrier ($skillTriggeringNumAnswersBarrier)
 
 setExportEssayQuestionsWithHtml ($value)
 
 getExportEssayQuestionsWithHtml ()
 
 fetchScoringAdjustableTypes ($allQuestionTypes)
 
- Public Member Functions inherited from ilObject
 __construct ($a_id=0, $a_reference=true)
 Constructor @access public. More...
 
 withReferences ()
 determines wehter objects are referenced or not (got ref ids or not) More...
 
 read ()
 read object data from db into object More...
 
 getId ()
 get object id @access public More...
 
 setId ($a_id)
 set object id @access public More...
 
 setRefId ($a_id)
 set reference id @access public More...
 
 getRefId ()
 get reference id @access public More...
 
 getType ()
 get object type @access public More...
 
 setType ($a_type)
 set object type @access public More...
 
 getPresentationTitle ()
 get presentation title Normally same as title Overwritten for sessions More...
 
 getTitle ()
 get object title @access public More...
 
 getUntranslatedTitle ()
 get untranslated object title @access public More...
 
 setTitle ($a_title)
 set object title More...
 
 getDescription ()
 get object description More...
 
 setDescription ($a_desc)
 set object description More...
 
 getLongDescription ()
 get object long description (stored in object_description) More...
 
 getImportId ()
 get import id More...
 
 setImportId ($a_import_id)
 set import id More...
 
 getOwner ()
 get object owner More...
 
 getOwnerName ()
 
 setOwner ($a_owner)
 set object owner More...
 
 getCreateDate ()
 get create date @access public More...
 
 getLastUpdateDate ()
 get last update date @access public More...
 
 getDiskUsage ()
 Gets the disk usage of the object in bytes. More...
 
 create ()
 create More...
 
 update ()
 update object in db More...
 
 MDUpdateListener ($a_element)
 Meta data update listener. More...
 
 createMetaData ()
 create meta data entry More...
 
 updateMetaData ()
 update meta data entry More...
 
 deleteMetaData ()
 delete meta data entry More...
 
 updateOwner ()
 update owner of object in db More...
 
 putInTree ($a_parent_ref)
 maybe this method should be in tree object!? More...
 
 setPermissions ($a_parent_ref)
 set permissions of object More...
 
 setParentRolePermissions ($a_parent_ref)
 Initialize the permissions of parent roles (local roles of categories, global roles...) This method is overwritten in e.g courses, groups for building permission intersections with non_member templates. More...
 
 createReference ()
 creates reference for object More...
 
 countReferences ()
 count references of object More...
 
 initDefaultRoles ()
 init default roles settings Purpose of this function is to create a local role folder and local roles, that are needed depending on the object type If you want to setup default local roles you MUST overwrite this method in derived object classes (see ilObjForum for an example) @access public More...
 
 applyDidacticTemplate ($a_tpl_id)
 Apply template. More...
 
 setRegisterMode ($a_bool)
 
 isUserRegistered ($a_user_id=0)
 
 requireRegistration ()
 
 getXMLZip ()
 
 getHTMLDirectory ()
 
 appendCopyInfo ($a_target_id, $a_copy_id)
 Prepend Copy info if object with same name exists in that container. More...
 
 cloneDependencies ($a_target_id, $a_copy_id)
 Clone object dependencies. More...
 
 cloneMetaData ($target_obj)
 Copy meta data. More...
 
 getPossibleSubObjects ($a_filter=true)
 get all possible subobjects of this type the object can decide which types of subobjects are possible jut in time overwrite if the decision distinguish from standard model More...
 

Static Public Member Functions

static getSkillTriggerAnswerNumberBarrier ()
 
static _enabledAssessmentLogging ()
 check wether assessment logging is enabled or not More...
 
static _getForbiddenQuestionTypes ()
 Returns the forbidden questiontypes for ILIAS. More...
 
static _getLogLanguage ()
 retrieve the log language for assessment logging More...
 
static _mananuallyScoreableQuestionTypesExists ()
 Returns the fact wether manually scoreable question types exist or not. More...
 
static _getManualScoring ()
 Retrieve the manual scoring settings. More...
 
static _getManualScoringTypes ()
 Retrieve the manual scoring settings as type strings. More...
 
static getScoringAdjustableQuestions ()
 
static setScoringAdjustableQuestions ($type_ids)
 
static getScoringAdjustmentEnabled ()
 
static setScoringAdjustmentEnabled ($active)
 
static _addLog ($user_id, $object_id, $logtext, $question_id="", $original_id="", $test_only=false, $test_ref_id=null)
 Add an assessment log entry. More...
 
static getLog ($ts_from, $ts_to, $test_id, $test_only=false)
 Retrieve assessment log datasets from the database. More...
 
static _getLog ($ts_from, $ts_to, $test_id, $test_only=false)
 Retrieve assessment log datasets from the database. More...
 
static isAdditionalQuestionContentEditingModePageObjectEnabled ()
 returns the fact wether content editing with ilias page editor is enabled for questions or not More...
 
static getValidAssessmentProcessLockModes ()
 
- Static Public Member Functions inherited from ilObject
static _lookupObjIdByImportId ($a_import_id)
 
static _lookupImportId ($a_obj_id)
 
static _lookupOwnerName ($a_owner_id)
 lookup owner name for owner id More...
 
static _getIdForImportId ($a_import_id)
 get current object id for import id (static) More...
 
static _getAllReferences ($a_id)
 get all reference ids of object More...
 
static _lookupTitle ($a_id)
 lookup object title More...
 
static _lookupOwner ($a_id)
 lookup object owner More...
 
static _getIdsForTitle ($title, $type='', $partialmatch=false)
 
static _lookupDescription ($a_id)
 lookup object description More...
 
static _lookupLastUpdate ($a_id, $a_as_string=false)
 lookup last update More...
 
static _getLastUpdateOfObjects ($a_objs)
 Get last update for a set of media objects. More...
 
static _lookupObjId ($a_id)
 
static _setDeletedDate ($a_ref_id)
 only called in ilTree::saveSubTree More...
 
static setDeletedDates ($a_ref_ids)
 Set deleted date @global type $ilDB. More...
 
static _resetDeletedDate ($a_ref_id)
 only called in ilObjectGUI::insertSavedNodes More...
 
static _lookupDeletedDate ($a_ref_id)
 only called in ilObjectGUI::insertSavedNodes More...
 
static _writeTitle ($a_obj_id, $a_title)
 write title to db (static) More...
 
static _writeDescription ($a_obj_id, $a_desc)
 write description to db (static) More...
 
static _writeImportId ($a_obj_id, $a_import_id)
 write import id to db (static) More...
 
static _lookupType ($a_id, $a_reference=false)
 lookup object type More...
 
static _isInTrash ($a_ref_id)
 checks wether object is in trash More...
 
static _hasUntrashedReference ($a_obj_id)
 checks wether an object has at least one reference that is not in trash More...
 
static _lookupObjectId ($a_ref_id)
 lookup object id More...
 
static _getObjectsDataForType ($a_type, $a_omit_trash=false)
 get all objects of a certain type More...
 
static _exists ($a_id, $a_reference=false, $a_type=null)
 checks if an object exists in object_data@access public More...
 
static _getObjectsByType ($a_obj_type="", $a_owner="")
 Get objects by type. More...
 
static _prepareCloneSelection ($a_ref_ids, $new_type, $show_path=true)
 Prepare copy wizard object selection. More...
 
static _getIcon ( $a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
 Get icon for repository item. More...
 
static collectDeletionDependencies (&$deps, $a_ref_id, $a_obj_id, $a_type, $a_depth=0)
 Collect deletion dependencies. More...
 
static getDeletionDependencies ($a_obj_id)
 Get deletion dependencies. More...
 
static getLongDescriptions (array $a_obj_ids)
 Get long description data. More...
 
static getAllOwnedRepositoryObjects ($a_user_id)
 Get all ids of objects user owns. More...
 
static fixMissingTitles ($a_type, array &$a_obj_title_map)
 Try to fix missing object titles. More...
 
static _lookupCreationDate ($a_id)
 Lookup creation date. More...
 
static hasAutoRating ($a_type, $a_ref_id)
 Check if auto rating is active for parent group/course. More...
 

Data Fields

const ADDITIONAL_QUESTION_CONTENT_EDITING_MODE_PAGE_OBJECT_DISABLED = 0
 
const ADDITIONAL_QUESTION_CONTENT_EDITING_MODE_PAGE_OBJECT_ENABLED = 1
 
const ASS_PROC_LOCK_MODE_NONE = 'none'
 
const ASS_PROC_LOCK_MODE_FILE = 'file'
 
const ASS_PROC_LOCK_MODE_DB = 'db'
 
const SETTINGS_KEY_SKL_TRIG_NUM_ANSWERS_BARRIER = 'ass_skl_trig_num_answ_barrier'
 
const DEFAULT_SKL_TRIG_NUM_ANSWERS_BARRIER = 1
 
 $setting
 
- Data Fields inherited from ilObject
const TITLE_LENGTH = 255
 max length of object title More...
 
const DESC_LENGTH = 128
 
 $lng
 
 $id
 
 $ref_id
 
 $type
 
 $title
 
 $untranslatedTitle
 
 $desc
 
 $long_desc
 
 $owner
 
 $create_date
 
 $last_update
 
 $import_id
 
 $register = false
 
 $referenced
 
 $objectList
 
 $max_title
 
 $max_desc
 
 $add_dots
 

Private Member Functions

 questionSupportsScoringAdjustment (\assQuestionGUI $question_object)
 

Additional Inherited Members

- Protected Attributes inherited from ilObject
 $objDefinition
 
 $db
 
 $log
 
 $error
 
 $tree
 
 $app_event_handler
 
 $rbacadmin
 
 $rbacreview
 

Detailed Description

Class ilObjAssessmentFolder.

Author
Helmut Schottmüller hscho.nosp@m.ttm@.nosp@m.gmx.d.nosp@m.e
Björn Heyser bheys.nosp@m.er@d.nosp@m.ataba.nosp@m.y.de
Version
$Id$

Definition at line 17 of file class.ilObjAssessmentFolder.php.

Constructor & Destructor Documentation

◆ __construct()

ilObjAssessmentFolder::__construct (   $a_id = 0,
  $a_call_by_reference = true 
)

Constructor @access public.

Parameters
integerreference_id or object_id
booleantreat the id as reference_id (true) or object_id (false)

Reimplemented from ilObject.

Definition at line 37 of file class.ilObjAssessmentFolder.php.

38 {
39 include_once "./Services/Administration/classes/class.ilSetting.php";
40 $this->setting = new ilSetting("assessment");
41 $this->type = "assf";
42 parent::__construct($a_id, $a_call_by_reference);
43 }
ILIAS Setting Class.

Member Function Documentation

◆ _addLog()

static ilObjAssessmentFolder::_addLog (   $user_id,
  $object_id,
  $logtext,
  $question_id = "",
  $original_id = "",
  $test_only = false,
  $test_ref_id = null 
)
static

Add an assessment log entry.

Parameters
integer$user_idThe user id of the acting user
integer$object_idThe database id of the modified test object
string$logtextThe textual description for the log entry
integer$question_idThe database id of a modified question (optional)
integer$original_idThe database id of the original of a modified question (optional)
Returns
array Array containing the datasets between $ts_from and $ts_to for the test with the id $test_id

Definition at line 275 of file class.ilObjAssessmentFolder.php.

276 {
277 global $ilUser, $ilDB;
278 if (strlen($question_id) == 0) {
279 $question_id = null;
280 }
281 if (strlen($original_id) == 0) {
282 $original_id = null;
283 }
284 if (strlen($test_ref_id) == 0) {
285 $test_ref_id = null;
286 }
287 $only = ($test_only == true) ? 1 : 0;
288 $next_id = $ilDB->nextId('ass_log');
289 $affectedRows = $ilDB->manipulateF(
290 "INSERT INTO ass_log (ass_log_id, user_fi, obj_fi, logtext, question_fi, original_fi, test_only, ref_id, tstamp) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s)",
291 array('integer', 'integer', 'integer', 'text', 'integer', 'integer', 'text', 'integer', 'integer'),
292 array(
293 $next_id,
294 $user_id,
295 $object_id,
296 $logtext,
297 $question_id,
298 $original_id,
299 $only,
300 $test_ref_id,
301 time()
302 )
303 );
304 }
global $ilDB
$ilUser
Definition: imgupload.php:18

References $ilDB, and $ilUser.

Referenced by deleteLogEntries(), assQuestion\logAction(), ilObjTest\logAction(), ilTestPasswordChecker\logWrongEnteredPassword(), and ilTestPassFinishTasks\updateLearningProgressAfterPassFinishedIsWritten().

+ Here is the caller graph for this function:

◆ _enableAssessmentLogging()

ilObjAssessmentFolder::_enableAssessmentLogging (   $a_enable)

enable assessment logging

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

95 {
96 $setting = new ilSetting("assessment");
97
98 if ($a_enable) {
99 $setting->set("assessment_logging", 1);
100 } else {
101 $setting->set("assessment_logging", 0);
102 }
103 }

References $setting.

◆ _enabledAssessmentLogging()

static ilObjAssessmentFolder::_enabledAssessmentLogging ( )
static

◆ _getForbiddenQuestionTypes()

static ilObjAssessmentFolder::_getForbiddenQuestionTypes ( )
static

Returns the forbidden questiontypes for ILIAS.

Definition at line 128 of file class.ilObjAssessmentFolder.php.

129 {
130 $setting = new ilSetting("assessment");
131 $types = $setting->get("forbidden_questiontypes");
132 $result = array();
133 if (strlen(trim($types)) == 0) {
134 $result = array();
135 } else {
136 $result = unserialize($types);
137 }
138 return $result;
139 }
$result

References $result, and $setting.

Referenced by ilObjQuestionPool\_getQuestionTypes().

+ Here is the caller graph for this function:

◆ _getLog()

static ilObjAssessmentFolder::_getLog (   $ts_from,
  $ts_to,
  $test_id,
  $test_only = false 
)
static

Retrieve assessment log datasets from the database.

Parameters
string$ts_fromTimestamp of the starting date/time period
string$ts_toTimestamp of the ending date/time period
integer$test_idDatabase id of the ILIAS test object
Returns
array Array containing the datasets between $ts_from and $ts_to for the test with the id $test_id

Definition at line 366 of file class.ilObjAssessmentFolder.php.

367 {
368 global $ilDB;
369
370 $log = array();
371 if ($test_only == true) {
372 $result = $ilDB->queryF(
373 "SELECT * FROM ass_log WHERE obj_fi = %s AND tstamp > %s AND tstamp < %s AND test_only = %s ORDER BY tstamp",
374 array('integer', 'integer', 'integer', 'text'),
375 array($test_id, $ts_from, $ts_to, 1)
376 );
377 } else {
378 $result = $ilDB->queryF(
379 "SELECT * FROM ass_log WHERE obj_fi = %s AND tstamp > %s AND tstamp < %s ORDER BY tstamp",
380 array('integer', 'integer', 'integer'),
381 array($test_id, $ts_from, $ts_to)
382 );
383 }
384 while ($row = $ilDB->fetchAssoc($result)) {
385 if (!array_key_exists($row["tstamp"], $log)) {
386 $log[$row["tstamp"]] = array();
387 }
388 $type_href = "";
389 if (array_key_exists("ref_id", $row)) {
390 if ($row["ref_id"] > 0) {
391 $type = ilObject::_lookupType($row['ref_id'], true);
392 switch ($type) {
393 case "tst":
394 $type_href = sprintf("goto.php?target=tst_%s&amp;client_id=" . CLIENT_ID, $row["ref_id"]);
395 break;
396 case "cat":
397 $type_href = sprintf("goto.php?target=cat_%s&amp;client_id=" . CLIENT_ID, $row["ref_id"]);
398 break;
399 }
400 }
401 }
402 $row["href"] = $type_href;
403 array_push($log[$row["tstamp"]], $row);
404 }
405 krsort($log);
406 // flatten array
407 $log_array = array();
408 foreach ($log as $key => $value) {
409 foreach ($value as $index => $row) {
410 array_push($log_array, $row);
411 }
412 }
413 return $log_array;
414 }
sprintf('%.4f', $callTime)
static _lookupType($a_id, $a_reference=false)
lookup object type
$key
Definition: croninfo.php:18
$index
Definition: metadata.php:60

References $ilDB, $index, $key, ilObject\$log, $result, $row, ilObject\$type, ilObject\_lookupType(), and sprintf.

Referenced by ilObjTestGUI\historyObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _getLogLanguage()

◆ _getManualScoring()

static ilObjAssessmentFolder::_getManualScoring ( )
static

Retrieve the manual scoring settings.

Definition at line 191 of file class.ilObjAssessmentFolder.php.

192 {
193 $setting = new ilSetting("assessment");
194
195 $types = $setting->get("assessment_manual_scoring");
196 return explode(",", $types);
197 }

References $setting.

Referenced by ilTestService\getManScoringQuestionGuiList(), ilTestServiceGUI\getPassListOfAnswersWithScoring(), ilObjTestGUI\getTabs(), ilObjTest\getTestParticipantsForManualScoring(), and ilTestManScoringParticipantsBySelectedQuestionAndPassTableGUI\initFilter().

+ Here is the caller graph for this function:

◆ _getManualScoringTypes()

static ilObjAssessmentFolder::_getManualScoringTypes ( )
static

Retrieve the manual scoring settings as type strings.

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

203 {
204 global $ilDB;
205
206 $result = $ilDB->query("SELECT * FROM qpl_qst_type");
207 $dbtypes = array();
208 while ($row = $ilDB->fetchAssoc($result)) {
209 $dbtypes[$row["question_type_id"]] = $row["type_tag"];
210 }
211 $setting = new ilSetting("assessment");
212 $types = $setting->get("assessment_manual_scoring");
213 $ids = explode(",", $types);
214 foreach ($ids as $key => $value) {
215 $ids[$key] = $dbtypes[$value];
216 }
217 return $ids;
218 }

References $ilDB, $key, $result, $row, and $setting.

Referenced by assQuestion\_needsManualScoring().

+ Here is the caller graph for this function:

◆ _mananuallyScoreableQuestionTypesExists()

static ilObjAssessmentFolder::_mananuallyScoreableQuestionTypesExists ( )
static

Returns the fact wether manually scoreable question types exist or not.

@access public

Returns
boolean $mananuallyScoreableQuestionTypesExists

Definition at line 179 of file class.ilObjAssessmentFolder.php.

180 {
181 if (count(self::_getManualScoring()) > 0) {
182 return true;
183 }
184
185 return false;
186 }

Referenced by ilTestScoringGUI\executeCommand().

+ Here is the caller graph for this function:

◆ _setForbiddenQuestionTypes()

ilObjAssessmentFolder::_setForbiddenQuestionTypes (   $a_types)

Sets the forbidden questiontypes for ILIAS.

Parameters
array$a_typesAn array containing the database ID's of the forbidden question types

Definition at line 146 of file class.ilObjAssessmentFolder.php.

147 {
148 $setting = new ilSetting("assessment");
149 $types = "";
150 if (is_array($a_types) && (count($a_types) > 0)) {
151 $types = serialize($a_types);
152 }
153 $setting->set("forbidden_questiontypes", $types);
154 }

References $setting.

◆ _setLogLanguage()

ilObjAssessmentFolder::_setLogLanguage (   $a_language)

set the log language

Definition at line 108 of file class.ilObjAssessmentFolder.php.

109 {
110 $setting = new ilSetting("assessment");
111
112 $setting->set("assessment_log_language", $a_language);
113 }

References $setting.

◆ _setManualScoring()

ilObjAssessmentFolder::_setManualScoring (   $type_ids)

Set the manual scoring settings.

Parameters
array$type_idsAn array containing the database ids of the question types which could be scored manually

Definition at line 225 of file class.ilObjAssessmentFolder.php.

226 {
227 $setting = new ilSetting("assessment");
228 if ((!is_array($type_ids)) || (count($type_ids) == 0)) {
229 $setting->delete("assessment_manual_scoring");
230 } else {
231 $setting->set("assessment_manual_scoring", implode($type_ids, ","));
232 }
233 }

References $setting.

◆ delete()

ilObjAssessmentFolder::delete ( )

delete object and all related data

@access public

Returns
boolean true if all object data were removed; false if only a references were removed

Definition at line 79 of file class.ilObjAssessmentFolder.php.

80 {
81 // always call parent delete function first!!
82 if (!parent::delete()) {
83 return false;
84 }
85
86 //put here your module specific stuff
87
88 return true;
89 }

◆ deleteLogEntries()

ilObjAssessmentFolder::deleteLogEntries (   $a_array)

Deletes the log entries for a given array of test object IDs.

Parameters
array$a_arrayAn array containing the object IDs of the tests

Definition at line 465 of file class.ilObjAssessmentFolder.php.

466 {
467 global $ilDB;
468 global $ilUser;
469
470 foreach ($a_array as $object_id) {
471 $affectedRows = $ilDB->manipulateF(
472 "DELETE FROM ass_log WHERE obj_fi = %s",
473 array('integer'),
474 array($object_id)
475 );
476 self::_addLog($ilUser->getId(), $object_id, $this->lng->txt("assessment_log_deleted"));
477 }
478 }
static _addLog($user_id, $object_id, $logtext, $question_id="", $original_id="", $test_only=false, $test_ref_id=null)
Add an assessment log entry.

References $ilDB, $ilUser, and _addLog().

+ Here is the call graph for this function:

◆ fetchScoringAdjustableTypes()

ilObjAssessmentFolder::fetchScoringAdjustableTypes (   $allQuestionTypes)

Definition at line 538 of file class.ilObjAssessmentFolder.php.

539 {
540 require_once 'Modules/TestQuestionPool/classes/class.assQuestionGUI.php';
541 $scoringAdjustableQuestionTypes = array();
542
543 foreach ($allQuestionTypes as $type => $typeData) {
544 $questionGui = assQuestionGUI::_getQuestionGUI($typeData['type_tag']);
545
546 if ($this->questionSupportsScoringAdjustment($questionGui)) {
547 $scoringAdjustableQuestionTypes[$type] = $typeData;
548 }
549 }
550
551 return $scoringAdjustableQuestionTypes;
552 }
static _getQuestionGUI($question_type, $question_id=-1)
Creates a question gui representation and returns the alias to the question gui note: please do not u...
questionSupportsScoringAdjustment(\assQuestionGUI $question_object)

References ilObject\$type, assQuestionGUI\_getQuestionGUI(), and questionSupportsScoringAdjustment().

+ Here is the call graph for this function:

◆ getAssessmentProcessLockMode()

ilObjAssessmentFolder::getAssessmentProcessLockMode ( )

Definition at line 500 of file class.ilObjAssessmentFolder.php.

501 {
502 return $this->setting->get('ass_process_lock_mode', self::ASS_PROC_LOCK_MODE_NONE);
503 }

◆ getExportEssayQuestionsWithHtml()

ilObjAssessmentFolder::getExportEssayQuestionsWithHtml ( )

Definition at line 533 of file class.ilObjAssessmentFolder.php.

534 {
535 return $this->setting->get('export_essay_qst_with_html');
536 }

◆ getFullPath()

ilObjAssessmentFolder::getFullPath (   $ref_id)

Returns the full path output of an object.

Parameters
integer$ref_idThe reference id of the object
Returns
string The full path with hyperlinks to the path elements

Definition at line 444 of file class.ilObjAssessmentFolder.php.

445 {
446 global $tree;
447 $path = $tree->getPathFull($ref_id);
448 $pathelements = array();
449 foreach ($path as $id => $data) {
450 if ($id == 0) {
451 array_push($pathelements, ilUtil::prepareFormOutput($this->lng->txt("repository")));
452 } else {
453 array_push($pathelements, "<a href=\"./goto.php?target=" . $data["type"] . "_" . $data["ref_id"] . "&amp;client=" . CLIENT_ID . "\">" .
454 ilUtil::prepareFormOutput($data["title"]) . "</a>");
455 }
456 }
457 return implode("&nbsp;&gt;&nbsp;", $pathelements);
458 }
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms @access public

References $data, ilObject\$id, $path, ilObject\$ref_id, ilObject\$tree, and ilUtil\prepareFormOutput().

+ Here is the call graph for this function:

◆ getLog()

static ilObjAssessmentFolder::getLog (   $ts_from,
  $ts_to,
  $test_id,
  $test_only = false 
)
static

Retrieve assessment log datasets from the database.

Parameters
string$ts_fromTimestamp of the starting date/time period
string$ts_toTimestamp of the ending date/time period
integer$test_idDatabase id of the ILIAS test object
Returns
array Array containing the datasets between $ts_from and $ts_to for the test with the id $test_id

Definition at line 314 of file class.ilObjAssessmentFolder.php.

315 {
316 global $ilDB;
317
318 $log = array();
319 if ($test_only == true) {
320 $result = $ilDB->queryF(
321 "SELECT * FROM ass_log WHERE obj_fi = %s AND tstamp > %s AND tstamp < %s AND test_only = %s ORDER BY tstamp",
322 array('integer','integer','integer','text'),
323 array(
324 $test_id,
325 $ts_from,
326 $ts_to,
327 1
328 )
329 );
330 } else {
331 $result = $ilDB->queryF(
332 "SELECT * FROM ass_log WHERE obj_fi = %s AND tstamp > %s AND tstamp < %s ORDER BY tstamp",
333 array('integer','integer','integer'),
334 array(
335 $test_id,
336 $ts_from,
337 $ts_to
338 )
339 );
340 }
341 while ($row = $ilDB->fetchAssoc($result)) {
342 if (!array_key_exists($row["tstamp"], $log)) {
343 $log[$row["tstamp"]] = array();
344 }
345 array_push($log[$row["tstamp"]], $row);
346 }
347 krsort($log);
348 // flatten array
349 $log_array = array();
350 foreach ($log as $key => $value) {
351 foreach ($value as $index => $row) {
352 array_push($log_array, $row);
353 }
354 }
355 return $log_array;
356 }

References $ilDB, $index, $key, ilObject\$log, $result, and $row.

Referenced by ilObjAssessmentFolderGUI\exportLogObject().

+ Here is the caller graph for this function:

◆ getNrOfLogEntries()

ilObjAssessmentFolder::getNrOfLogEntries (   $test_obj_id)

Returns the number of log entries for a given test id.

Parameters
integer$test_obj_idDatabase id of the ILIAS test object
Returns
integer The number of log entries for the test object

Definition at line 422 of file class.ilObjAssessmentFolder.php.

423 {
424 global $ilDB;
425 $result = $ilDB->queryF(
426 "SELECT COUNT(obj_fi) logcount FROM ass_log WHERE obj_fi = %s",
427 array('integer'),
428 array($test_obj_id)
429 );
430 if ($result->numRows()) {
431 $row = $ilDB->fetchAssoc($result);
432 return $row["logcount"];
433 } else {
434 return 0;
435 }
436 }

References $ilDB, $result, and $row.

◆ getScoringAdjustableQuestions()

static ilObjAssessmentFolder::getScoringAdjustableQuestions ( )
static

Definition at line 235 of file class.ilObjAssessmentFolder.php.

236 {
237 $setting = new ilSetting("assessment");
238
239 $types = $setting->get("assessment_scoring_adjustment");
240 return explode(",", $types);
241 }

References $setting.

◆ getScoringAdjustmentEnabled()

static ilObjAssessmentFolder::getScoringAdjustmentEnabled ( )
static

Definition at line 253 of file class.ilObjAssessmentFolder.php.

254 {
255 $setting = new ilSetting("assessment");
256 return $setting->get('assessment_adjustments_enabled');
257 }

References $setting.

◆ getSkillTriggerAnswerNumberBarrier()

static ilObjAssessmentFolder::getSkillTriggerAnswerNumberBarrier ( )
static

Definition at line 62 of file class.ilObjAssessmentFolder.php.

63 {
64 require_once 'Services/Administration/classes/class.ilSetting.php';
65 $assSettings = new ilSetting('assessment');
66
67 return $assSettings->get(
68 self::SETTINGS_KEY_SKL_TRIG_NUM_ANSWERS_BARRIER,
69 self::DEFAULT_SKL_TRIG_NUM_ANSWERS_BARRIER
70 );
71 }

Referenced by ilTestInfoScreenToolbarGUI\getSkillAssignBarrierInfo(), and ilAssQuestionSkillAssignmentList\hasSkillsAssignedLowerThanBarrier().

+ Here is the caller graph for this function:

◆ getSkillTriggeringNumAnswersBarrier()

ilObjAssessmentFolder::getSkillTriggeringNumAnswersBarrier ( )

Definition at line 515 of file class.ilObjAssessmentFolder.php.

516 {
517 return $this->setting->get(
518 'ass_skl_trig_num_answ_barrier',
519 self::DEFAULT_SKL_TRIG_NUM_ANSWERS_BARRIER
520 );
521 }

◆ getValidAssessmentProcessLockModes()

static ilObjAssessmentFolder::getValidAssessmentProcessLockModes ( )
static

Definition at line 510 of file class.ilObjAssessmentFolder.php.

511 {
512 return array(self::ASS_PROC_LOCK_MODE_NONE, self::ASS_PROC_LOCK_MODE_FILE, self::ASS_PROC_LOCK_MODE_DB);
513 }

Referenced by ilObjAssessmentFolderGUI\saveSettingsObject().

+ Here is the caller graph for this function:

◆ isAdditionalQuestionContentEditingModePageObjectEnabled()

static ilObjAssessmentFolder::isAdditionalQuestionContentEditingModePageObjectEnabled ( )
static

returns the fact wether content editing with ilias page editor is enabled for questions or not

@global ilSetting $ilSetting

Returns
bool $isPageEditorEnabled

Definition at line 486 of file class.ilObjAssessmentFolder.php.

487 {
488 require_once 'Modules/TestQuestionPool/classes/class.assQuestion.php';
489
490 global $ilSetting;
491
492 $isPageEditorEnabled = $ilSetting->get(
493 'enable_tst_page_edit',
494 self::ADDITIONAL_QUESTION_CONTENT_EDITING_MODE_PAGE_OBJECT_DISABLED
495 );
496
497 return $isPageEditorEnabled;
498 }
global $ilSetting
Definition: privfeed.php:17

References $ilSetting.

Referenced by ilTestExpressPageObjectGUI\addQuestion(), ilObjTestGUI\addQuestionObject(), ilObjQuestionPoolGUI\buildCreateQuestionForm(), ilObjQuestionPoolGUI\createQuestionFormObject(), ilObjQuestionPoolGUI\createQuestionForTestObject(), ilObjTestGUI\createQuestionObject(), ilObjQuestionPoolGUI\createQuestionObject(), ilPCQuestionGUI\edit(), ilTestExpressPageObjectGUI\handleToolbarCommand(), and ilPCQuestionGUI\insert().

+ Here is the caller graph for this function:

◆ questionSupportsScoringAdjustment()

ilObjAssessmentFolder::questionSupportsScoringAdjustment ( \assQuestionGUI  $question_object)
private

Definition at line 554 of file class.ilObjAssessmentFolder.php.

555 {
556 return ($question_object instanceof ilGuiQuestionScoringAdjustable
557 || $question_object instanceof ilGuiAnswerScoringAdjustable)
558 && ($question_object->object instanceof ilObjQuestionScoringAdjustable
559 || $question_object->object instanceof ilObjAnswerScoringAdjustable);
560 }
Interface ilGuiAnswerScoringAdjustable.
Interface ilGuiQuestionScoringAdjustable.
Interface ilObjAnswerScoringAdjustable.
Interface ilObjQuestionScoringAdjustable.

Referenced by fetchScoringAdjustableTypes().

+ Here is the caller graph for this function:

◆ setAssessmentProcessLockMode()

ilObjAssessmentFolder::setAssessmentProcessLockMode (   $lockMode)

Definition at line 505 of file class.ilObjAssessmentFolder.php.

506 {
507 $this->setting->set('ass_process_lock_mode', $lockMode);
508 }

◆ setExportEssayQuestionsWithHtml()

ilObjAssessmentFolder::setExportEssayQuestionsWithHtml (   $value)

Definition at line 528 of file class.ilObjAssessmentFolder.php.

529 {
530 $this->setting->set('export_essay_qst_with_html', $value);
531 }

◆ setScoringAdjustableQuestions()

static ilObjAssessmentFolder::setScoringAdjustableQuestions (   $type_ids)
static

Definition at line 243 of file class.ilObjAssessmentFolder.php.

244 {
245 $setting = new ilSetting("assessment");
246 if ((!is_array($type_ids)) || (count($type_ids) == 0)) {
247 $setting->delete("assessment_scoring_adjustment");
248 } else {
249 $setting->set("assessment_scoring_adjustment", implode($type_ids, ","));
250 }
251 }

References $setting.

◆ setScoringAdjustmentEnabled()

static ilObjAssessmentFolder::setScoringAdjustmentEnabled (   $active)
static

Definition at line 259 of file class.ilObjAssessmentFolder.php.

260 {
261 $setting = new ilSetting('assessment');
262 $setting->set('assessment_adjustments_enabled', (bool) $active);
263 }

References $setting.

◆ setSkillTriggeringNumAnswersBarrier()

ilObjAssessmentFolder::setSkillTriggeringNumAnswersBarrier (   $skillTriggeringNumAnswersBarrier)

Definition at line 523 of file class.ilObjAssessmentFolder.php.

524 {
525 $this->setting->set('ass_skl_trig_num_answ_barrier', $skillTriggeringNumAnswersBarrier);
526 }

◆ update()

ilObjAssessmentFolder::update ( )

update object data

@access public

Returns
boolean

Reimplemented from ilObject.

Definition at line 51 of file class.ilObjAssessmentFolder.php.

52 {
53 if (!parent::update()) {
54 return false;
55 }
56
57 // put here object specific stuff
58
59 return true;
60 }
update($pash, $contents, Config $config)

References League\Flysystem\Adapter\Polyfill\update().

+ Here is the call graph for this function:

Field Documentation

◆ $setting

◆ ADDITIONAL_QUESTION_CONTENT_EDITING_MODE_PAGE_OBJECT_DISABLED

const ilObjAssessmentFolder::ADDITIONAL_QUESTION_CONTENT_EDITING_MODE_PAGE_OBJECT_DISABLED = 0

◆ ADDITIONAL_QUESTION_CONTENT_EDITING_MODE_PAGE_OBJECT_ENABLED

const ilObjAssessmentFolder::ADDITIONAL_QUESTION_CONTENT_EDITING_MODE_PAGE_OBJECT_ENABLED = 1

Definition at line 20 of file class.ilObjAssessmentFolder.php.

◆ ASS_PROC_LOCK_MODE_DB

const ilObjAssessmentFolder::ASS_PROC_LOCK_MODE_DB = 'db'

◆ ASS_PROC_LOCK_MODE_FILE

const ilObjAssessmentFolder::ASS_PROC_LOCK_MODE_FILE = 'file'

◆ ASS_PROC_LOCK_MODE_NONE

◆ DEFAULT_SKL_TRIG_NUM_ANSWERS_BARRIER

const ilObjAssessmentFolder::DEFAULT_SKL_TRIG_NUM_ANSWERS_BARRIER = 1

◆ SETTINGS_KEY_SKL_TRIG_NUM_ANSWERS_BARRIER

const ilObjAssessmentFolder::SETTINGS_KEY_SKL_TRIG_NUM_ANSWERS_BARRIER = 'ass_skl_trig_num_answ_barrier'

Definition at line 26 of file class.ilObjAssessmentFolder.php.


The documentation for this class was generated from the following file: