3737 * @copyright 2023 Tamaro Walter
3838 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
3939 */
40- class ratings_test extends \advanced_testcase {
40+ class ratings_test extends \advanced_testcase {
4141 /** @var \stdClass test course */
4242 private $ course ;
4343
@@ -101,7 +101,7 @@ public function tearDown(): void {
101101 }
102102
103103 // Begin of test functions
104-
104+
105105 /**
106106 * Test, if rating can sort after ever group with ratingpreferences on helpful first.
107107 */
@@ -126,7 +126,6 @@ public function test_sort_answer_by_ratings() {
126126 $ result = $ this ->postsorderequal ($ sortedposts , $ rightorderposts );
127127 $ this ->assertEquals (1 , $ result );
128128
129-
130129 // Test without posts that are only marked as solved
131130 $ posts = array ($ this ->post , $ this ->answer1 , $ this ->answer3 , $ this ->answer4 , $ this ->answer5 , $ this ->answer6 );
132131 $ this ->set_ratingpreferences (0 );
@@ -171,7 +170,7 @@ public function test_sort_answer_by_ratings() {
171170 }
172171
173172 // Helper functions
174-
173+
175174 /**
176175 * This function creates:
177176 * - a course with a moodleoverflow
@@ -211,7 +210,7 @@ private function helper_course_set_up() {
211210
212211 /**
213212 * This function compares 2 arrays with posts and checks if the order is the same.
214- *
213+ *
215214 * @param array $sortedposts - The sorted posts
216215 * @param array $rightorderposts - The posts with the order they should have
217216 * The function returns 1 if $sortedposts matches $posts, else 0
@@ -268,14 +267,14 @@ private function create_everygroup() {
268267 $ this ->answer1 ->votesdifference = $ this ->answer1 ->upvotes - $ this ->answer1 ->downvotes ;
269268 $ this ->answer1 ->markedhelpful = 1 ;
270269 $ this ->answer1 ->markedsolution = 1 ;
271-
270+
272271 // Answer2.
273272 $ this ->answer2 ->upvotes = 0 ;
274273 $ this ->answer2 ->downvotes = 0 ;
275274 $ this ->answer2 ->votesdifference = $ this ->answer2 ->upvotes - $ this ->answer2 ->downvotes ;
276275 $ this ->answer2 ->markedhelpful = 0 ;
277276 $ this ->answer2 ->markedsolution = 1 ;
278-
277+
279278 // Answer3.
280279 $ this ->answer3 ->upvotes = 0 ;
281280 $ this ->answer3 ->downvotes = 0 ;
@@ -305,6 +304,6 @@ private function create_everygroup() {
305304 $ this ->answer6 ->markedsolution = 0 ;
306305 }
307306
308- //private function create_groupswithoutsolution
309-
307+ // private function create_groupswithoutsolution
308+
310309}
0 commit comments