-
Notifications
You must be signed in to change notification settings - Fork 88
Yet Logstore Work 2024 #861
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
Merged
Merged
Changes from 250 commits
Commits
Show all changes
260 commits
Select commit
Hold shift + click to select a range
9de5d27
removing unnecessary docs
cliffcaseyyet 324608b
attempt to make sending actor name optional
milt 2c7108a
add configurable account homePage
milt d7fc83d
add new defaults to test
milt 8aa2ef3
accomodate test copypasta
milt d12d5a9
Merge pull request #2 from yetanalytics/conformant_actor
milt 15ff5ee
add universal debug event (#4)
milt d44d91d
reenable build matrix and chill code checker
milt ca4e21a
Merge pull request #6 from yetanalytics/ci_concerns_2
cliffcaseyyet 851537f
Merge pull request #1 from yetanalytics/timestamp_and_formatting_and_…
cliffcaseyyet 4edbefb
attempt downgrade of npm (#8)
milt 2e60f8d
adds badge_awarded event and tests, improves event exception handling
invaliduser 8d06c7a
wip commit for badge_revoked
cliffcaseyyet 8ef1deb
wip
invaliduser d44f3b3
revoked tests
invaliduser 07c414f
tests
invaliduser 80d6b8f
further
invaliduser ad4900b
further tests
invaliduser fcd2631
further tests
invaliduser 9fd7ee0
further
invaliduser fe16b3b
further
invaliduser 107b78a
further
invaliduser 4ec2891
remove extraneous calendar stuff
invaliduser c5fcb34
Merge pull request #7 from yetanalytics/badge_awarded
invaliduser 8c6239a
first crack at ccc with failing tests
milt 38108f1
valid xapi contextActivities (#10)
milt 8e16e1a
updated expected statement
milt 8c2850b
correct event
milt 69f6a0c
Merge branch 'master' into course_category_created
milt 58fc991
add event id everything else seems to have
milt 3b6972a
correct objectid
milt 9a0e3dc
the LMS is a course of course, of course
milt c2becd7
fix up expected statement
milt c831bda
refactor
milt 71f53dd
Revert "refactor"
milt daccc55
Revert "Revert "refactor""
milt 8ca7965
minor changes to align with current profile
milt 6f4996e
also update whatever this JISC thing is
milt ba691a6
formatting
milt 2268347
course completion updated
milt c5b5704
try removing workaround
milt 8529c00
Merge branch 'ci_fixes' into course_completion_updated
milt 7625f75
updated expected statement
milt fd80e47
correct weird version thingy
milt 6c1ab93
Merge pull request #13 from yetanalytics/ci_fixes
milt 9a419f4
Merge branch 'master' into course_completion_updated
milt 0d508ad
first crack
milt 167a0c6
correct event ext
milt 0c358b3
correct courseid
milt 9be35cf
correct expected id
milt dcc0d43
http://id.tincanapi.com/activitytype/lms -> https://w3id.org/xapi/cmi…
milt 6780908
try changing some number lol
milt 0fc2741
Revert "try changing some number lol"
milt 7e419da
let's try another
milt 32be045
remove expected count switch for <3.9
milt 50abe13
Merge pull request #15 from yetanalytics/course_created
milt ff667d8
Merge branch 'master' into course_completion_updated
milt db792aa
update course atype
milt e8a8e9b
Merge branch 'master' into course_completed
milt e76883f
Merge branch 'master' into course_category_created
milt 0aae2ec
adds calendar_event_created and calendar_event_updated events
invaliduser a03416c
review changes
invaliduser a36d98c
ran test data through json_pp
invaliduser ec37c05
arrays for parent and category, updated through json_pp
invaliduser d228bb5
acct_name must be string
invaliduser fd9bf5c
removed xapi_test_case require clause
invaliduser adc53d5
calendar_event_deleted
invaliduser 67d529f
fixed parse error
invaliduser a79546e
updated
invaliduser 3081952
removed second array
invaliduser ded85a7
debugging
invaliduser a0fd9b2
fixed serialized test data
invaliduser c9ee3e2
escape json
invaliduser a030029
add-parent
invaliduser 0220635
matched serialized data
invaliduser 2f1cafb
update
invaliduser 98d3c44
normalized to site and addParent
invaliduser 8236d05
first crack
milt df77d29
fixed event name
milt 02a78f5
remove copypasta
invaliduser 0d84359
fix copypasta
milt bced8d3
add missing parent
milt e90f531
correct ID
milt d2a514f
fix more copypasta, mama mia
milt fba3e28
course section created
milt 3801473
hack jisc test constants again
milt fd3fd34
Revert "hack jisc test constants again"
milt 2491a15
trying something else
milt 758b1f7
Revert "trying something else"
milt 1f03f36
test fixes
invaliduser 61c5c0d
comment out brittle tests until we can evaluate/rework them
milt f8083db
site name change
invaliduser 6f4b3d0
Revert "comment out brittle tests until we can evaluate/rework them"
milt ff0e21c
try moving problematic tests for now
milt 4945b82
Revert "try moving problematic tests for now"
milt 7518686
while we're here, let's try a cache
milt 283a191
Revert "while we're here, let's try a cache"
milt a87ce52
try disabling tests by annotation
milt f896b20
Revert "try disabling tests by annotation"
milt b666e3d
try another method of disabling tests
milt 5ecaa73
antipasta
invaliduser dfc252f
course updated
milt c7cbfb1
course viewed updates
milt b10331b
parent overflow and removed logging
invaliduser 0e34d49
Merge pull request #9 from yetanalytics/calendar
invaliduser 9870174
first crack
milt a7fc6a5
Merge pull request #20 from yetanalytics/group_created
cliffcaseyyet 59e1ddb
Merge branch 'master' into course_category_created
cliffcaseyyet df46457
Merge pull request #11 from yetanalytics/course_category_created
cliffcaseyyet d7d4847
Merge pull request #12 from yetanalytics/course_completed
cliffcaseyyet 32dbe92
Merge branch 'master' into course_completion_updated
cliffcaseyyet 00385e8
Merge pull request #14 from yetanalytics/course_completion_updated
cliffcaseyyet 994a0ae
Merge branch 'master' into course_resource_list_viewed
cliffcaseyyet 1781943
Merge pull request #16 from yetanalytics/course_resource_list_viewed
cliffcaseyyet 1c16dd7
Merge branch 'master' into course_section_created
cliffcaseyyet 44e16f4
Merge pull request #17 from yetanalytics/course_section_created
cliffcaseyyet b661944
Merge branch 'master' into course_updated
cliffcaseyyet e30e0e4
Merge pull request #18 from yetanalytics/course_updated
cliffcaseyyet b1b7fb1
Merge pull request #19 from yetanalytics/course_viewed
cliffcaseyyet 62b9363
Change course module completion updated event based on completion state
milt b32bbcc
centrally dispatch for course module types
milt 55e5ea7
tests for two states of cm completion update
milt f62951b
fix test copypasta
milt 393abda
update contrib
milt f7d961a
make type actually optional
milt a7f392b
add contrib
milt ecc4e6c
update expected activity types, the reason for the season
milt 9334160
formatting
milt 7ff1b8b
fix feedback
milt 569139e
update other instances of survey
milt d6f5f3c
don't set in quiz except in jisc case
milt 21ad22d
fix forum
milt 5a0e344
remove hard type from resource
milt b049970
remove forced type for book
milt 8a29118
CMV changes
milt fa602c3
remove type arg from course module object builder
milt 1d5cd81
add todo about module objects
milt ea8f04d
typo
milt 0e21fd5
lots of json formatting
milt 962872d
remove bad call to course_module in quiz helper
milt 5b7811c
Merge pull request #21 from yetanalytics/course_module_completion_upd…
milt 8b0ef15
Course module created (#22)
milt dabad95
remove bad formatting directives for json (#24)
milt edded30
Common test data (#25)
milt 507cbbe
Ci workaround (#27)
milt 6f7a829
Revert "Ci workaround (#27)" (#28)
milt 7160440
Context Section (#26)
milt e8e5334
properly name and test group_created (#30)
milt 105453f
discussion created, post created
cliffcaseyyet 59e3372
Group deleted (#29)
milt 355292c
Merge branch 'master' into forums_redo
cliffcaseyyet 6ef2e48
post delete
cliffcaseyyet 29dee2b
object cleanup and safety
cliffcaseyyet 24f2414
post updated
cliffcaseyyet 04f0474
messages
invaliduser 58f85bd
forum and discussion subscriptions
cliffcaseyyet 5eb9ea6
attribution
cliffcaseyyet af57c30
pr feedback
invaliduser 806ef87
Fix scaling util (#37)
milt a4a95a2
say no2html
invaliduser 5009e2a
post tests
cliffcaseyyet b6954fe
forum subscription tests
cliffcaseyyet c7fcce9
discussion subscription tests
cliffcaseyyet 6fa074a
Merge branch 'master' into forums_redo
cliffcaseyyet 1b44482
attribution stuff
cliffcaseyyet 9f3df5c
group member added/removed (#31)
milt bc35868
group message sent (#32)
milt 067cee1
Question created (#33)
milt 81ea489
User Enrolment CUD (#35)
milt 8ec991b
search results viewed (#36)
milt ae95743
h5p cmv (#39)
milt 773e137
Log in/out/as (#41)
milt f5b0ef0
amend mod_assign assessable_submitted (#42)
milt 7e144ca
mod_assign cmv (#43)
milt 689f4b3
assignment feedback viewed (#44)
milt 56754d8
Merge branch 'master' into forums_redo
cliffcaseyyet 0e99b97
Assign submission graded (#45)
milt 552fd43
Merge pull request #38 from yetanalytics/forums_redo
cliffcaseyyet 2458863
questions imported (#34)
milt 4a42b23
glossary entry viewed + test
cliffcaseyyet 5851bf2
comment created and deleted + tests
cliffcaseyyet 9d2abd7
simplify namespaces
cliffcaseyyet a9627e2
phpdoc on util
cliffcaseyyet c9f7355
covers anno
cliffcaseyyet 66e8480
covers anno
cliffcaseyyet ace5b36
Merge pull request #47 from yetanalytics/glossary_cliff
cliffcaseyyet 0b60941
Merge branch 'master' into forums_ns_fix
cliffcaseyyet 1d3c194
Merge pull request #48 from yetanalytics/forums_ns_fix
cliffcaseyyet 19e3f9b
json
invaliduser 2a2b2fc
questionnaire statements and tests
cliffcaseyyet ad1e010
mod_book (#46)
milt 8826e65
respect anonymous feedback
milt 70446a5
Mod choice (#50)
milt cdb2b25
Merge branch 'master' into mod_feedback
milt 02d62dc
pr feedback
invaliduser 30e103d
extract choice code
milt faae5d3
migrate mod_feedback multichoice to helper fn
milt 4f7a9a9
slug underscores to dashes
milt 32ffc60
use ids in correctresponsespattern
milt 1340248
fleshed out cmi render fns more
milt e0e0861
Merge pull request #51 from yetanalytics/mod_feedback
milt 2e6102d
Centralize and refactor CMI rendering code (#53)
milt 3e6e4e5
Capitalize all verb displays (#54)
milt 990d96f
change $lang provenance
invaliduser 8ae97a0
Merge pull request #49 from yetanalytics/questionnaire_cliff
cliffcaseyyet 0b997d7
stricter equality
invaliduser 12d4bb0
WIP lesson statements. pausing to work on repo test sort
cliffcaseyyet 84da389
Merge branch 'master' into lesson_statements
cliffcaseyyet 9bf19b3
Merge pull request #40 from yetanalytics/messages
invaliduser 8f978d0
implemented test sort to allow for runtime sort
cliffcaseyyet c6889b1
Merge pull request #59 from yetanalytics/repo_query_features
cliffcaseyyet 193c465
Merge branch 'master' into lesson_statements
cliffcaseyyet 59a9600
badge_viewed
invaliduser 3167a58
badge viewed and update
invaliduser 3306821
use course module renderer and new atype (#56)
milt b713df1
hardcode all verb display ltags (#57)
milt b95ed96
lesson_ended reworks how the lesson object is detailed
cliffcaseyyet 3cd5912
standardized lang
invaliduser e2c379c
tests for first 5 events
cliffcaseyyet 0d02d07
added question_answered/viewed, tweaked lesson_ended
cliffcaseyyet 7dc57b5
fixed module completion test
cliffcaseyyet 6fa0ada
implemented essay, fixed up a few details in cmi activities
cliffcaseyyet 5b44f40
added question viewed/answered tests for all cmi subtypes, and tweake…
cliffcaseyyet 6affe1b
phpdocs fix
cliffcaseyyet 2e8bd1b
lession-session activity type
cliffcaseyyet 9275d62
newlines
cliffcaseyyet 44cc2c1
Mod Survey (#58)
milt 9a4570d
tool usertours (#63)
milt 8fc1c51
Mod Wiki (#60)
milt 469b6c1
Merge branch 'master' into lesson_statements
cliffcaseyyet 5477c26
Merge pull request #62 from yetanalytics/lesson_statements
cliffcaseyyet ac0848a
Merge pull request #55 from yetanalytics/badge_viewed
invaliduser 8cfa0a5
Tool certificate (#61)
milt a630517
Mod quiz (#64)
milt 7053321
Mod assign (#65)
milt fe77291
Course module completion disambiguation (#66)
milt fdfa74c
notes (#52)
invaliduser e58ba23
Calendar subscription (#67)
milt 29b32a3
badge updated (#68)
milt a7fc6a2
Field Consistency & Bugfixes (#69)
milt 1982fdd
name is not an integer (#70)
milt 723d35b
send group message recipients (#71)
milt e708dda
correct lesson session atype (#72)
milt e4849df
reenable test on pr (#73)
milt 6ef0e99
remove trailing spaces on scorm serialized event data (#74)
milt 7de3e58
PHP & Moodle Support Coverage (#75)
milt b7df514
curl comment cleanup
cliffcaseyyet e01d9f1
Merge pull request #76 from yetanalytics/curl_cleanup
cliffcaseyyet 5328175
LMS Object Cleanup (#77)
milt 8e4db73
Create config for context platform (#78)
milt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
---|---|---|
@@ -1,12 +1,12 @@ | ||
{ | ||
"name": "xapi-vle/moodle-logstore-xapi", | ||
"license": "GPL v3", | ||
"require-dev": { | ||
"learninglocker/statementfactory": "~0.0" | ||
}, | ||
"require": { | ||
"ext-json": "*" | ||
}, | ||
"prefer-stable": true, | ||
"minimum-stability": "dev" | ||
} | ||
"name": "xapi-vle/moodle-logstore-xapi", | ||
"license": "GPL v3", | ||
"require-dev": { | ||
"yetanalytics/statementfactory": "v0.0.12" | ||
}, | ||
"require": { | ||
"ext-json": "*" | ||
}, | ||
"prefer-stable": true, | ||
"minimum-stability": "dev" | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
---|---|---|
@@ -0,0 +1,104 @@ | ||
<?php | ||
// This file is part of Moodle - http://moodle.org/ | ||
// | ||
// Moodle is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
// | ||
// Moodle is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU General Public License | ||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
/** | ||
* Transform for badge awarded event. | ||
* | ||
* @package logstore_xapi | ||
* @copyright Daniel Bell <daniel@yetanalytics.com> | ||
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
|
||
namespace src\transformer\events\core; | ||
use src\transformer\utils as utils; | ||
|
||
/** | ||
* Transforms badge_awarded event to an "Achieved" xapi event | ||
* | ||
* @param array $config The transformer config settings. | ||
* @param \stdClass $event The event to be transformed. | ||
* @return array | ||
*/ | ||
|
||
function badge_awarded(array $config, \stdClass $event) { | ||
global $CFG; | ||
$repo = $config['repo']; | ||
if (isset($event->objecttable) && isset($event->objectid)) { | ||
$event_object = $repo->read_record_by_id($event->objecttable, $event->objectid); | ||
} else { | ||
$event_object = array(); | ||
} | ||
|
||
$recipient = $repo->read_record_by_id('user', $event->relateduserid); | ||
$actor = utils\get_user($config, $recipient); | ||
|
||
$badge = $repo->read_record_by_id('badge', $event->objectid); | ||
$course = $badge->courseid ? $repo->read_record_by_id('course', $badge->courseid) : null; | ||
|
||
$lang = $badge->language ?? | ||
((!(is_null($course))) ? | ||
utils\get_course_lang($course) : | ||
$config['source_lang']); | ||
|
||
$other = unserialize($event->other); | ||
$issuedid = $other['badgeissuedid']; | ||
|
||
$manual = $repo->read_record_by_id('badge_manual_award', $issuedid); | ||
$awarder = $manual ? (utils\get_user($config, $repo->read_record_by_id('user', $manual->issuerid))) : 'System'; | ||
|
||
$statement = [[ | ||
'actor' => $actor, | ||
'verb' => [ | ||
'id' => 'https://w3id.org/xapi/tla/verbs/achieved', | ||
'display' => [ | ||
'en' => 'Achieved' | ||
]], | ||
'object' => utils\get_activity\badge($config, $lang, $badge), | ||
'result' => [ | ||
'response' => $badge->message | ||
], | ||
'context' => [ | ||
...utils\get_context_base($config, $event, $lang, $course), | ||
'instructor' => $awarder, | ||
'contextActivities' => [ | ||
'category' => [[ | ||
'id' => $config['app_url'], | ||
'objectType' => 'Activity', | ||
'definition' => [ | ||
'name' => [ | ||
'en' => 'EDLM Moodle LMS' | ||
davidpesce marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
], | ||
'type' => 'http://id.tincanapi.com/activitytype/lms' | ||
] | ||
]], | ||
], | ||
'extensions' => array_merge(utils\extensions\base($config, $event, $course),[ | ||
'https://xapi.edlm/profiles/edlm-lms/v1/concepts/context-extensions/badge-assignment-method' => ($manual ? 'Manual' : 'Automatic')]) | ||
]]]; | ||
if ($course){ | ||
$statement[0]['context']['contextActivities']['parent'] = [[ | ||
'id' => $config['app_url'].'/course/view.php?id='.$course->id, | ||
'objectType' => 'Activity', | ||
'definition' => [ | ||
'name' => [$lang => $course->fullname], | ||
'description' => [$lang => $course->summary], | ||
'type' => 'https://w3id.org/xapi/cmi5/activitytype/course' | ||
] | ||
]]; | ||
} | ||
|
||
return $statement; | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.