Skip to content

Commit

Permalink
small change to question header titles
Browse files Browse the repository at this point in the history
  • Loading branch information
suryabulusu committed Apr 29, 2023
1 parent 556b6f9 commit da5be44
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ export enum questionType {

export enum questionTypeHeaderText {
SINGLE_CHOICE = "Single Choice",
MULTI_CHOICE = "Multiple Choice",
NUMERICAL_INTEGER = "Subjective Numerical",
NUMERICAL_FLOAT = "Subjective Numerical",
MULTI_CHOICE = "Multiple Answer",
NUMERICAL_INTEGER = "Numerical Integer",
NUMERICAL_FLOAT = "Numerical",
}

export interface IconButtonTitleConfig {
Expand Down
2 changes: 2 additions & 0 deletions src/views/Player.vue
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,7 @@ export default defineComponent({
} else {
paletteInstructionText = `You may attempt all questions in this section.`
}
paletteInstructionText += ` Correct Answer: +${state.questionSets[index].marking_scheme.correct}, Wrong Answer: ${state.questionSets[index].marking_scheme.wrong}, Skipped: ${state.questionSets[index].marking_scheme.skipped}`
qsetStates.push({
title: state.questionSets[index].title,
paletteItems: states,
Expand Down Expand Up @@ -579,6 +580,7 @@ export default defineComponent({
} else {
paletteInstructionText = `You may attempt all questions in this section.`
}
paletteInstructionText += ` Correct Answer: +${state.questionSets[index].marking_scheme.correct}, Wrong Answer: ${state.questionSets[index].marking_scheme.wrong}, Skipped: ${state.questionSets[index].marking_scheme.skipped}`
qsetStates.push({
title: state.questionSets[index].title,
paletteItems: states,
Expand Down
5 changes: 5 additions & 0 deletions tests/e2e/fixtures/assessment_quiz.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
"_id": "62540adb0f748c8e206c1613",
"max_questions_allowed_to_attempt": 24,
"title": "Question Set 0",
"marking_scheme": {
"correct": 4,
"wrong": -2,
"skipped": -1
},
"questions": [
{
"_id": "62540adb0f748c8e206c1614",
Expand Down
5 changes: 5 additions & 0 deletions tests/e2e/fixtures/homework_quiz.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
{
"_id": "62540adb0f748c8e206c1613",
"max_questions_allowed_to_attempt": 3,
"marking_scheme": {
"correct": 1,
"wrong": 0,
"skipped": 0
},
"questions": [
{
"_id": "62540adb0f748c8e206c1614",
Expand Down
10 changes: 10 additions & 0 deletions tests/e2e/fixtures/multi_qset_omr.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
"_id": "62540adb0f748c8e206c1613",
"max_questions_allowed_to_attempt": 12,
"title": "Question Set 0",
"marking_scheme": {
"correct": 4,
"wrong": -2,
"skipped": -1
},
"questions": [
{
"_id": "62540adb0f748c8e206c1614",
Expand Down Expand Up @@ -276,6 +281,11 @@
"_id": "6285554a1016dc7050373fbf",
"max_questions_allowed_to_attempt": 3,
"title": "Question Set 1",
"marking_scheme": {
"correct": 4,
"wrong": -2,
"skipped": -1
},
"questions": [
{
"_id": "62540adb0f748c8e206c1614f",
Expand Down
10 changes: 10 additions & 0 deletions tests/e2e/fixtures/multi_qset_quiz.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
"_id": "62540adb0f748c8e206c1613",
"max_questions_allowed_to_attempt": 12,
"title": "Question Set 0",
"marking_scheme": {
"correct": 4,
"wrong": -2,
"skipped": -1
},
"questions": [
{
"_id": "62540adb0f748c8e206c1614",
Expand Down Expand Up @@ -276,6 +281,11 @@
"_id": "6285554a1016dc7050373fbf",
"max_questions_allowed_to_attempt": 3,
"title": "Question Set 1",
"marking_scheme": {
"correct": 4,
"wrong": -2,
"skipped": -1
},
"questions": [
{
"_id": "62540adb0f748c8e206c1614f",
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/specs/renders-omr-assessment.js
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ describe("Player for OMR quizzes", () => {
cy.get('[data-test="questionSetInstruction-1"').should("exist");
cy.get('[data-test="questionSetInstruction-1"').should(
"have.text",
"You may attempt only up to 3 questions in this section."
"You may attempt only up to 3 questions in this section. Correct Answer: +4, Wrong Answer: -2, Skipped: -1"
);
});

Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/specs/renders-player-assessment.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ describe("Player for Assessment quizzes", () => {
cy.get('[data-test="paletteInstruction-0"').should("exist");
cy.get('[data-test="paletteInstruction-0"').should(
"have.text",
"You may attempt all questions in this section."
"You may attempt all questions in this section. Correct Answer: +4, Wrong Answer: -2, Skipped: -1"
);
});

Expand Down Expand Up @@ -293,7 +293,7 @@ describe("Player for Assessment quizzes", () => {
cy.get('[data-test="paletteItem-3"]').trigger("click");
cy.get('[data-test="question-header-text"]').should(
"have.text",
"Question Set 0 / Q.4 Subjective Numerical" // {Question Set Title / Q.{Question Number} {Question Type}}
"Question Set 0 / Q.4 Numerical Integer" // {Question Set Title / Q.{Question Number} {Question Type}}
);
});
});
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/specs/renders-player-to-check-optional.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ describe("Player for Assessment quizzes", () => {
cy.get('[data-test="paletteInstruction-1"').should("exist");
cy.get('[data-test="paletteInstruction-1"').should(
"have.text",
"You may attempt only up to 3 questions in this section."
"You may attempt only up to 3 questions in this section. Correct Answer: +4, Wrong Answer: -2, Skipped: -1"
);
});

Expand Down

0 comments on commit da5be44

Please sign in to comment.