ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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...
 
 setOfflineStatus ($a_status)
 Set offline status. More...
 
 getOfflineStatus ()
 Get offline status. More...
 
 supportsOfflineHandling ()
 Check whether object supports offline handling. 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...
 
 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 ()
 
 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 lookupOfflineStatus ($a_obj_id)
 Lookup offline status using objectDataCache. 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. 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 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 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  }

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

References $DIC, $ilDB, and $ilUser.

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

277  {
278  global $DIC;
279  $ilUser = $DIC['ilUser'];
280  $ilDB = $DIC['ilDB'];
281  if (strlen($question_id) == 0) {
282  $question_id = null;
283  }
284  if (strlen($original_id) == 0) {
285  $original_id = null;
286  }
287  if (strlen($test_ref_id) == 0) {
288  $test_ref_id = null;
289  }
290  $only = ($test_only == true) ? 1 : 0;
291  $next_id = $ilDB->nextId('ass_log');
292  $affectedRows = $ilDB->manipulateF(
293  "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)",
294  array('integer', 'integer', 'integer', 'text', 'integer', 'integer', 'text', 'integer', 'integer'),
295  array(
296  $next_id,
297  $user_id,
298  $object_id,
299  $logtext,
300  $question_id,
301  $original_id,
302  $only,
303  $test_ref_id,
304  time()
305  )
306  );
307  }
global $DIC
Definition: saml.php:7
$ilUser
Definition: imgupload.php:18
global $ilDB
+ 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.

References $setting.

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  }

◆ _enabledAssessmentLogging()

static ilObjAssessmentFolder::_enabledAssessmentLogging ( )
static

check wether assessment logging is enabled or not

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

References $setting.

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(), assMultipleChoice\isForcedEmptySolution(), 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(), assTextQuestion\saveWorkingData(), assTextSubset\saveWorkingData(), assSingleChoice\saveWorkingData(), assLongMenu\saveWorkingData(), assFileUpload\saveWorkingData(), assImagemapQuestion\saveWorkingData(), assFormulaQuestion\saveWorkingData(), assMatchingQuestion\saveWorkingData(), assClozeTest\saveWorkingData(), and ilObjAssessmentFolderGUI\showLogSettingsObject().

119  {
120  $setting = new ilSetting("assessment");
121 
122  return (boolean) $setting->get("assessment_logging");
123  }
+ Here is the caller graph for this function:

◆ _getForbiddenQuestionTypes()

static ilObjAssessmentFolder::_getForbiddenQuestionTypes ( )
static

Returns the forbidden questiontypes for ILIAS.

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

References $result, and $setting.

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

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

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

Referenced by ilObjTestGUI\historyObject().

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

References $lang, and $setting.

Referenced by assQuestion\_setReachedPoints(), ilObjTest\addExtraTime(), assQuestion\calculateResultsFromSolution(), ilObjTest\checkMaximumAllowedUsers(), ilObjTest\getManualFeedback(), ilTestPasswordChecker\getWrongEnteredPasswordLogMsg(), ilObjTest\insertQuestion(), assKprimChoice\isComplete(), assMultipleChoice\isForcedEmptySolution(), 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(), assTextQuestion\saveWorkingData(), assTextSubset\saveWorkingData(), assSingleChoice\saveWorkingData(), assLongMenu\saveWorkingData(), assFileUpload\saveWorkingData(), assImagemapQuestion\saveWorkingData(), assFormulaQuestion\saveWorkingData(), assMatchingQuestion\saveWorkingData(), assClozeTest\saveWorkingData(), and ilObjAssessmentFolderGUI\showLogSettingsObject().

160  {
161  $setting = new ilSetting("assessment");
162 
163  $lang = $setting->get("assessment_log_language");
164  if (strlen($lang) == 0) {
165  $lang = "en";
166  }
167  return $lang;
168  }
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

◆ _getManualScoringTypes()

static ilObjAssessmentFolder::_getManualScoringTypes ( )
static

Retrieve the manual scoring settings as type strings.

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

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

Referenced by assQuestion\_needsManualScoring().

203  {
204  global $DIC;
205  $ilDB = $DIC['ilDB'];
206 
207  $result = $ilDB->query("SELECT * FROM qpl_qst_type");
208  $dbtypes = array();
209  while ($row = $ilDB->fetchAssoc($result)) {
210  $dbtypes[$row["question_type_id"]] = $row["type_tag"];
211  }
212  $setting = new ilSetting("assessment");
213  $types = $setting->get("assessment_manual_scoring");
214  $ids = explode(",", $types);
215  foreach ($ids as $key => $value) {
216  $ids[$key] = $dbtypes[$value];
217  }
218  return $ids;
219  }
$result
global $DIC
Definition: saml.php:7
$row
global $ilDB
$key
Definition: croninfo.php:18
+ 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 179 of file class.ilObjAssessmentFolder.php.

Referenced by ilTestScoringGUI\executeCommand().

180  {
181  if (count(self::_getManualScoring()) > 0) {
182  return true;
183  }
184 
185  return false;
186  }
+ 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.

References $setting.

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  }

◆ _setLogLanguage()

ilObjAssessmentFolder::_setLogLanguage (   $a_language)

set the log language

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

References $setting.

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

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

References $setting.

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

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

References $DIC, $ilDB, and $ilUser.

473  {
474  global $DIC;
475  $ilDB = $DIC['ilDB'];
476  $ilUser = $DIC['ilUser'];
477 
478  foreach ($a_array as $object_id) {
479  $affectedRows = $ilDB->manipulateF(
480  "DELETE FROM ass_log WHERE obj_fi = %s",
481  array('integer'),
482  array($object_id)
483  );
484  self::_addLog($ilUser->getId(), $object_id, $this->lng->txt("assessment_log_deleted"));
485  }
486  }
global $DIC
Definition: saml.php:7
$ilUser
Definition: imgupload.php:18
global $ilDB

◆ fetchScoringAdjustableTypes()

ilObjAssessmentFolder::fetchScoringAdjustableTypes (   $allQuestionTypes)

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

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

548  {
549  require_once 'Modules/TestQuestionPool/classes/class.assQuestionGUI.php';
550  $scoringAdjustableQuestionTypes = array();
551 
552  foreach ($allQuestionTypes as $type => $typeData) {
553  $questionGui = assQuestionGUI::_getQuestionGUI($typeData['type_tag']);
554 
555  if ($this->questionSupportsScoringAdjustment($questionGui)) {
556  $scoringAdjustableQuestionTypes[$type] = $typeData;
557  }
558  }
559 
560  return $scoringAdjustableQuestionTypes;
561  }
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...
+ Here is the call graph for this function:

◆ getAssessmentProcessLockMode()

ilObjAssessmentFolder::getAssessmentProcessLockMode ( )

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

510  {
511  return $this->setting->get('ass_process_lock_mode', self::ASS_PROC_LOCK_MODE_NONE);
512  }

◆ getExportEssayQuestionsWithHtml()

ilObjAssessmentFolder::getExportEssayQuestionsWithHtml ( )

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

543  {
544  return $this->setting->get('export_essay_qst_with_html');
545  }

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

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

451  {
452  global $DIC;
453  $tree = $DIC['tree'];
454  $path = $tree->getPathFull($ref_id);
455  $pathelements = array();
456  foreach ($path as $id => $data) {
457  if ($id == 0) {
458  array_push($pathelements, ilUtil::prepareFormOutput($this->lng->txt("repository")));
459  } else {
460  array_push($pathelements, "<a href=\"./goto.php?target=" . $data["type"] . "_" . $data["ref_id"] . "&amp;client=" . CLIENT_ID . "\">" .
461  ilUtil::prepareFormOutput($data["title"]) . "</a>");
462  }
463  }
464  return implode("&nbsp;&gt;&nbsp;", $pathelements);
465  }
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
$path
Definition: aliased.php:25
global $DIC
Definition: saml.php:7
$data
Definition: bench.php:6
+ 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 317 of file class.ilObjAssessmentFolder.php.

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

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

318  {
319  global $DIC;
320  $ilDB = $DIC['ilDB'];
321 
322  $log = array();
323  if ($test_only == true) {
324  $result = $ilDB->queryF(
325  "SELECT * FROM ass_log WHERE obj_fi = %s AND tstamp > %s AND tstamp < %s AND test_only = %s ORDER BY tstamp",
326  array('integer','integer','integer','text'),
327  array(
328  $test_id,
329  $ts_from,
330  $ts_to,
331  1
332  )
333  );
334  } else {
335  $result = $ilDB->queryF(
336  "SELECT * FROM ass_log WHERE obj_fi = %s AND tstamp > %s AND tstamp < %s ORDER BY tstamp",
337  array('integer','integer','integer'),
338  array(
339  $test_id,
340  $ts_from,
341  $ts_to
342  )
343  );
344  }
345  while ($row = $ilDB->fetchAssoc($result)) {
346  if (!array_key_exists($row["tstamp"], $log)) {
347  $log[$row["tstamp"]] = array();
348  }
349  array_push($log[$row["tstamp"]], $row);
350  }
351  krsort($log);
352  // flatten array
353  $log_array = array();
354  foreach ($log as $key => $value) {
355  foreach ($value as $index => $row) {
356  array_push($log_array, $row);
357  }
358  }
359  return $log_array;
360  }
$result
global $DIC
Definition: saml.php:7
$index
Definition: metadata.php:60
$row
global $ilDB
$key
Definition: croninfo.php:18
+ 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 427 of file class.ilObjAssessmentFolder.php.

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

428  {
429  global $DIC;
430  $ilDB = $DIC['ilDB'];
431  $result = $ilDB->queryF(
432  "SELECT COUNT(obj_fi) logcount FROM ass_log WHERE obj_fi = %s",
433  array('integer'),
434  array($test_obj_id)
435  );
436  if ($result->numRows()) {
437  $row = $ilDB->fetchAssoc($result);
438  return $row["logcount"];
439  } else {
440  return 0;
441  }
442  }
$result
global $DIC
Definition: saml.php:7
$row
global $ilDB

◆ getScoringAdjustableQuestions()

static ilObjAssessmentFolder::getScoringAdjustableQuestions ( )
static

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

References $setting.

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

◆ getScoringAdjustmentEnabled()

static ilObjAssessmentFolder::getScoringAdjustmentEnabled ( )
static

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

References $setting.

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

◆ getSkillTriggerAnswerNumberBarrier()

static ilObjAssessmentFolder::getSkillTriggerAnswerNumberBarrier ( )
static

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

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

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  }
+ Here is the caller graph for this function:

◆ getSkillTriggeringNumAnswersBarrier()

ilObjAssessmentFolder::getSkillTriggeringNumAnswersBarrier ( )

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

525  {
526  return $this->setting->get(
527  'ass_skl_trig_num_answ_barrier',
528  self::DEFAULT_SKL_TRIG_NUM_ANSWERS_BARRIER
529  );
530  }

◆ getValidAssessmentProcessLockModes()

static ilObjAssessmentFolder::getValidAssessmentProcessLockModes ( )
static

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

Referenced by ilObjAssessmentFolderGUI\saveSettingsObject().

520  {
521  return array(self::ASS_PROC_LOCK_MODE_NONE, self::ASS_PROC_LOCK_MODE_FILE, self::ASS_PROC_LOCK_MODE_DB);
522  }
+ 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 494 of file class.ilObjAssessmentFolder.php.

References $DIC, and $ilSetting.

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

495  {
496  require_once 'Modules/TestQuestionPool/classes/class.assQuestion.php';
497 
498  global $DIC;
499  $ilSetting = $DIC['ilSetting'];
500 
501  $isPageEditorEnabled = $ilSetting->get(
502  'enable_tst_page_edit',
503  self::ADDITIONAL_QUESTION_CONTENT_EDITING_MODE_PAGE_OBJECT_DISABLED
504  );
505 
506  return $isPageEditorEnabled;
507  }
global $DIC
Definition: saml.php:7
global $ilSetting
Definition: privfeed.php:17
+ Here is the caller graph for this function:

◆ questionSupportsScoringAdjustment()

ilObjAssessmentFolder::questionSupportsScoringAdjustment ( \assQuestionGUI  $question_object)
private

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

Referenced by fetchScoringAdjustableTypes().

564  {
565  return ($question_object instanceof ilGuiQuestionScoringAdjustable
566  || $question_object instanceof ilGuiAnswerScoringAdjustable)
567  && ($question_object->object instanceof ilObjQuestionScoringAdjustable
568  || $question_object->object instanceof ilObjAnswerScoringAdjustable);
569  }
Interface ilObjAnswerScoringAdjustable.
Interface ilObjQuestionScoringAdjustable.
Interface ilGuiAnswerScoringAdjustable.
Interface ilGuiQuestionScoringAdjustable.
+ Here is the caller graph for this function:

◆ setAssessmentProcessLockMode()

ilObjAssessmentFolder::setAssessmentProcessLockMode (   $lockMode)

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

515  {
516  $this->setting->set('ass_process_lock_mode', $lockMode);
517  }

◆ setExportEssayQuestionsWithHtml()

ilObjAssessmentFolder::setExportEssayQuestionsWithHtml (   $value)

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

538  {
539  $this->setting->set('export_essay_qst_with_html', $value);
540  }

◆ setScoringAdjustableQuestions()

static ilObjAssessmentFolder::setScoringAdjustableQuestions (   $type_ids)
static

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

References $setting.

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

◆ setScoringAdjustmentEnabled()

static ilObjAssessmentFolder::setScoringAdjustmentEnabled (   $active)
static

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

References $setting.

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

◆ setSkillTriggeringNumAnswersBarrier()

ilObjAssessmentFolder::setSkillTriggeringNumAnswersBarrier (   $skillTriggeringNumAnswersBarrier)

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

533  {
534  $this->setting->set('ass_skl_trig_num_answ_barrier', $skillTriggeringNumAnswersBarrier);
535  }

◆ update()

ilObjAssessmentFolder::update ( )

update object data

public

Returns
boolean

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

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

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)
+ 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: