Settings for LO courses.
More...
|
static | isCompleted ($a_cont_oid, $a_test_rid, $a_objective_id, $max_points, $reached, $limit_perc) |
| Check if objective is completed. More...
|
|
static | lookupObjectiveRequiredPercentage ($a_container_id, $a_objective_id, $a_test_ref_id, $a_max_points) |
|
static | lookupRandomTest ($a_test_obj_id) |
| Check if test is a random test. More...
|
|
static | lookupQplBySequence ($a_test_ref_id, $a_sequence_id) |
| Lookup assigned qpl name (including taxonomy) by sequence. More...
|
|
static | hasActiveRun ($a_container_id, $a_test_ref_id, $a_objective_id) |
|
static | getTestResultLinkForUser ($a_test_ref_id, $a_user_id) |
|
Settings for LO courses.
- Author
- Stefan Meyer smeye.nosp@m.r.il.nosp@m.ias@g.nosp@m.mx.d.nosp@m.e
- Version
- $Id$
Definition at line 10 of file class.ilLOUtils.php.
◆ buildQplTitleByDefinition()
build title by definition
- Parameters
-
Definition at line 170 of file class.ilLOUtils.php.
References $title, ilTestRandomQuestionSetSourcePoolDefinition\getMappedTaxonomyFilter(), ilTestRandomQuestionSetSourcePoolDefinition\getPoolTitle(), ilTestTaxonomyFilterLabelTranslater\getTaxonomyFilterLabel(), ilTestRandomQuestionSetSourcePoolDefinition\getTypeFilter(), and ilTestTaxonomyFilterLabelTranslater\getTypeFilterLabel().
174 $filterTitle = array();
177 if (!empty($filterTitle)) {
178 $title .=
' -> ' . implode(
' / ', $filterTitle);
180 #$tax_id = $def->getMappedFilterTaxId(); 183 # $title .= (' -> '. $trans->getTaxonomyTreeLabel($tax_id)); 185 #$tax_node = $def->getMappedFilterTaxNodeId(); 188 # $title .= (' -> ' .$trans->getTaxonomyNodeLabel($tax_node));
getTaxonomyFilterLabel($filter=array(), $filterDelimiter='+', $taxNodeDelimiter=':', $nodesDelimiter=', ')
Get the label for a taxonomy filter.
getTypeFilterLabel($filter=array())
Get the label for a type filter.
getMappedTaxonomyFilter()
get the mapped taxonomy filter conditions
◆ getTestResultLinkForUser()
static ilLOUtils::getTestResultLinkForUser |
( |
|
$a_test_ref_id, |
|
|
|
$a_user_id |
|
) |
| |
|
static |
Definition at line 223 of file class.ilLOUtils.php.
References $DIC, $ilCtrl, $ilUser, $valid, ilObjTest\_getActiveIdOfUser(), ilObjTest\_getTestIDFromObjectID(), ilObject\_lookupObjId(), and ilObjTestAccess\visibleUserResultExists().
Referenced by ilContainerObjectiveGUI\buildAccordionTitle(), ilContainerObjectiveGUI\buildObjectiveProgressBar(), and ilLOMemberTestResultTableGUI\createTestResultLink().
229 $ilAccess = $DIC[
'ilAccess'];
231 if (
$ilUser->getId() == ANONYMOUS_USER_ID) {
236 if ($a_user_id ==
$ilUser->getId()) {
237 $valid = $ilAccess->checkAccess(
'read',
'', $a_test_ref_id);
240 $valid = $ilAccess->checkAccess(
'write',
'', $a_test_ref_id);
246 require_once
'Modules/Test/classes/class.ilObjTestAccess.php';
248 $ilCtrl->setParameterByClass(
'ilObjTestGUI',
'ref_id', $a_test_ref_id);
249 $ctrlClasses = array(
'ilRepositoryGUI',
'ilObjTestGUI',
'ilTestResultsGUI');
250 $link =
$ilCtrl->getLinkTargetByClass($ctrlClasses);
251 $ilCtrl->setParameterByClass(
'ilObjTestGUI',
'ref_id',
'');
255 include_once
'Modules/Test/classes/class.ilObjTest.php';
260 $ilCtrl->setParameterByClass(
'ilTestEvaluationGUI',
'ref_id', $a_test_ref_id);
261 $ilCtrl->setParameterByClass(
'ilTestEvaluationGUI',
'active_id', $userActiveId);
262 $link =
$ilCtrl->getLinkTargetByClass(array(
'ilRepositoryGUI',
'ilObjTestGUI',
'ilTestEvaluationGUI'),
'outParticipantsResultsOverview');
263 $ilCtrl->setParameterByClass(
'ilTestEvaluationGUI',
'ref_id',
'');
264 $ilCtrl->setParameterByClass(
'ilTestEvaluationGUI',
'active_id',
'');
static visibleUserResultExists($testObjId, $userId)
static _lookupObjId($a_id)
static _getTestIDFromObjectID($object_id)
Returns the ILIAS test id for a given object id.
static _getActiveIdOfUser($user_id="", $test_id="")
Gets the active id of the tst_active table for the active user.
◆ hasActiveRun()
static ilLOUtils::hasActiveRun |
( |
|
$a_container_id, |
|
|
|
$a_test_ref_id, |
|
|
|
$a_objective_id |
|
) |
| |
|
static |
◆ isCompleted()
static ilLOUtils::isCompleted |
( |
|
$a_cont_oid, |
|
|
|
$a_test_rid, |
|
|
|
$a_objective_id, |
|
|
|
$max_points, |
|
|
|
$reached, |
|
|
|
$limit_perc |
|
) |
| |
|
static |
Check if objective is completed.
Definition at line 16 of file class.ilLOUtils.php.
References ilObject\_lookupObjId(), and ilLOSettings\getInstanceByObjId().
Referenced by ilLOTestQuestionAdapter\updateQuestionResult().
18 include_once
'./Modules/Course/classes/Objectives/class.ilLOSettings.php';
25 return ($reached / $max_points * 100) >= $limit_perc;
28 $required_perc = self::lookupObjectiveRequiredPercentage($a_cont_oid, $a_objective_id, $a_test_rid, $max_points);
33 return ($reached / $max_points * 100) >= $required_perc;
static getInstanceByObjId($a_obj_id)
get singleton instance
static _lookupObjId($a_id)
◆ lookupObjectiveRequiredPercentage()
static ilLOUtils::lookupObjectiveRequiredPercentage |
( |
|
$a_container_id, |
|
|
|
$a_objective_id, |
|
|
|
$a_test_ref_id, |
|
|
|
$a_max_points |
|
) |
| |
|
static |
- Parameters
-
type | $a_container_id | |
type | $a_objective_id | |
type | $a_test_type | |
Definition at line 44 of file class.ilLOUtils.php.
References $DIC, $factory, $ilDB, $query, $res, $row, ilObject\_lookupObjId(), ilDBConstants\FETCHMODE_OBJECT, ilLOTestAssignments\getInstance(), ilLOSettings\getInstanceByObjId(), ilLORandomTestQuestionPools\lookupLimit(), and ilCourseObjectiveQuestion\loookupTestLimit().
Referenced by ilLOTestQuestionAdapter\initUserResult().
46 include_once
'./Modules/Course/classes/Objectives/class.ilLOSettings.php';
49 include_once
'./Modules/Course/classes/Objectives/class.ilLOTestAssignments.php';
51 $a_test_type = $assignments->getTypeByTest($a_test_ref_id);
53 if ($assignments->isSeparateTest($a_test_ref_id)) {
54 include_once
'./Services/Object/classes/class.ilObjectFactory.php';
56 $tst =
$factory->getInstanceByRefId($a_test_ref_id,
false);
58 $schema = $tst->getMarkSchema();
59 foreach ($schema->getMarkSteps() as $mark) {
60 if ($mark->getPassed()) {
61 return (
int) $mark->getMinimumLevel();
69 $tst_ref_id = $a_test_ref_id;
71 include_once
'./Modules/Course/classes/Objectives/class.ilLORandomTestQuestionPools.php';
74 include_once
'./Modules/Course/classes/class.ilCourseObjectiveQuestion.php';
static getInstanceByObjId($a_obj_id)
get singleton instance
static loookupTestLimit($a_test_id, $a_objective_id)
static getInstance($a_container_id)
Get instance by container id.
static _lookupObjId($a_id)
static lookupLimit($a_container_id, $a_objective_id, $a_test_type)
lookup limit type $ilDB
◆ lookupQplBySequence()
static ilLOUtils::lookupQplBySequence |
( |
|
$a_test_ref_id, |
|
|
|
$a_sequence_id |
|
) |
| |
|
static |
Lookup assigned qpl name (including taxonomy) by sequence.
- Parameters
-
type | $a_test_ref_id | |
type | $a_sequence_id | |
- Returns
- string
Definition at line 130 of file class.ilLOUtils.php.
References $GLOBALS, $list, $title, $translator, and ilObjectFactory\getInstanceByRefId().
Referenced by ilCourseObjectivesTableGUI\parse().
132 if (!$a_sequence_id) {
139 include_once
'./Modules/Test/classes/class.ilTestRandomQuestionSetSourcePoolDefinitionList.php';
140 include_once
'./Modules/Test/classes/class.ilTestRandomQuestionSetSourcePoolDefinitionFactory.php';
150 $list->loadDefinitions();
152 include_once
'./Modules/Test/classes/class.ilTestTaxonomyFilterLabelTranslater.php';
157 foreach (
$list as $definition) {
158 if ($definition->getId() != $a_sequence_id) {
if(isset($_REQUEST['delete'])) $list
static getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.
◆ lookupRandomTest()
static ilLOUtils::lookupRandomTest |
( |
|
$a_test_obj_id | ) |
|
|
static |
The documentation for this class was generated from the following file: