From 6657be7ce49e8f0272dd882eb678e471fedce02b Mon Sep 17 00:00:00 2001 From: Richard Tibbles Date: Fri, 5 Jul 2024 09:20:36 -0700 Subject: [PATCH] Fix ordering of quizzes on plan page. --- kolibri/plugins/coach/assets/src/composables/useQuizzes.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kolibri/plugins/coach/assets/src/composables/useQuizzes.js b/kolibri/plugins/coach/assets/src/composables/useQuizzes.js index b878ef147b3..f74a55e2245 100644 --- a/kolibri/plugins/coach/assets/src/composables/useQuizzes.js +++ b/kolibri/plugins/coach/assets/src/composables/useQuizzes.js @@ -1,9 +1,11 @@ -import sortBy from 'lodash/sortBy'; +import orderBy from 'lodash/orderBy'; import { computed, getCurrentInstance } from 'kolibri.lib.vueCompositionApi'; export default function useQuizzes(store) { store = store || getCurrentInstance().proxy.$store; - const quizzes = computed(() => sortBy(store.getters['classSummary/exams'], 'date-created')); + const quizzes = computed(() => + orderBy(store.getters['classSummary/exams'], 'date_created', 'desc'), + ); const fetchQuizSizes = () => store.dispatch('classSummary/fetchQuizzesSizes'); return {