Commit f63e017f by Sola

test ish commit. added studiocrowdxblock html but probably willr emove

parent 5fbef533
CHANGEchange
...@@ -29,6 +29,9 @@ class CrowdXBlock(XBlock): ...@@ -29,6 +29,9 @@ class CrowdXBlock(XBlock):
frag.initialize_js('CrowdXBlock') frag.initialize_js('CrowdXBlock')
return frag return frag
def studio_view(self, context=None):
html = self.resource_string("static/html/studioview.html")
def resource_string(self, path): def resource_string(self, path):
data = pkg_resources.resource_string(__name__, path) data = pkg_resources.resource_string(__name__, path)
return data.decode("utf8") return data.decode("utf8")
......
...@@ -13,7 +13,7 @@ log = logging.getLogger(__name__) ...@@ -13,7 +13,7 @@ log = logging.getLogger(__name__)
#get_hint and get_feedback are in #get_hint and get_feedback are in
class CrowdXBlock(XBlock): class CrowdXBlock(XBlock):
correctanswer = String(default="42", scope=Scope.content) #should be irrelevant for completed version correctanswer = String(default="42", scope=Scope.content) #should be irrelevant for completed version
hints = Dict(default={"2": {"hint1for2":0, "hint2for2":0, "hint3for2":0}, "1": {"hint1for1":0, "hint2for1":0, "hint3for1":0}, "3": {"hint1for3":0, "hint2for3":0, "hint3for3":0}}, scope=Scope.content) hints = Dict(default={"2": {"hint6for2":0, "hint5for2":0, "hint4for2":0, "hint1for2":0, "hint2for2":0, "hint3for2":0}, "1": {"hint1for1":0, "hint2for1":0, "hint3for1":0}, "3": {"hint1for3":0, "hint2for3":0, "hint3for3":0}}, scope=Scope.content)
#All hints. sorted by type of mistake. type_of_incorrect_answer{"hint":rating, "hint":rating} #All hints. sorted by type of mistake. type_of_incorrect_answer{"hint":rating, "hint":rating}
HintsToUse = Dict(default={}, scope=Scope.user_state) #Dict of hints to provide user HintsToUse = Dict(default={}, scope=Scope.user_state) #Dict of hints to provide user
WrongAnswers = List(default=[], scope=Scope.user_state) #List of mistakes made by user WrongAnswers = List(default=[], scope=Scope.user_state) #List of mistakes made by user
...@@ -29,6 +29,9 @@ class CrowdXBlock(XBlock): ...@@ -29,6 +29,9 @@ class CrowdXBlock(XBlock):
frag.initialize_js('CrowdXBlock') frag.initialize_js('CrowdXBlock')
return frag return frag
def studio_view(self, context=None):
def resource_string(self, path): def resource_string(self, path):
data = pkg_resources.resource_string(__name__, path) data = pkg_resources.resource_string(__name__, path)
return data.decode("utf8") return data.decode("utf8")
......
<p>
This is a test to see stuff.
</p>
<p>
This is a test to see stuff.
</p>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment