-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make course activities child activities discoverable #378
Comments
Hey @t-fritsch! I'm sorry to say that the |
thanks for your reply @wilbrdt and sorry for the delay, I missed the notification 😬 I would have been happy to help but I'm unfortunately not a python developer (only TS/JS here), so this would require too much investment for now, I'll instead investigate for another LRS solution in the hope one has this feature implemented. |
Feature Request
Is your feature request related to a problem or unsupported use case? Please describe.
Goal
As a Learning Record Consumer, I want to be able to
related_activities
query parameter)Existing situation
The only thing Ralph can do to adress this issue is return statements that match an activity (using an activity id IRI)
This solution will only look into the “object” part of the statement and match
statement.object.objectType == “Activity” && statement.object.id == activity_id
This approach does not handle hierarchical activity relations (e.g. a question in a quizz belonging to a course) that is specified in
statement.context.contextActivities
complexity: On
Describe the solution you'd like
There are different ways to handle this case. My favorite would be to use the Activity Profile Resource that serves as a scratchpad key value store for activity metadata.
Using this resource would allow us to store the list of children activities into the profile activity (by activity id and profile id) and query the list by doing a GET on
/xAPI/activity/profile?activity=<courseId>&profileId=<profileId>
We can either:
/xAPI/activity/profile
from outside of ralph : e.g. from the LMS ..?/xAPI/statement
check if the object is an activity (AND optionally check the parent activity is a course id) and then :/xAPI/activty/profile
to keep the LRS semantics : this would be my preferred solutionThis resource could be implemented following the related #379
Describe alternatives you've considered
Using related_activities=true
The LRS spec defines a boolean parameter related_activities that extends the match to context.contextActivities : Apply the Activity filter broadly. Include Statements for which the Object, any of the context Activities, or any of those properties in a contained SubStatement match the Activity parameter
This solution is slow and executes in 0n
Using activities resource
Ralph could maintain an internal canonical activity definition for the course exposed as an activity resource. Every time a statement is pushed that relates to the course we add the activity to the inner activity list.
The list could be exposed in the moreInfo irl or extensions property
Complexity is constant.
Question : Would this update to the canonical activity definition be fully compliant ? see spec. LRSQL does indeed seem to update the definition.
Question : the spec does not specify if we would need to return the full course activity definition in existing statements ?
NB : populating the activity resource means the resource would be returned when querying statements with
format=canonical
with the list of children activities. Is this behavior what we want ?LRSQL does not register activities resources by looking up context.contextActivities. This is not specificed in the spec from what I understand, we might still be able to do it.
This solution could be applied to all statements and activities, creating activity resources every time new activities appear in statements (considering activities and related activities) or just do this for courses. The latter might be less generic and less spec compliant.
Using a metadata provider
Too complicated surely but we could also make the course id an IRL that would be hosted outside ralph (e.g. by an LMS) and store a list of activities.
The activity metadata would be fetched directly from the metadata provider or possibly in the activities resource
Problems:
Discovery, Documentation, Adoption, Migration Strategy
Users will be able to GET the
/xAPI/activity/profile?activity_id=<activity_id>
and get the activitiy definition enriched by the list of its children activities of type :Do you want to work on it through a Pull Request?
Yes, but first let's discuss it !
The text was updated successfully, but these errors were encountered: