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
39e2d642
Commit
39e2d642
authored
Aug 17, 2012
by
ichuang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:MITx/mitx into feature/ichuang/add-gitreload-to-migrate
parents
4365b4a0
53006700
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
3 deletions
+13
-3
common/djangoapps/student/models.py
+2
-1
common/lib/capa/capa/responsetypes.py
+3
-1
common/lib/capa/capa/templates/textinput.html
+2
-0
lms/djangoapps/courseware/tests/tests.py
+5
-1
lms/templates/courseware.html
+1
-0
No files found.
common/djangoapps/student/models.py
View file @
39e2d642
...
...
@@ -279,7 +279,8 @@ def replicate_enrollment_save(sender, **kwargs):
enrollment_obj
=
kwargs
[
'instance'
]
log
.
debug
(
"Replicating user because of new enrollment"
)
replicate_user
(
enrollment_obj
.
user
,
enrollment_obj
.
course_id
)
for
course_db_name
in
db_names_to_replicate_to
(
enrollment_obj
.
user
.
id
):
replicate_user
(
enrollment_obj
.
user
,
course_db_name
)
log
.
debug
(
"Replicating enrollment because of new enrollment"
)
replicate_model
(
CourseEnrollment
.
save
,
enrollment_obj
,
enrollment_obj
.
user_id
)
...
...
common/lib/capa/capa/responsetypes.py
View file @
39e2d642
...
...
@@ -873,6 +873,7 @@ def sympy_check2():
msg
=
'<font color="red">No answer entered!</font>'
if
self
.
xml
.
get
(
'empty_answer_err'
)
else
''
return
CorrectMap
(
idset
[
0
],
'incorrect'
,
msg
=
msg
)
# NOTE: correct = 'unknown' could be dangerous. Inputtypes such as textline are not expecting 'unknown's
correct
=
[
'unknown'
]
*
len
(
idset
)
messages
=
[
''
]
*
len
(
idset
)
...
...
@@ -898,6 +899,7 @@ def sympy_check2():
if
type
(
self
.
code
)
==
str
:
try
:
exec
self
.
code
in
self
.
context
[
'global_context'
],
self
.
context
correct
=
self
.
context
[
'correct'
]
except
Exception
as
err
:
print
"oops in customresponse (code) error
%
s"
%
err
print
"context = "
,
self
.
context
...
...
@@ -1271,7 +1273,7 @@ main()
def
setup_response
(
self
):
xml
=
self
.
xml
self
.
url
=
xml
.
get
(
'url'
)
or
"http://
eecs1
.mit.edu:8889/pyloncapa"
# FIXME - hardcoded URL
self
.
url
=
xml
.
get
(
'url'
)
or
"http://
qisx
.mit.edu:8889/pyloncapa"
# FIXME - hardcoded URL
# answer = xml.xpath('//*[@id=$id]//answer',id=xml.get('id'))[0] # FIXME - catch errors
answer
=
xml
.
find
(
'answer'
)
...
...
common/lib/capa/capa/templates/textinput.html
View file @
39e2d642
...
...
@@ -38,5 +38,7 @@
% if msg:
<span
class=
"message"
>
${msg|n}
</span>
% endif
% if state in ['unsubmitted', 'correct', 'incorrect', 'incomplete'] or hidden:
</div>
% endif
</section>
lms/djangoapps/courseware/tests/tests.py
View file @
39e2d642
...
...
@@ -388,7 +388,11 @@ class TestViewAuth(PageLoader):
list of urls that students should be able to see only
after launch, but staff should see before
"""
urls
=
reverse_urls
([
'info'
,
'book'
,
'courseware'
,
'profile'
],
course
)
urls
=
reverse_urls
([
'info'
,
'courseware'
,
'profile'
],
course
)
urls
.
extend
([
reverse
(
'book'
,
kwargs
=
{
'course_id'
:
course
.
id
,
'book_index'
:
book
.
title
})
for
book
in
course
.
textbooks
])
return
urls
def
light_student_urls
(
course
):
...
...
lms/templates/courseware.html
View file @
39e2d642
...
...
@@ -8,6 +8,7 @@
</
%
block>
<
%
block
name=
"js_extra"
>
<script
type=
"text/javascript"
src=
"${static.url('js/vendor/jquery.scrollTo-1.4.2-min.js')}"
></script>
<script
type=
"text/javascript"
src=
"${static.url('js/vendor/flot/jquery.flot.js')}"
></script>
## codemirror
...
...
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