Skip to content

Commit

Permalink
Conditionally display timer when active quiz, not when on report page
Browse files Browse the repository at this point in the history
  • Loading branch information
marcellamaki committed Nov 17, 2021
1 parent 10ef5a0 commit f2f868c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
:learningActivities="mappedLearningActivities"
:isLessonContext="lessonContext"
:isQuiz="content.assessment"
:showingReportState="currentlyMastered"
:duration="content.duration"
:isBookmarked="bookmark ? true : bookmark"
:isCoachContent="isCoachContent"
Expand Down Expand Up @@ -193,6 +194,7 @@
...mapGetters(['currentUserId']),
...mapState({
contentProgress: state => state.core.logging.progress,
currentlyMastered: state => state.core.logging.complete,
error: state => state.core.error,
loading: state => state.core.loading,
blockDoubleClicks: state => state.core.blockDoubleClicks,
Expand Down
10 changes: 9 additions & 1 deletion kolibri/plugins/learn/assets/src/views/LearningActivityBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
@click="toggleMenu"
/>
<KIconButton
v-else-if="isQuiz"
v-else-if="isQuiz && !showingReportState"
ref="moreOptionsButton"
data-test="moreOptionsButton"
icon="optionsHorizontal"
Expand Down Expand Up @@ -237,6 +237,14 @@
default: false,
},
/**
Is the post-quiz report what is currently displayed?
*/
showingReportState: {
type: Boolean,
required: false,
default: false,
},
/**
Suggested time in seconds
*/
duration: {
Expand Down

0 comments on commit f2f868c

Please sign in to comment.