Interface Lesson

All Superinterfaces:
Browsable, Extensible, Identifiable, OsidObject, OsidRelationship, Temporal

public interface Lesson extends OsidRelationship

A Lesson is the application of a Docet to a Plan . The effectiveness of the lesson determines the applicability of the lesson. The lesson includes additional times for the starting and completion of the lesson.

  • Method Details

    • getPlanId

      Id getPlanId()
      Gets the Id of the plan.
      Returns:
      the plan Id
      Compliance:
      mandatory - This method must be implemented.
    • getPlan

      Plan getPlan() throws OperationFailedException
      Gets the plan.
      Returns:
      the plan
      Throws:
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getDocetId

      Id getDocetId()
      Gets the Id of the docet.
      Returns:
      the lesson Id
      Compliance:
      mandatory - This method must be implemented.
    • getDocet

      Docet getDocet() throws OperationFailedException
      Gets the docet.
      Returns:
      the docet
      Throws:
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getActivityIds

      IdList getActivityIds()
      Gets the Ids of the activities to which this lesson applies.
      Returns:
      the activity Ids
      Compliance:
      mandatory - This method must be implemented.
    • getActivities

      ActivityList getActivities() throws OperationFailedException
      Gets the activities to which this lesson applies. A Lesson may span multiple scheduled activities.
      Returns:
      the activities
      Throws:
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getPlannedStartTime

      Duration getPlannedStartTime()
      Gets the planned start time within the first activity as determined by the Lesson scheduling. The time expressed as a duration relative to the starting time of the first activity.
      Returns:
      the starting time
      Compliance:
      mandatory - This method must be implemented.
    • hasBegun

      boolean hasBegun()
      Tests if this lesson has begun. hasBegun() is true for completed lessons. A lesson in progress is one where hasBegun() is true and isComplete() or isSkipped() is false .
      Returns:
      true if this lesson has begun, false if not yet begun
      Compliance:
      mandatory - This method must be implemented.
    • getActualStartTime

      Duration getActualStartTime()
      Gets the actual start time. The time expressed as a duration relative to the starting time of the actual starting activity.
      Returns:
      the actual starting time
      Throws:
      IllegalStateException - hasBegun() is false
      Compliance:
      mandatory - This method must be implemented.
    • getActualStartingActivityId

      Id getActualStartingActivityId()
      Gets the Id of the activity when this lesson actually began.
      Returns:
      the starting activity Id
      Throws:
      IllegalStateException - hasBegun() is false
      Compliance:
      mandatory - This method must be implemented.
    • getActualStartingActivity

      Activity getActualStartingActivity() throws OperationFailedException
      Gets the activity when this lesson actually began.
      Returns:
      the starting activity
      Throws:
      OperationFailedException - unable to complete request
      IllegalStateException - hasBegun() is false
      Compliance:
      mandatory - This method must be implemented.
    • isComplete

      boolean isComplete()
      Tests if this lesson has been marked as completed.
      Returns:
      true if this lesson is complete, false if not completed
      Throws:
      IllegalStateException - hasBegun() is false
      Compliance:
      mandatory - This method must be implemented.
    • isSkipped

      boolean isSkipped()
      Tests if this lesson has been marked as skipped. A skipped lesson may have been partially undertaken but isComplete() remains false .
      Returns:
      true if this lesson is skipped, false if not completed
      Compliance:
      mandatory - This method must be implemented.
    • getActualEndTime

      Duration getActualEndTime()
      Gets the actual completion time. The time expressed as a duration relative to the starting time of the ending activity.
      Returns:
      the actual end time
      Throws:
      IllegalStateException - isComplete() and isSkipped() is false
      Compliance:
      mandatory - This method must be implemented.
    • getActualEndingActivityId

      Id getActualEndingActivityId()
      Gets the Id of the activity when this lesson was completed or skipped.
      Returns:
      the ending activity Id
      Throws:
      IllegalStateException - isComplete() and isSkipped() is false
      Compliance:
      mandatory - This method must be implemented.
    • getActualEndingActivity

      Activity getActualEndingActivity() throws OperationFailedException
      Gets the activity when this lesson was completed or skipped.
      Returns:
      the ending activity
      Throws:
      OperationFailedException - unable to complete request
      IllegalStateException - isComplete() and isSkipped() is false
      Compliance:
      mandatory - This method must be implemented.
    • getActualTimeSpent

      Duration getActualTimeSpent()
      Gets the actual duration of this lesson if it has completed, in progress, or skipped.
      Returns:
      the actual time spent
      Throws:
      IllegalStateException - hasBegun() is false
      Compliance:
      mandatory - This method must be implemented.
    • getLessonRecord

      LessonRecord getLessonRecord(Type lessonRecordType) throws OperationFailedException
      Gets the lesson record corresponding to the given Lesson record Type .This method must be used to retrieve an object implementing the requested record. The lessonRecordType may be the Type returned in getRecordTypes() or any of its parents in a Type hierarchy where hasRecordType(lessonRecordType) is true .
      Parameters:
      lessonRecordType - the type of lesson record to retrieve
      Returns:
      the lesson record
      Throws:
      NullArgumentException - lessonRecordType is null
      OperationFailedException - unable to complete request
      UnsupportedException - hasRecordType(planRecordType) is false
      Compliance:
      mandatory - This method must be implemented.