Skip to content

Conversation

@milt
Copy link
Member

@milt milt commented May 5, 2021

LRS-30
Wherein we strive to be conformant per version "2.0" of the conformance tests:
https://github.com/adlnet/lrs-conformance-test-suite/tree/LRS-2.0

Will require a decent rework to handle both old and new versions, this branch starts that process.

Currently passes 1.0.3 AND 2.0.0 tests (on the master branch) in both CLJ and CLJS

Also see: yetanalytics/xapi-schema#90 for the xapi-schema-component

Notable Internals for implementors

LRS implementors can leverage the following features

  • :com.yetanalytics.lrs/version ctx value - the given (valid) client xapi version of request
  • There is now a ctx argument on every LRS method

TODO:

  • Update for release version of tests
  • pass version to impl
  • full dispatch on version (is custom now)
  • Fix hack to return 1.0.3 on non-statement routes in interceptor
  • properly destructure and use contextAgents and contextGroups in memory impl
  • add/ensure support for as-yet untested Last-Modified header
  • full backwards compat pending fixes to the 2.0 branch and fixes to master
  • update to release version of xapi-schema

@milt milt changed the title LRS-30 LRS-30 Support LRS 2.0 May 5, 2021
milt added 28 commits July 19, 2021 11:51
* LRS-30 backwards compatible but now fails both branches

* LRS-30 fix alt syntax backwards compat, more issues remain

* LRS-30 return a valid old version if specified

* conditional version dispatch for doc etag behavior

* test multiple versions

* remove println

* deps

* bump tmp

* correct sync doc handling

* bump cljs

* fix cljs multipart handling

* bump ci java version
@milt milt mentioned this pull request Aug 26, 2025
4 tasks
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there were some major errors in this file, interceptors being applied multiple times or not at all

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2.0.0 has weird duration normalization requirements

(defn normalize-duration
"Normalize an xAPI duration string to 0.01 second precision"
[duration]
(let [duration-str (subs duration 1) ;; Remove 'P'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm surprised there is not an easy lib for this.

@milt milt merged commit e82ab84 into master Oct 6, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants