Uploaded image for project: 'OpenOLAT'
  1. OpenOLAT
  2. OO-804

New course expert rule to test the date of the last attempt of a course element

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 9.0.5
    • Component/s: Course
    • Labels:
      None

      Description

      A new expert rule is added to the course interpreter: getLastAttemptDate

      The function can be used to get the date of the last time the user attempted the course element, e.g. launched the test. You could then prevent a user from doing the test twice within 24h hours with the following code:

      ( 
        (getAttempts("70323786958847") == 0)
        | getPassed("70323786958847")
        | ( (getLastAttemptDate("70323786958847") + 24h ) < now ) 
      )
      

        Attachments

          Activity

            People

            • Assignee:
              gnaegi Florian Gnägi
              Reporter:
              gnaegi Florian Gnägi
              Tester:
              Stéphane Rossé
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 2 hours Original Estimate - 2 hours
                2h
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 hours
                3h