Skip to content

Commit

Permalink
Merge branch 'main' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
suryabulusu committed Feb 2, 2024
2 parents dc7700e + 2c8062b commit 99161e5
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 5 deletions.
5 changes: 3 additions & 2 deletions src/components/Questions/Body.vue
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
:class="maxCharLimitClass"
data-test="charLimit"
>
{{ charactersLeft }}
{{ charactersLeft }} characters left
</p>
</div>
<!-- answer display -->
Expand Down Expand Up @@ -334,7 +334,8 @@ export default defineComponent({
[questionType.SINGLE_CHOICE, questionTypeHeaderText.SINGLE_CHOICE],
[questionType.MULTI_CHOICE, questionTypeHeaderText.MULTI_CHOICE],
[questionType.NUMERICAL_INTEGER, questionTypeHeaderText.NUMERICAL_INTEGER],
[questionType.NUMERICAL_FLOAT, questionTypeHeaderText.NUMERICAL_FLOAT]
[questionType.NUMERICAL_FLOAT, questionTypeHeaderText.NUMERICAL_FLOAT],
[questionType.SUBJECTIVE, questionTypeHeaderText.SUBJECTIVE]
]);
/** stop the loading spinner when the image has been loaded **/
Expand Down
13 changes: 11 additions & 2 deletions src/components/Scorecard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
</div>

<!-- question set metrics table -->
<div class="flex flex-col w-full mx-auto my-4 overflow-auto">
<div v-if="isQuizAssessment" class="flex flex-col w-full mx-auto my-4 overflow-auto">
<div class="flex border-b-2 border-gray-400 p-2 font-bold">
<div :class="tableCellClass">Name</div>
<div :class="tableCellClass">Marks Scored</div>
Expand Down Expand Up @@ -156,7 +156,7 @@ import BaseIcon from "./UI/Icons/BaseIcon.vue";
import IconButton from "./UI/Buttons/IconButton.vue";
import domtoimage from "dom-to-image";
import { useStore } from "vuex";
import { ScorecardMetric, CircularProgressResult, quizTitleType, QuestionSetMetric } from "../types";
import { ScorecardMetric, CircularProgressResult, quizTitleType, quizType, QuestionSetMetric } from "../types";
const confetti = require("canvas-confetti");
const PROGRESS_BAR_ANIMATION_DELAY_TIME = 500; // a time delay to be used for animating the progress bar
Expand Down Expand Up @@ -206,6 +206,10 @@ export default defineComponent({
required: true,
type: [null, String] as PropType<quizTitleType>,
},
quizType: {
type: String as PropType<quizType>,
required: true,
},
userId: {
type: String,
default: ""
Expand Down Expand Up @@ -271,6 +275,10 @@ export default defineComponent({
}
);
const isQuizAssessment = computed(() => {
return (props.quizType == "assessment" || props.quizType == "omr-assessment")
})
/**
* returns the text to be shared for showing result and number of questions answered
*/
Expand Down Expand Up @@ -460,6 +468,7 @@ export default defineComponent({
return {
...toRefs(state),
isQuizAssessment,
container,
shareScorecard,
goBack,
Expand Down
10 changes: 9 additions & 1 deletion src/components/Splash.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,13 @@
</div>
</div>
</div>
<p class="text-white text-xl md:text-2xl lg:text-3xl font-bold justify-center text-center">PLEASE READ THE INSTRUCTIONS CAREFULLY</p>
<p v-if="isQuizAssessment" class="text-white text-xl md:text-2xl lg:text-3xl font-bold justify-center text-center">
PLEASE READ THE INSTRUCTIONS CAREFULLY
</p>
</div>

<InstructionPage
v-if="isQuizAssessment"
:title="title"
:subject="subject"
:testFormat="testFormat"
Expand Down Expand Up @@ -171,6 +174,10 @@ export default defineComponent({
return props.isFirstSession != null;
});
const isQuizAssessment = computed(() => {
return (props.quizType == "assessment" || props.quizType == "omr-assessment")
})
const startButtonTextConfig = computed(() => {
const config: IconButtonTitleConfig = {
value: "",
Expand Down Expand Up @@ -219,6 +226,7 @@ export default defineComponent({
return {
...toRefs(state),
displayTitle,
isQuizAssessment,
startButtonTextConfig,
startButtonIconClass,
isSessionDataFetched,
Expand Down
1 change: 1 addition & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export enum questionTypeHeaderText {
MULTI_CHOICE = "Multiple Answer",
NUMERICAL_INTEGER = "Numerical Integer",
NUMERICAL_FLOAT = "Numerical",
SUBJECTIVE = "Subjective Answer"
}

export interface IconButtonTitleConfig {
Expand Down

0 comments on commit 99161e5

Please sign in to comment.