Skip to content
Snippets Groups Projects
Commit 6f964ace authored by Alexander Kryklia's avatar Alexander Kryklia
Browse files

added docs and added is_correct to conditional

parent 6f95d21e
No related merge requests found
......@@ -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
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment