-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨(xapi) add ralph-malph library for statements generation
Finally, we have integrated Ralph in marsha to help generate xAPI statements with Pydantic! However the integration is partial as statements are initialized from the frontend.
- Loading branch information
1 parent
8b7f32c
commit ccab22a
Showing
7 changed files
with
206 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,11 +41,11 @@ def test_xapi_statement_enrich_statement(self): | |
self.assertEqual( | ||
statement["actor"], | ||
{ | ||
"name": f"{user.username}", | ||
"objectType": "Agent", | ||
"account": { | ||
"name": f"{user.id}", | ||
"homePage": "http://marsha.education", | ||
"mbox": "mailto:[email protected]", | ||
}, | ||
}, | ||
) | ||
|
@@ -57,7 +57,6 @@ def test_xapi_statement_enrich_statement(self): | |
"name": {"en-US": "test document xapi"}, | ||
}, | ||
"id": "uuid://68333c45-4b8c-4018-a195-5d5e1706b838", | ||
"objectType": "Activity", | ||
}, | ||
) | ||
self.assertEqual( | ||
|
@@ -68,7 +67,14 @@ def test_xapi_statement_enrich_statement(self): | |
"43b4-8452-2037fed588df" | ||
}, | ||
"contextActivities": { | ||
"category": [{"id": "https://w3id.org/xapi/lms"}] | ||
"category": [ | ||
{ | ||
"definition": { | ||
"type": "http://adlnet.gov/expapi/activities/profile" | ||
}, | ||
"id": "https://w3id.org/xapi/lms", | ||
} | ||
] | ||
}, | ||
}, | ||
) | ||
|
Oops, something went wrong.