Skip to content

Commit

Permalink
Fix ordering of quizzes on plan page.
Browse files Browse the repository at this point in the history
  • Loading branch information
rtibbles committed Jul 5, 2024
1 parent 49b9044 commit 6657be7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions kolibri/plugins/coach/assets/src/composables/useQuizzes.js
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down

0 comments on commit 6657be7

Please sign in to comment.