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) {
243243
244244 // Check if solved posts are preferred over helpful posts.
245245 $ solutionspreferred = $ posts [array_key_first ($ posts )]->ratingpreference == 1 ;
246-
246+ var_dump ('start ' );
247+ var_dump ($ posts );
247248 // Sort the answer posts by ratings.
248249
249250 // 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) {
342343 }
343344
344345 // Rearrange the indices and return the sorted posts.
346+ var_dump ('sortedpost ' );
347+ var_dump ($ sortedposts );
348+
345349 $ neworder = array ();
346350 foreach ($ sortedposts as $ post ) {
347351 $ neworder [$ post ->id ] = $ post ;
348352 }
353+ var_dump ('neworder ' );
354+ var_dump ($ neworder );
349355 // return now the sorted posts.
350356 return $ neworder ;
351357 }
You can’t perform that action at this time.
0 commit comments