Merge branch 'MDL-82109' of https://github.com/paulholden/moodle
This commit is contained in:
+5
-3
@@ -176,9 +176,11 @@ if ($courseid != SITEID) {
|
||||
$USER->id
|
||||
);
|
||||
|
||||
} else { // Normal course.
|
||||
$view = has_capability('moodle/notes:view', context_system::instance());
|
||||
note_print_notes('<a name="sitenotes"></a>' . $strsitenotes, 0, $view, 0, $userid, NOTES_STATE_SITE, 0);
|
||||
} else {
|
||||
// Site course.
|
||||
$addid = has_capability('moodle/notes:manage', $systemcontext) ? SITEID : 0;
|
||||
$view = has_capability('moodle/notes:view', $systemcontext);
|
||||
note_print_notes('<a name="sitenotes"></a>' . $strsitenotes, $addid, $view, 0, $userid, NOTES_STATE_SITE, 0);
|
||||
echo '<a name="coursenotes"></a>';
|
||||
|
||||
if (!empty($userid)) {
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
@core @core_notes
|
||||
Feature: Add notes to site users
|
||||
In order to share information with other users
|
||||
As an admin
|
||||
I need to add notes to site user accounts
|
||||
|
||||
Scenario: Add a user site note
|
||||
Given the following "users" exist:
|
||||
| username | firstname | lastname | email |
|
||||
| student1 | Student | 1 | student1@example.com |
|
||||
When I am on the "student1" "user > profile" page logged in as "admin"
|
||||
And I follow "Notes"
|
||||
And I follow "Add a new note"
|
||||
And I set the field "Content" to "Student 1 needs to pick up his game"
|
||||
And I press "Save changes"
|
||||
Then I should see "Student 1 needs to pick up his game" in the ".notelist" "css_element"
|
||||
Reference in New Issue
Block a user