Commit ecf0828a by Dillon Dumesnil

v0.61

parent 7a3c2ce5
......@@ -87,6 +87,8 @@ class HtmlBlock(object):
if self.system.anonymous_student_id:
# List of 5 problem urls I want to show
url_list = get_records(5, self.course_id)
# Try using a temp variable
# for i in xrange(len(url_list)):
# Adds the problem urls into the iFrame template
# self.data = self.data.format("%%PROBLEM_URL_" + str(i) +"%%", url_list[i])
......
......@@ -40,11 +40,11 @@ def get_records(num_desired, current_course):
problem = str(record.module_state_key).split("@")
problem_ids.append(problem[-1])
problems_to_show = random.sample(problem_ids, num_desired)
template_url = 'https://dillon-dumesnil.sandbox.edx.org/xblock/block-v1:{course_id}+type@problem+block@{problem_id}'
# local_template_url = '/xblock/block-v1:{course_id}+type@problem+block@{problem_id}'
# template_url = 'https://dillon-dumesnil.sandbox.edx.org/xblock/block-v1:{course_id}+type@problem+block@{problem_id}'
local_template_url = '/xblock/block-v1:{course_id}+type@problem+block@{problem_id}'
review_course_id = REVIEW_COURSE_MAPPING[str(current_course)]
urls = []
for problem in problems_to_show:
urls.append(template_url.format(course_id=review_course_id, problem_id=problem))
# urls.append(local_template_url.format(course_id=review_course_id, problem_id=problem))
# urls.append(template_url.format(course_id=review_course_id, problem_id=problem))
urls.append(local_template_url.format(course_id=review_course_id, problem_id=problem))
return urls
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