added docs and added is_correct to conditional
This commit is contained in:
@@ -517,8 +517,14 @@ class CapaModule(CapaFields, XModule):
|
||||
return False
|
||||
|
||||
def is_completed(self):
|
||||
# used by conditional module
|
||||
# return self.answer_available()
|
||||
""" Used to decide to show or hide RESET or CHECK buttons.
|
||||
|
||||
Actually means that student submitted problem and nothing more.
|
||||
Problem can be completely wrong.
|
||||
Pressing RESET button makes this function to return False.
|
||||
Suggestion: rename it to is_submitted.
|
||||
|
||||
# older comment: return self.answer_available()"""
|
||||
return self.lcp.done
|
||||
|
||||
def is_attempted(self):
|
||||
|
||||
@@ -70,8 +70,18 @@ class ConditionalModule(ConditionalFields, XModule):
|
||||
# value: <name of module attribute>
|
||||
conditions_map = {
|
||||
'poll_answer': 'poll_answer', # poll_question attr
|
||||
|
||||
# problem was submitted (it can be wrong)
|
||||
# if student will press reset button after that,
|
||||
# state will be reverted
|
||||
'completed': 'is_completed', # capa_problem attr
|
||||
|
||||
# if student attempted problem
|
||||
'attempted': 'is_attempted', # capa_problem attr
|
||||
|
||||
# if problem is full points
|
||||
'correct': 'is_correct',
|
||||
|
||||
'voted': 'voted' # poll_question attr
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user