In Studio: Introduces a new option, `after some number of attempts` and a new entry box for specifying the number of attempts. This allows course creators to specify that a given question's answer is only viewable, i.e its show answer button is visible, after the learner has attempted answering the question - by hitting the submit button - a given number of times. Included in this commit are unit tests for the new feature.
30 lines
603 B
Python
30 lines
603 B
Python
# -*- coding: utf-8 -*-
|
|
"""
|
|
Constants for capa_base problems
|
|
"""
|
|
|
|
|
|
class SHOWANSWER(object):
|
|
"""
|
|
Constants for when to show answer
|
|
"""
|
|
ALWAYS = "always"
|
|
ANSWERED = "answered"
|
|
ATTEMPTED = "attempted"
|
|
CLOSED = "closed"
|
|
FINISHED = "finished"
|
|
CORRECT_OR_PAST_DUE = "correct_or_past_due"
|
|
PAST_DUE = "past_due"
|
|
NEVER = "never"
|
|
AFTER_SOME_NUMBER_OF_ATTEMPTS = "after_attempts"
|
|
|
|
|
|
class RANDOMIZATION(object):
|
|
"""
|
|
Constants for problem randomization
|
|
"""
|
|
ALWAYS = "always"
|
|
ONRESET = "onreset"
|
|
NEVER = "never"
|
|
PER_STUDENT = "per_student"
|