Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
edx-platform
Commits
ecf0828a
Commit
ecf0828a
authored
Sep 14, 2017
by
Dillon Dumesnil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
v0.61
parent
7a3c2ce5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
common/lib/xmodule/xmodule/html_module.py
+2
-0
lms/djangoapps/review/get_review_ids.py
+4
-4
No files found.
common/lib/xmodule/xmodule/html_module.py
View file @
ecf0828a
...
...
@@ -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])
...
...
lms/djangoapps/review/get_review_ids.py
View file @
ecf0828a
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment