File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -243,7 +243,8 @@ public static function moodleoverflow_sort_answers_by_ratings($posts) {
243
243
244
244
// Check if solved posts are preferred over helpful posts.
245
245
$ solutionspreferred = $ posts [array_key_first ($ posts )]->ratingpreference == 1 ;
246
-
246
+ var_dump ('start ' );
247
+ var_dump ($ posts );
247
248
// Sort the answer posts by ratings.
248
249
249
250
// Build groups of different types of answers (Solved and helpful, only solved/helpful, other).
@@ -342,10 +343,15 @@ public static function moodleoverflow_sort_answers_by_ratings($posts) {
342
343
}
343
344
344
345
// Rearrange the indices and return the sorted posts.
346
+ var_dump ('sortedpost ' );
347
+ var_dump ($ sortedposts );
348
+
345
349
$ neworder = array ();
346
350
foreach ($ sortedposts as $ post ) {
347
351
$ neworder [$ post ->id ] = $ post ;
348
352
}
353
+ var_dump ('neworder ' );
354
+ var_dump ($ neworder );
349
355
// return now the sorted posts.
350
356
return $ neworder ;
351
357
}
You can’t perform that action at this time.
0 commit comments