ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 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 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 public More...
 
 setId ($a_id)
 set object id public More...
 
 setRefId ($a_id)
 set reference id public More...
 
 getRefId ()
 get reference id public More...
 
 getType ()
 get object type public More...
 
 setType ($a_type)
 set object type public More...
 
 getPresentationTitle ()
 get presentation title Normally same as title Overwritten for sessions More...
 
 getTitle ()
 get object title public More...
 
 getUntranslatedTitle ()
 get untranslated object title 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 public More...
 
 getLastUpdateDate ()
 get last update date 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...
 
 delete ()
 delete object or referenced object (in the case of a referenced object, object data is only deleted if last reference is deleted) This function removes an object entirely from system!! 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) public More...
 
 applyDidacticTemplate ($a_tpl_id)
 Apply template. More...
 
 setRegisterMode ($a_bool)
 
 isUserRegistered ($a_user_id=0)
 
 requireRegistration ()
 
 getXMLZip ()
 
 getHTMLDirectory ()
 
 cloneObject ($a_target_id, $a_copy_id=0, $a_omit_tree=false)
 Clone object permissions, put in tree ... More...
 
 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 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 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
 
 $ilias
 
 $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)
 

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 public.

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

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 294 of file class.ilObjAssessmentFolder.php.

References $ilDB, $ilUser, array, and time.

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

295  {
296  global $ilUser, $ilDB;
297  if (strlen($question_id) == 0) $question_id = NULL;
298  if (strlen($original_id) == 0) $original_id = NULL;
299  if (strlen($test_ref_id) == 0) $test_ref_id = NULL;
300  $only = ($test_only == TRUE) ? 1 : 0;
301  $next_id = $ilDB->nextId('ass_log');
302  $affectedRows = $ilDB->manipulateF("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)",
303  array('integer', 'integer', 'integer', 'text', 'integer', 'integer', 'text', 'integer', 'integer'),
304  array(
305  $next_id,
306  $user_id,
307  $object_id,
308  $logtext,
309  $question_id,
310  $original_id,
311  $only,
312  $test_ref_id,
313  time()
314  )
315  );
316  }
$ilUser
Definition: imgupload.php:18
Create styles array
The data for the language used.
global $ilDB
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
+ Here is the caller graph for this function:

◆ _enableAssessmentLogging()

ilObjAssessmentFolder::_enableAssessmentLogging (   $a_enable)

enable assessment logging

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

97  {
98  $setting = new ilSetting("assessment");
99 
100  if ($a_enable)
101  {
102  $setting->set("assessment_logging", 1);
103  }
104  else
105  {
106  $setting->set("assessment_logging", 0);
107  }
108  }
ILIAS Setting Class.

◆ _enabledAssessmentLogging()

static ilObjAssessmentFolder::_enabledAssessmentLogging ( )
static

check wether assessment logging is enabled or not

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

Referenced by assQuestion\_setReachedPoints(), ilObjTest\addExtraTime(), ilTestOutputGUI\adoptUserSolutionsFromPreviousPass(), assQuestion\calculateResultsFromSolution(), ilObjTest\checkMaximumAllowedUsers(), ilObjTest\createQuestionGUI(), ilObjTest\createRandomSolutions(), ilObjTest\getManualFeedback(), ilTestPlayerAbstractGUI\getQuestionInstance(), ilObjTest\insertQuestion(), assQuestion\instantiateQuestionGUI(), assKprimChoice\isComplete(), assNumeric\isValidSolutionSubmit(), assQuestion\log(), ilTestPasswordChecker\logWrongEnteredPassword(), ilObjTest\questionMoveDown(), ilObjTest\questionMoveUp(), ilTestEvaluationGUI\redirectToPassDeletionContext(), ilObjTest\removeQuestion(), ilObjTest\removeTestResultsByActiveIds(), ilSoapTestAdministration\saveQuestion(), ilObjTest\saveQuestionsToDb(), ASS_MarkSchema\saveToDb(), ilObjTest\saveToDb(), assOrderingHorizontal\saveWorkingData(), assErrorText\saveWorkingData(), assTextSubset\saveWorkingData(), assTextQuestion\saveWorkingData(), assSingleChoice\saveWorkingData(), assLongMenu\saveWorkingData(), assFileUpload\saveWorkingData(), assImagemapQuestion\saveWorkingData(), assFormulaQuestion\saveWorkingData(), assMatchingQuestion\saveWorkingData(), assClozeTest\saveWorkingData(), ilObjAssessmentFolderGUI\showLogSettingsObject(), and assMultipleChoice\validateSolutionSubmit().

124  {
125  $setting = new ilSetting("assessment");
126 
127  return (boolean) $setting->get("assessment_logging");
128  }
ILIAS Setting Class.
+ Here is the caller graph for this function:

◆ _getForbiddenQuestionTypes()

static ilObjAssessmentFolder::_getForbiddenQuestionTypes ( )
static

Returns the forbidden questiontypes for ILIAS.

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

References $result, and array.

Referenced by ilObjQuestionPool\_getQuestionTypes(), and ilObjAssessmentFolderGUI\settingsObject().

134  {
135  $setting = new ilSetting("assessment");
136  $types = $setting->get("forbidden_questiontypes");
137  $result = array();
138  if (strlen(trim($types)) == 0)
139  {
140  $result = array();
141  }
142  else
143  {
144  $result = unserialize($types);
145  }
146  return $result;
147  }
ILIAS Setting Class.
$result
Create styles array
The data for the language used.
+ 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 383 of file class.ilObjAssessmentFolder.php.

References $ilDB, $log, $result, $row, ilObject\$type, ilObject\_lookupType(), and array.

Referenced by ilObjTestGUI\historyObject().

384  {
385  global $ilDB;
386 
387  $log = array();
388  if ($test_only == TRUE)
389  {
390  $result = $ilDB->queryF("SELECT * FROM ass_log WHERE obj_fi = %s AND tstamp > %s AND tstamp < %s AND test_only = %s ORDER BY tstamp",
391  array('integer', 'integer', 'integer', 'text'),
392  array($test_id, $ts_from, $ts_to, 1)
393  );
394  }
395  else
396  {
397  $result = $ilDB->queryF("SELECT * FROM ass_log WHERE obj_fi = %s AND tstamp > %s AND tstamp < %s ORDER BY tstamp",
398  array('integer', 'integer', 'integer'),
399  array($test_id, $ts_from, $ts_to)
400  );
401  }
402  while ($row = $ilDB->fetchAssoc($result))
403  {
404  if (!array_key_exists($row["tstamp"], $log))
405  {
406  $log[$row["tstamp"]] = array();
407  }
408  $type_href = "";
409  if (array_key_exists("ref_id", $row))
410  {
411  if ($row["ref_id"] > 0)
412  {
413  $type = ilObject::_lookupType($row['ref_id'], true);
414  switch ($type)
415  {
416  case "tst":
417  $type_href = sprintf("goto.php?target=tst_%s&amp;client_id=" . CLIENT_ID, $row["ref_id"]);
418  break;
419  case "cat":
420  $type_href = sprintf("goto.php?target=cat_%s&amp;client_id=" . CLIENT_ID, $row["ref_id"]);
421  break;
422  }
423  }
424  }
425  $row["href"] = $type_href;
426  array_push($log[$row["tstamp"]], $row);
427  }
428  krsort($log);
429  // flatten array
430  $log_array = array();
431  foreach ($log as $key => $value)
432  {
433  foreach ($value as $index => $row)
434  {
435  array_push($log_array, $row);
436  }
437  }
438  return $log_array;
439  }
$result
Create styles array
The data for the language used.
static _lookupType($a_id, $a_reference=false)
lookup object type
global $ilDB
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _getLogLanguage()

