-
Notifications
You must be signed in to change notification settings - Fork 84
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
fix(user_report_viewed): Stops errors where course ID is 0. #527
Conversation
@ryansmith94 This is ready for review. |
|
||
return [ | ||
'id' => $config['app_url'].'/mod/forum/user.php?id='.$user->id.'&course='.$course->id, | ||
$activity = [ | ||
'definition' => [ | ||
'type' => 'http://id.tincanapi.com/activitytype/user-profile', | ||
'name' => [ | ||
$courselang => 'forum posts of '.utils\get_full_name($user), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we're using the related user ID below for the activity ID, does that mean we should use the related user here? Same comment for the extension below too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, definitely. Well spotted!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In which case i probably shouldn't have modified the user part of this file, but instead should have just changed the user that is passed in by user_report_viewed.php
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sweet. Yeah good idea that probably makes the most sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ryansmith94 this is resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noice 👍
🎉 This PR is included in version 4.2.5 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Description
Known Issues Not Fixed By This PR (Out of Scope)
If the course if not defined, the lang code defaults to "en". This is the same default that is already used as a fallback in case the lang code of a course is not valid, so I don't feel bad about using this default again here. Ideally we should use the site default as the fallback, but that should be fixed everywhere and is a separate issue.
Related Issues
PR Type