This function helps to facilitate student rating of hints and contribution of new hints.
Specifically this function is used to send necessary data to JS about incorrect answer
submissions and hints. It also will return hints that have been reported, although this
is only for Staff.
This function helps to facilitate student rating of hints and
contribution of new hints. Specifically this function is used
to send necessary data to JS about incorrect answer
submissions and hints. It also will return hints that have
been reported, although this is only for Staff.
Returns:
used_hint_answer_text: This dicitonary contains reported hints/answers (if the user is staff) and the
first hint/answer pair that the student submitted for a problem.
"""
# used_hint_answer_text is a dictionary of hints (or lack thereof) used for a
# specific answer, as well as 2 other random hints that exist for each answer
...
...
@@ -240,7 +285,9 @@ class CrowdsourceHinter(XBlock):
defrate_hint(self,data,suffix=''):
"""
Used to facilitate hint rating by students.
Hint ratings in hint_database are updated and the resulting hint rating (or reported status) is returned to JS.
Hint ratings in hint_database are updated and the resulting
hint rating (or reported status) is returned to JS.
Args:
data['student_answer']: The incorrect answer that corresponds to the hint that is being rated
data['hint']: The hint that is being rated
...
...
@@ -248,6 +295,7 @@ class CrowdsourceHinter(XBlock):
Returns:
'rating': the new rating of the hint, or the string 'reported' if the hint was reported
'hint': the hint that had its rating changed
"""
answer_data=data['student_answer']
data_rating=data['student_rating']
...
...
@@ -325,7 +373,9 @@ class CrowdsourceHinter(XBlock):
@staticmethod
defworkbench_scenarios():
"""A canned scenario for display in the workbench."""
"""
A canned scenario for display in the workbench.
"""
return[
("CrowdsourceHinter",
"""
...
...
@@ -333,9 +383,7 @@ class CrowdsourceHinter(XBlock):
<crowdsourcehinter>
{"generic_hints": "Make sure to check for basic mistakes like typos", "initial_hints": {"michiganp": "remove the p at the end.", "michigann": "too many Ns on there."}, "hinting_element": "i4x://edX/DemoX/problem/Text_Input"}
</crowdsourcehinter>
</verticaldemo>
"""
)
</verticaldemo>""")
]
@classmethod
...
...
@@ -350,3 +398,19 @@ class CrowdsourceHinter(XBlock):