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

  1. 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?]

  2. Exercise

    • passed: Exercise Passed Status (DB: exc_members.status == "passed")
      • Implementation: ilObjExercise::_checkCondition() => ilExerciseMembers::_lookupStatus()
      • LP: ilLPStatusExerciseReturned::determineStatus() => ilExerciseMembers::_lookupStatus()[ok]

  3. 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)

  4. Survey

    • finished: Survey Finished Status (DB: svy_finished.state == 1)
      • Implementation: ilObjSurvey::_checkCondition() => ilObjSurveyAccess::_lookupFinished()
      • LP: none

  5. Test

    • finished: Test Finished Status (DB: tst_active.tries > 0)
      • Implementation: ilObjTestAccess::_checkCondition() => ilObjTestAccess::_hasFinished()
      • LP: ilLPStatusTestPassed::determineStatus() [direct DB access, should be changed?]
    • not finished
      • Implementation: ! finished
    • passed: Test Passed Status (complex processing)
      • Implementation: ilObjTestAccess::_checkCondition() => ilObjTestAccess::_isPassed()
      • LP: ilLPStatusTestPassed::determineStatus() => ilObjTestAccess::_isPassed() [ok]

Implementation

The conditions are checked using
ilConditionHandler::_checkCondition()
The methods called differ for each object type - see above.
 
ilObjCourseGrouping is only used internally and not relevant for any precondition refactoring.