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
edx
edx-platform
Commits
81e065bd
Commit
81e065bd
authored
Dec 18, 2012
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix more errors in tests
parent
d61c91c1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
27 deletions
+19
-27
common/lib/xmodule/xmodule/capa_module.py
+15
-1
common/lib/xmodule/xmodule/course_module.py
+2
-26
common/lib/xmodule/xmodule/html_module.py
+2
-0
No files found.
common/lib/xmodule/xmodule/capa_module.py
View file @
81e065bd
...
@@ -355,7 +355,11 @@ class CapaModule(XModule):
...
@@ -355,7 +355,11 @@ class CapaModule(XModule):
id
=
self
.
location
.
html_id
(),
ajax_url
=
self
.
system
.
ajax_url
)
+
html
+
"</div>"
id
=
self
.
location
.
html_id
(),
ajax_url
=
self
.
system
.
ajax_url
)
+
html
+
"</div>"
# now do the substitutions which are filesystem based, e.g. '/static/' prefixes
# now do the substitutions which are filesystem based, e.g. '/static/' prefixes
return
self
.
system
.
replace_urls
(
html
,
self
.
descriptor
.
data_dir
,
course_namespace
=
self
.
location
)
return
self
.
system
.
replace_urls
(
html
,
getattr
(
self
.
descriptor
,
'data_dir'
,
''
),
course_namespace
=
self
.
location
)
def
handle_ajax
(
self
,
dispatch
,
get
):
def
handle_ajax
(
self
,
dispatch
,
get
):
'''
'''
...
@@ -462,10 +466,20 @@ class CapaModule(XModule):
...
@@ -462,10 +466,20 @@ class CapaModule(XModule):
for
answer_id
in
answers
:
for
answer_id
in
answers
:
try
:
try
:
<<<<<<<
HEAD
<<<<<<<
HEAD
<<<<<<<
HEAD
new_answer
=
{
answer_id
:
self
.
system
.
replace_urls
(
answers
[
answer_id
],
self
.
metadata
[
'data_dir'
],
course_namespace
=
self
.
location
)}
new_answer
=
{
answer_id
:
self
.
system
.
replace_urls
(
answers
[
answer_id
],
self
.
metadata
[
'data_dir'
],
course_namespace
=
self
.
location
)}
=======
=======
new_answer
=
{
answer_id
:
self
.
system
.
replace_urls
(
answers
[
answer_id
],
self
.
descriptor
.
data_dir
)}
new_answer
=
{
answer_id
:
self
.
system
.
replace_urls
(
answers
[
answer_id
],
self
.
descriptor
.
data_dir
)}
>>>>>>>
WIP
:
Save
student
state
via
StudentModule
.
Inheritance
doesn
't work
>>>>>>>
WIP
:
Save
student
state
via
StudentModule
.
Inheritance
doesn
't work
=======
new_answer = {
answer_id: self.system.replace_urls(
answers[answer_id],
getattr(self, '
data_dir
', ''),
course_namespace=self.location
)
}
>>>>>>> Fix more errors in tests
except TypeError:
except TypeError:
log.debug('
Unable
to
perform
URL
substitution
on
answers
[
%
s
]:
%
s
'
%
(answer_id, answers[answer_id]))
log.debug('
Unable
to
perform
URL
substitution
on
answers
[
%
s
]:
%
s
'
%
(answer_id, answers[answer_id]))
new_answer = {answer_id: answers[answer_id]}
new_answer = {answer_id: answers[answer_id]}
...
...
common/lib/xmodule/xmodule/course_module.py
View file @
81e065bd
...
@@ -291,30 +291,6 @@ class CourseDescriptor(SequenceDescriptor):
...
@@ -291,30 +291,6 @@ class CourseDescriptor(SequenceDescriptor):
return
time
.
gmtime
()
>
self
.
start
return
time
.
gmtime
()
>
self
.
start
@property
@property
def
end
(
self
):
return
self
.
_try_parse_time
(
"end"
)
@end.setter
def
end
(
self
,
value
):
if
isinstance
(
value
,
time
.
struct_time
):
self
.
metadata
[
'end'
]
=
stringify_time
(
value
)
@property
def
enrollment_start
(
self
):
return
self
.
_try_parse_time
(
"enrollment_start"
)
@enrollment_start.setter
def
enrollment_start
(
self
,
value
):
if
isinstance
(
value
,
time
.
struct_time
):
self
.
metadata
[
'enrollment_start'
]
=
stringify_time
(
value
)
@property
def
enrollment_end
(
self
):
return
self
.
_try_parse_time
(
"enrollment_end"
)
@enrollment_end.setter
def
enrollment_end
(
self
,
value
):
if
isinstance
(
value
,
time
.
struct_time
):
self
.
metadata
[
'enrollment_end'
]
=
stringify_time
(
value
)
@property
def
grader
(
self
):
def
grader
(
self
):
return
self
.
_grading_policy
[
'GRADER'
]
return
self
.
_grading_policy
[
'GRADER'
]
...
@@ -326,7 +302,7 @@ class CourseDescriptor(SequenceDescriptor):
...
@@ -326,7 +302,7 @@ class CourseDescriptor(SequenceDescriptor):
def
raw_grader
(
self
,
value
):
def
raw_grader
(
self
,
value
):
# NOTE WELL: this change will not update the processed graders. If we need that, this needs to call grader_from_conf
# NOTE WELL: this change will not update the processed graders. If we need that, this needs to call grader_from_conf
self
.
_grading_policy
[
'RAW_GRADER'
]
=
value
self
.
_grading_policy
[
'RAW_GRADER'
]
=
value
self
.
definition
[
'data'
]
.
setdefault
(
'grading_policy'
,{})
[
'GRADER'
]
=
value
self
.
grading_policy
[
'GRADER'
]
=
value
@property
@property
def
grade_cutoffs
(
self
):
def
grade_cutoffs
(
self
):
...
@@ -335,7 +311,7 @@ class CourseDescriptor(SequenceDescriptor):
...
@@ -335,7 +311,7 @@ class CourseDescriptor(SequenceDescriptor):
@grade_cutoffs.setter
@grade_cutoffs.setter
def
grade_cutoffs
(
self
,
value
):
def
grade_cutoffs
(
self
,
value
):
self
.
_grading_policy
[
'GRADE_CUTOFFS'
]
=
value
self
.
_grading_policy
[
'GRADE_CUTOFFS'
]
=
value
self
.
definition
[
'data'
]
.
setdefault
(
'grading_policy'
,{})
[
'GRADE_CUTOFFS'
]
=
value
self
.
grading_policy
[
'GRADE_CUTOFFS'
]
=
value
@lazyproperty
@lazyproperty
...
...
common/lib/xmodule/xmodule/html_module.py
View file @
81e065bd
...
@@ -43,6 +43,8 @@ class HtmlDescriptor(XmlDescriptor, EditingDescriptor):
...
@@ -43,6 +43,8 @@ class HtmlDescriptor(XmlDescriptor, EditingDescriptor):
module_class
=
HtmlModule
module_class
=
HtmlModule
filename_extension
=
"xml"
filename_extension
=
"xml"
template_dir_name
=
"html"
template_dir_name
=
"html"
data
=
String
(
help
=
"Html contents to display for this module"
,
scope
=
Scope
.
content
)
js
=
{
'coffee'
:
[
resource_string
(
__name__
,
'js/src/html/edit.coffee'
)]}
js
=
{
'coffee'
:
[
resource_string
(
__name__
,
'js/src/html/edit.coffee'
)]}
js_module_name
=
"HTMLEditingDescriptor"
js_module_name
=
"HTMLEditingDescriptor"
...
...
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