static ilObjAssessmentFolder::_getLogLanguage ( )
static

retrieve the log language for assessment logging

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

References $lang.

Referenced by assQuestion\_setReachedPoints(), ilObjTest\addExtraTime(), assQuestion\calculateResultsFromSolution(), ilObjTest\checkMaximumAllowedUsers(), ilObjTest\getManualFeedback(), ilTestPasswordChecker\getWrongEnteredPasswordLogMsg(), ilObjTest\insertQuestion(), assKprimChoice\isComplete(), assNumeric\isValidSolutionSubmit(), assQuestion\log(), ilObjTest\questionMoveDown(), ilObjTest\questionMoveUp(), ilTestEvaluationGUI\redirectToPassDeletionContext(), ilObjTest\removeQuestion(), ilObjTest\removeTestResultsByActiveIds(), ilObjTest\saveQuestionsToDb(), ASS_MarkSchema\saveToDb(), ilObjTest\saveToDb(), assOrderingHorizontal\saveWorkingData(), assErrorText\saveWorkingData(), assTextSubset\saveWorkingData(), assTextQuestion\saveWorkingData(), assSingleChoice\saveWorkingData(), assLongMenu\saveWorkingData(), assFileUpload\saveWorkingData(), assImagemapQuestion\saveWorkingData(), assFormulaQuestion\saveWorkingData(), assMatchingQuestion\saveWorkingData(), assClozeTest\saveWorkingData(), ilObjAssessmentFolderGUI\showLogSettingsObject(), and assMultipleChoice\validateSolutionSubmit().

169  {
170  $setting = new ilSetting("assessment");
171 
172  $lang = $setting->get("assessment_log_language");
173  if (strlen($lang) == 0)
174  {
175  $lang = "en";
176  }
177  return $lang;
178  }
ILIAS Setting Class.
for($i=1; $i<=count($kw_cases_sel); $i+=1) $lang
Definition: langwiz.php:349
+ Here is the caller graph for this function:

◆ _getManualScoring()

static ilObjAssessmentFolder::_getManualScoring ( )
static

Retrieve the manual scoring settings.

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

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

203  {
204  $setting = new ilSetting("assessment");
205 
206  $types = $setting->get("assessment_manual_scoring");
207  return explode(",", $types);
208  }
ILIAS Setting Class.
+ Here is the caller graph for this function:

◆ _getManualScoringTypes()

static ilObjAssessmentFolder::_getManualScoringTypes ( )
static

Retrieve the manual scoring settings as type strings.

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

References $ilDB, $result, $row, and array.

Referenced by assQuestion\_needsManualScoring().

214  {
215  global $ilDB;
216 
217  $result = $ilDB->query("SELECT * FROM qpl_qst_type");
218  $dbtypes = array();
219  while ($row = $ilDB->fetchAssoc($result))
220  {
221  $dbtypes[$row["question_type_id"]] = $row["type_tag"];
222  }
223  $setting = new ilSetting("assessment");
224  $types = $setting->get("assessment_manual_scoring");
225  $ids = explode(",", $types);
226  foreach ($ids as $key => $value)
227  {
228  $ids[$key] = $dbtypes[$value];
229  }
230  return $ids;
231  }
ILIAS Setting Class.
$result
Create styles array
The data for the language used.
global $ilDB
+ Here is the caller graph for this function:

◆ _mananuallyScoreableQuestionTypesExists()

static ilObjAssessmentFolder::_mananuallyScoreableQuestionTypesExists ( )
static

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

public

Returns
boolean $mananuallyScoreableQuestionTypesExists

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

Referenced by ilTestScoringByQuestionsGUI\__construct(), and ilTestScoringGUI\executeCommand().

190  {
191  if( count(self::_getManualScoring()) > 0 )
192  {
193  return true;
194  }
195 
196  return false;
197  }
+ 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 154 of file class.ilObjAssessmentFolder.php.

155  {
156  $setting = new ilSetting("assessment");
157  $types = "";
158  if (is_array($a_types) && (count($a_types) > 0))
159  {
160  $types = serialize($a_types);
161  }
162  $setting->set("forbidden_questiontypes", $types);
163  }
ILIAS Setting Class.

◆ _setLogLanguage()

ilObjAssessmentFolder::_setLogLanguage (   $a_language)

set the log language

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

114  {
115  $setting = new ilSetting("assessment");
116 
117  $setting->set("assessment_log_language", $a_language);
118  }
ILIAS Setting Class.

◆ _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 238 of file class.ilObjAssessmentFolder.php.

239  {
240  $setting = new ilSetting("assessment");
241  if ((!is_array($type_ids)) || (count($type_ids) == 0))
242  {
243  $setting->delete("assessment_manual_scoring");
244  }
245  else
246  {
247  $setting->set("assessment_manual_scoring", implode($type_ids, ","));
248  }
249  }
ILIAS Setting Class.

◆ delete()

ilObjAssessmentFolder::delete ( )

delete object and all related data

public

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

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

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

◆ 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 496 of file class.ilObjAssessmentFolder.php.

References $ilDB, $ilUser, and array.

497  {
498  global $ilDB;
499  global $ilUser;
500 
501  foreach ($a_array as $object_id)
502  {
503  $affectedRows = $ilDB->manipulateF("DELETE FROM ass_log WHERE obj_fi = %s",
504  array('integer'),
505  array($object_id)
506  );
507  self::_addLog($ilUser->getId(), $object_id, $this->lng->txt("assessment_log_deleted"));
508  }
509  }
$ilUser
Definition: imgupload.php:18
Create styles array
The data for the language used.
global $ilDB

◆ fetchScoringAdjustableTypes()

ilObjAssessmentFolder::fetchScoringAdjustableTypes (   $allQuestionTypes)

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

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

568  {
569  require_once 'Modules/TestQuestionPool/classes/class.assQuestionGUI.php';
570  $scoringAdjustableQuestionTypes = array();
571 
572  foreach($allQuestionTypes as $type => $typeData)
573  {
574  $questionGui = assQuestionGUI::_getQuestionGUI($typeData['type_tag']);
575 
576  if( $this->questionSupportsScoringAdjustment($questionGui) )
577  {
578  $scoringAdjustableQuestionTypes[$type] = $typeData;
579  }
580  }
581 
582  return $scoringAdjustableQuestionTypes;
583  }
questionSupportsScoringAdjustment(\assQuestionGUI $question_object)
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...
Create styles array
The data for the language used.
+ Here is the call graph for this function:

◆ getAssessmentProcessLockMode()

ilObjAssessmentFolder::getAssessmentProcessLockMode ( )

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

531  {
532  return $this->setting->get('ass_process_lock_mode', self::ASS_PROC_LOCK_MODE_NONE);
533  }

◆ getExportEssayQuestionsWithHtml()

ilObjAssessmentFolder::getExportEssayQuestionsWithHtml ( )

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

563  {
564  return $this->setting->get('export_essay_qst_with_html');
565  }

◆ 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 471 of file class.ilObjAssessmentFolder.php.

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

472  {
473  global $tree;
474  $path = $tree->getPathFull($ref_id);
475  $pathelements = array();
476  foreach ($path as $id => $data)
477  {
478  if ($id == 0)
479  {
480  array_push($pathelements, ilUtil::prepareFormOutput($this->lng->txt("repository")));
481  }
482  else
483  {
484  array_push($pathelements, "<a href=\"./goto.php?target=" . $data["type"] . "_" . $data["ref_id"] . "&amp;client=" . CLIENT_ID . "\">" .
485  ilUtil::prepareFormOutput($data["title"]) . "</a>");
486  }
487  }
488  return implode("&nbsp;&gt;&nbsp;", $pathelements);
489  }
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
$path
Definition: aliased.php:25
Create styles array
The data for the language used.
+ 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 326 of file class.ilObjAssessmentFolder.php.

References $ilDB, $log, $result, $row, and array.

Referenced by ilObjAssessmentFolderGUI\exportLogObject(), and ilObjAssessmentFolderGUI\getLogDataOutputForm().

327  {
328  global $ilDB;
329 
330  $log = array();
331  if ($test_only == TRUE)
332  {
333  $result = $ilDB->queryF("SELECT * FROM ass_log WHERE obj_fi = %s AND tstamp > %s AND tstamp < %s AND test_only = %s ORDER BY tstamp",
334  array('integer','integer','integer','text'),
335  array(
336  $test_id,
337  $ts_from,
338  $ts_to,
339  1
340  )
341  );
342  }
343  else
344  {
345  $result = $ilDB->queryF("SELECT * FROM ass_log WHERE obj_fi = %s AND tstamp > %s AND tstamp < %s ORDER BY tstamp",
346  array('integer','integer','integer'),
347  array(
348  $test_id,
349  $ts_from,
350  $ts_to
351  )
352  );
353  }
354  while ($row = $ilDB->fetchAssoc($result))
355  {
356  if (!array_key_exists($row["tstamp"], $log))
357  {
358  $log[$row["tstamp"]] = array();
359  }
360  array_push($log[$row["tstamp"]], $row);
361  }
362  krsort($log);
363  // flatten array
364  $log_array = array();
365  foreach ($log as $key => $value)
366  {
367  foreach ($value as $index => $row)
368  {
369  array_push($log_array, $row);
370  }
371  }
372  return $log_array;
373  }
$result
Create styles array
The data for the language used.
global $ilDB
+ 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 447 of file class.ilObjAssessmentFolder.php.

References $ilDB, $result, $row, and array.

448  {
449  global $ilDB;
450  $result = $ilDB->queryF("SELECT COUNT(obj_fi) logcount FROM ass_log WHERE obj_fi = %s",
451  array('integer'),
452  array($test_obj_id)
453  );
454  if ($result->numRows())
455  {
456  $row = $ilDB->fetchAssoc($result);
457  return $row["logcount"];
458  }
459  else
460  {
461  return 0;
462  }
463  }
$result
Create styles array
The data for the language used.
global $ilDB

◆ getScoringAdjustableQuestions()

static ilObjAssessmentFolder::getScoringAdjustableQuestions ( )
static

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

252  {
253  $setting = new ilSetting("assessment");
254 
255  $types = $setting->get("assessment_scoring_adjustment");
256  return explode(",", $types);
257  }
ILIAS Setting Class.

◆ getScoringAdjustmentEnabled()

static ilObjAssessmentFolder::getScoringAdjustmentEnabled ( )
static

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

273  {
274  $setting = new ilSetting("assessment");
275  return $setting->get('assessment_adjustments_enabled');
276  }
ILIAS Setting Class.

◆ getSkillTriggerAnswerNumberBarrier()

static ilObjAssessmentFolder::getSkillTriggerAnswerNumberBarrier ( )
static

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

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

64  {
65  require_once 'Services/Administration/classes/class.ilSetting.php';
66  $assSettings = new ilSetting('assessment');
67 
68  return $assSettings->get(
69  self::SETTINGS_KEY_SKL_TRIG_NUM_ANSWERS_BARRIER,
70  self::DEFAULT_SKL_TRIG_NUM_ANSWERS_BARRIER
71  );
72  }
ILIAS Setting Class.
+ Here is the caller graph for this function:

◆ getSkillTriggeringNumAnswersBarrier()

ilObjAssessmentFolder::getSkillTriggeringNumAnswersBarrier ( )

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

546  {
547  return $this->setting->get(
548  'ass_skl_trig_num_answ_barrier', self::DEFAULT_SKL_TRIG_NUM_ANSWERS_BARRIER
549  );
550  }

◆ getValidAssessmentProcessLockModes()

static ilObjAssessmentFolder::getValidAssessmentProcessLockModes ( )
static

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

References array.

Referenced by ilObjAssessmentFolderGUI\saveSettingsObject().

541  {
542  return array(self::ASS_PROC_LOCK_MODE_NONE, self::ASS_PROC_LOCK_MODE_FILE, self::ASS_PROC_LOCK_MODE_DB);
543  }
Create styles array
The data for the language used.
+ 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

ilSetting $ilSetting

Returns
bool $isPageEditorEnabled

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

References $ilSetting.

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

518  {
519  require_once 'Modules/TestQuestionPool/classes/class.assQuestion.php';
520 
521  global $ilSetting;
522 
523  $isPageEditorEnabled = $ilSetting->get(
524  'enable_tst_page_edit', self::ADDITIONAL_QUESTION_CONTENT_EDITING_MODE_PAGE_OBJECT_DISABLED
525  );
526 
527  return $isPageEditorEnabled;
528  }
global $ilSetting
Definition: privfeed.php:17
+ Here is the caller graph for this function:

◆ questionSupportsScoringAdjustment()

ilObjAssessmentFolder::questionSupportsScoringAdjustment ( \assQuestionGUI  $question_object)
private

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

Referenced by fetchScoringAdjustableTypes().

586  {
587  return ($question_object instanceof ilGuiQuestionScoringAdjustable
588  || $question_object instanceof ilGuiAnswerScoringAdjustable)
589  && ($question_object->object instanceof ilObjQuestionScoringAdjustable
590  || $question_object->object instanceof ilObjAnswerScoringAdjustable);
591  }
Interface ilObjAnswerScoringAdjustable.
Interface ilObjQuestionScoringAdjustable.
Interface ilGuiAnswerScoringAdjustable.
Interface ilGuiQuestionScoringAdjustable.
+ Here is the caller graph for this function:

◆ setAssessmentProcessLockMode()

ilObjAssessmentFolder::setAssessmentProcessLockMode (   $lockMode)

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

536  {
537  $this->setting->set('ass_process_lock_mode', $lockMode);
538  }

◆ setExportEssayQuestionsWithHtml()

ilObjAssessmentFolder::setExportEssayQuestionsWithHtml (   $value)

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

558  {
559  $this->setting->set('export_essay_qst_with_html', $value);
560  }

◆ setScoringAdjustableQuestions()

static ilObjAssessmentFolder::setScoringAdjustableQuestions (   $type_ids)
static

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

260  {
261  $setting = new ilSetting("assessment");
262  if ((!is_array($type_ids)) || (count($type_ids) == 0))
263  {
264  $setting->delete("assessment_scoring_adjustment");
265  }
266  else
267  {
268  $setting->set("assessment_scoring_adjustment", implode($type_ids, ","));
269  }
270  }
ILIAS Setting Class.

◆ setScoringAdjustmentEnabled()

static ilObjAssessmentFolder::setScoringAdjustmentEnabled (   $active)
static

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

279  {
280  $setting = new ilSetting('assessment');
281  $setting->set('assessment_adjustments_enabled', (bool) $active);
282  }
ILIAS Setting Class.

◆ setSkillTriggeringNumAnswersBarrier()

ilObjAssessmentFolder::setSkillTriggeringNumAnswersBarrier (   $skillTriggeringNumAnswersBarrier)

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

553  {
554  $this->setting->set('ass_skl_trig_num_answ_barrier', $skillTriggeringNumAnswersBarrier);
555  }

◆ update()

ilObjAssessmentFolder::update ( )

update object data

public

Returns
boolean

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

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

Field Documentation

◆ $setting

ilObjAssessmentFolder::$setting

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

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