Skip to content

Commit

Permalink
amend mod_assign assessable_submitted (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
milt authored Oct 25, 2024
1 parent 773e137 commit f5b0ef0
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 5 deletions.
17 changes: 15 additions & 2 deletions src/transformer/events/mod_assign/assignment_submitted.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,27 @@ function assignment_submitted(array $config, \stdClass $event) {
return [[
'actor' => utils\get_user($config, $user),
'verb' => $verb,
'object' => utils\get_activity\course_assignment($config, $event->contextinstanceid, $assignment->name, $lang),
'object' => [
'id' => $config['app_url']
. '/mod/assign/view.php?id='
. $event->contextinstanceid
. '#submission',
'objectType' => 'Activity',
'definition' => [
'type' => 'https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/submission',
'name' => [
$lang => $assignment->name . ' Submission',
]
]
],
'context' => [
'language' => $lang,
'extensions' => utils\extensions\base($config, $event, $course),
'contextActivities' => [
'parent' => utils\context_activities\get_parent(
$config,
$event->contextinstanceid
$event->contextinstanceid,
true
),
'category' => [
utils\get_activity\site($config),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,11 @@
"id": 1,
"name": "test_name"
}
],
"modules": [
{
"id": 1,
"name": "assign"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@
}
},
"object": {
"id": "http://www.example.org/mod/assign/view.php?id=1",
"id": "http://www.example.org/mod/assign/view.php?id=1#submission",
"objectType": "Activity",
"definition": {
"type": "http://adlnet.gov/expapi/activities/assessment",
"type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/submission",
"name": {
"en": "test_name"
"en": "test_name Submission"
}
}
},
Expand All @@ -34,6 +35,15 @@
},
"contextActivities": {
"parent": [
{
"id": "http://www.example.org/mod/assign/view.php?id=1",
"definition": {
"type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/assignment",
"name": {
"en": "test_name"
}
}
},
{
"id": "http://www.example.org/course/section.php?id=1",
"objectType": "Activity",
Expand Down

0 comments on commit f5b0ef0

Please sign in to comment.