Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multiple-choice grading policy #784

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

HegePI
Copy link
Contributor

@HegePI HegePI commented May 19, 2021

No description provided.

@HegePI HegePI changed the title added tests multiple-choice grading policy May 19, 2021
await knex.schema.table("quiz_item", table => {
table
.enu(
"multiple_choice_grading_policy",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

multiple_selected_options_grading_options

)
.defaultTo("NeedToSelectAllCorrectOptions")

table.integer("multiple_selected_options_grading_policy_n").defaultTo(0)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1

export async function down(knex: Knex): Promise<void> {
await knex.schema.table("quiz_item", table => {
table.dropColumn("multiple_choice_grading_policy")
table.dropColumn("multiple_selected_options_grading_policy_n")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drop enum

@@ -5502,20 +5502,18 @@
"minimist": "^1.2.5"
}
},
"jsonparse": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wat

@@ -17,13 +19,17 @@ export type QuizItemType =
| "multiple-choice-dropdown"
| "clickable-multiple-choice"

export type MultipleChoiceGradingPolicy =
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MultipleSelectedOptionsGradingPolicy

@@ -34,6 +40,7 @@ class QuizItem extends mixin(BaseModel, [
allAnswersCorrect!: string
deleted!: boolean
direction!: "row" | "column"
multipleChoiceGradingPolicy!: MultipleChoiceGradingPolicy
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

multipleSelectedOptionsGradingPolicy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants