mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
Merge branch 'MDL-67424-master' of git://github.com/rezaies/moodle
This commit is contained in:
commit
dbeca9f5ca
@ -546,8 +546,16 @@ function forum_user_complete($course, $user, $mod, $forum) {
|
||||
};
|
||||
|
||||
$grades = grade_get_grades($course->id, 'mod', 'forum', $forum->id, $user->id);
|
||||
echo $getgradeinfo($grades->items[0]->grades, 'rating');
|
||||
echo $getgradeinfo($grades->items[1]->grades, 'wholeforum');
|
||||
|
||||
// Item 0 is the rating.
|
||||
if (!empty($grades->items[0]->grades)) {
|
||||
echo $getgradeinfo($grades->items[0]->grades, 'rating');
|
||||
}
|
||||
|
||||
// Item 1 is the whole-forum grade.
|
||||
if (!empty($grades->items[1]->grades)) {
|
||||
echo $getgradeinfo($grades->items[1]->grades, 'wholeforum');
|
||||
}
|
||||
|
||||
if ($posts = forum_get_user_posts($forum->id, $user->id)) {
|
||||
if (!$cm = get_coursemodule_from_instance('forum', $forum->id, $course->id)) {
|
||||
|
@ -113,3 +113,17 @@ Feature: View the user page for the outline report
|
||||
When I follow "Complete report"
|
||||
And I should see "4 views"
|
||||
And I should see "3 views"
|
||||
|
||||
Scenario: View the user complete report page when there is a no-grade forum
|
||||
Given the following "activities" exist:
|
||||
| activity | name | description | course | idnumber |
|
||||
| forum | forum1 | C1 first forum | C1 | forum1 |
|
||||
And I am on "Course 1" course homepage
|
||||
When I follow "Participants"
|
||||
And I follow "Student 1"
|
||||
And I follow "Outline report"
|
||||
Then I should see "Outline report"
|
||||
When I follow "Participants"
|
||||
And I follow "Student 1"
|
||||
And I follow "Complete report"
|
||||
Then I should see "Complete report"
|
||||
|
Loading…
x
Reference in New Issue
Block a user