Development Guide
Preconditions
This page is work in progress.
Precondition Triggers and Conditions
This is a list of components that can become precondition triggers and their related condition types (status 4.4):
Course
- passed: Course Passed Status (DB:
obj_members.passed == 1
)- Implementation:
ilObjCourse::_checkCondition() => ilCourseParticipants::_hasPassed()
- LP: only if sync active !
LP_MODE_MANUAL_BY_TUTOR
:ilObjCourseGUI::updateLPFromStatus()
[ok]LP_MODE_COLLECTION
: will overwrite course passed status if not set manually [problem?]
- Implementation:
- passed: Course Passed Status (DB:
Exercise
- passed: Exercise Passed Status (DB:
exc_members.status == "passed"
)- Implementation:
ilObjExercise::_checkCondition() => ilExerciseMembers::_lookupStatus()
- LP:
ilLPStatusExerciseReturned::determineStatus() => ilExerciseMembers::_lookupStatus()
[ok]
- Implementation:
- passed: Exercise Passed Status (DB:
Learning Module SCORM
- finished selected SCO(s): LP (DB:
ut_lp_marks.status == ilLPStatus::LP_STATUS_COMPLETED_NUM
)- Implementation:
ilLPStatus::_hasUserCompleted()
- It seems that the LP SCO collection is used and cannot be altered (for each reference)
- Implementation:
- finished selected SCO(s): LP (DB:
Survey
- finished: Survey Finished Status (DB:
svy_finished.state == 1
)- Implementation:
ilObjSurvey::_checkCondition() => ilObjSurveyAccess::_lookupFinished()
- LP: none
- Implementation:
- finished: Survey Finished Status (DB:
Test
- finished: Test Finished Status (DB:
tst_active.tries > 0
)- Implementation:
ilObjTestAccess::_checkCondition() => ilObjTestAccess::_hasFinished()
- LP:
ilLPStatusTestPassed::determineStatus()
- Implementation:
- not finished
- Implementation:
! finished
- Implementation:
- passed: Test Passed Status (complex processing)
- Implementation:
ilObjTestAccess::_checkCondition() => ilObjTestAccess::_isPassed()
- LP:
ilLPStatusTestPassed::determineStatus() => ilObjTestAccess::_isPassed()
[ok]
- Implementation:
- finished: Test Finished Status (DB:
Implementation
The conditions are checked usingilConditionHandler::_checkCondition()
The methods called differ for each object type - see above.
ilObjCourseGrouping is only used internally and not relevant for any precondition refactoring.