37
37
* @copyright 2023 Tamaro Walter
38
38
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
39
39
*/
40
- class ratings_test extends \advanced_testcase {
40
+ class ratings_test extends \advanced_testcase {
41
41
/** @var \stdClass test course */
42
42
private $ course ;
43
43
@@ -101,7 +101,7 @@ public function tearDown(): void {
101
101
}
102
102
103
103
// Begin of test functions
104
-
104
+
105
105
/**
106
106
* Test, if rating can sort after ever group with ratingpreferences on helpful first.
107
107
*/
@@ -126,7 +126,6 @@ public function test_sort_answer_by_ratings() {
126
126
$ result = $ this ->postsorderequal ($ sortedposts , $ rightorderposts );
127
127
$ this ->assertEquals (1 , $ result );
128
128
129
-
130
129
// Test without posts that are only marked as solved
131
130
$ posts = array ($ this ->post , $ this ->answer1 , $ this ->answer3 , $ this ->answer4 , $ this ->answer5 , $ this ->answer6 );
132
131
$ this ->set_ratingpreferences (0 );
@@ -171,7 +170,7 @@ public function test_sort_answer_by_ratings() {
171
170
}
172
171
173
172
// Helper functions
174
-
173
+
175
174
/**
176
175
* This function creates:
177
176
* - a course with a moodleoverflow
@@ -211,7 +210,7 @@ private function helper_course_set_up() {
211
210
212
211
/**
213
212
* This function compares 2 arrays with posts and checks if the order is the same.
214
- *
213
+ *
215
214
* @param array $sortedposts - The sorted posts
216
215
* @param array $rightorderposts - The posts with the order they should have
217
216
* The function returns 1 if $sortedposts matches $posts, else 0
@@ -268,14 +267,14 @@ private function create_everygroup() {
268
267
$ this ->answer1 ->votesdifference = $ this ->answer1 ->upvotes - $ this ->answer1 ->downvotes ;
269
268
$ this ->answer1 ->markedhelpful = 1 ;
270
269
$ this ->answer1 ->markedsolution = 1 ;
271
-
270
+
272
271
// Answer2.
273
272
$ this ->answer2 ->upvotes = 0 ;
274
273
$ this ->answer2 ->downvotes = 0 ;
275
274
$ this ->answer2 ->votesdifference = $ this ->answer2 ->upvotes - $ this ->answer2 ->downvotes ;
276
275
$ this ->answer2 ->markedhelpful = 0 ;
277
276
$ this ->answer2 ->markedsolution = 1 ;
278
-
277
+
279
278
// Answer3.
280
279
$ this ->answer3 ->upvotes = 0 ;
281
280
$ this ->answer3 ->downvotes = 0 ;
@@ -305,6 +304,6 @@ private function create_everygroup() {
305
304
$ this ->answer6 ->markedsolution = 0 ;
306
305
}
307
306
308
- //private function create_groupswithoutsolution
309
-
307
+ // private function create_groupswithoutsolution
308
+
310
309
}
0 commit comments