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
7a1aed89
Commit
7a1aed89
authored
Feb 11, 2013
by
Your Name
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master' into feature/victor/revert-revert-of-forums-ui
parents
f5008062
75449359
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
21 additions
and
10 deletions
+21
-10
cms/djangoapps/contentstore/views.py
+6
-1
cms/templates/index.html
+3
-1
common/djangoapps/student/views.py
+5
-3
common/lib/capa/capa/responsetypes.py
+1
-1
lms/lib/symmath/symmath_check.py
+1
-2
lms/templates/staff_problem_info.html
+5
-2
No files found.
cms/djangoapps/contentstore/views.py
View file @
7a1aed89
...
...
@@ -122,7 +122,8 @@ def index(request):
course
.
location
.
course
,
course
.
location
.
name
]))
for
course
in
courses
],
'user'
:
request
.
user
'user'
:
request
.
user
,
'disable_course_creation'
:
settings
.
MITX_FEATURES
.
get
(
'DISABLE_COURSE_CREATION'
,
False
)
and
not
request
.
user
.
is_staff
})
...
...
@@ -1259,6 +1260,10 @@ def edge(request):
@login_required
@expect_json
def
create_new_course
(
request
):
if
settings
.
MITX_FEATURES
.
get
(
'DISABLE_COURSE_CREATION'
,
False
)
and
not
request
.
user
.
is_staff
:
raise
PermissionDenied
()
# This logic is repeated in xmodule/modulestore/tests/factories.py
# so if you change anything here, you need to also change it there.
# TODO: write a test that creates two courses, one with the factory and
...
...
cms/templates/index.html
View file @
7a1aed89
...
...
@@ -37,7 +37,9 @@
<h1>
My Courses
</h1>
<article
class=
"my-classes"
>
% if user.is_active:
<a
href=
"#"
class=
"new-button new-course-button"
><span
class=
"plus-icon white"
></span>
New Course
</a>
% if not disable_course_creation:
<a
href=
"#"
class=
"new-button new-course-button"
><span
class=
"plus-icon white"
></span>
New Course
</a>
%endif
<ul
class=
"class-list"
>
%for course, url in courses:
<li>
...
...
common/djangoapps/student/views.py
View file @
7a1aed89
...
...
@@ -1112,9 +1112,11 @@ def test_center_login(request):
# or possibly both. But for now we know what to do with an ExamSeriesCode,
# while we currently have no record of RegistrationID values at all.
if
'vueExamSeriesCode'
not
in
request
.
POST
:
# TODO: confirm this error code (made up, not in documentation)
# we are not allowed to make up a new error code, according to Pearson,
# so instead of "missingExamSeriesCode", we use a valid one that is
# inaccurate but at least distinct. (Sigh.)
log
.
error
(
"missing exam series code for cand ID {}"
.
format
(
client_candidate_id
))
return
HttpResponseRedirect
(
makeErrorURL
(
error_url
,
"missing
ExamSeriesCode
"
));
return
HttpResponseRedirect
(
makeErrorURL
(
error_url
,
"missing
PartnerID
"
));
exam_series_code
=
request
.
POST
.
get
(
'vueExamSeriesCode'
)
# special case for supporting test user:
if
client_candidate_id
==
"edX003671291147"
and
exam_series_code
!=
'6002x001'
:
...
...
@@ -1188,7 +1190,7 @@ def test_center_login(request):
# this information is correct, we allow the user to be logged in
# without a password. This could all be formalized in a backend object
# that does the above checking.
# TODO: create a backend class to do this.
# TODO:
(brian)
create a backend class to do this.
# testcenteruser.user.backend = "%s.%s" % (backend.__module__, backend.__class__.__name__)
testcenteruser
.
user
.
backend
=
"
%
s.
%
s"
%
(
"TestcenterAuthenticationModule"
,
"TestcenterAuthenticationClass"
)
login
(
request
,
testcenteruser
.
user
)
...
...
common/lib/capa/capa/responsetypes.py
View file @
7a1aed89
...
...
@@ -999,7 +999,7 @@ def sympy_check2():
self
.
context
[
'debug'
]
=
self
.
system
.
DEBUG
# exec the check function
if
type
(
self
.
code
)
==
str
:
if
isinstance
(
self
.
code
,
basestring
)
:
try
:
exec
self
.
code
in
self
.
context
[
'global_context'
],
self
.
context
correct
=
self
.
context
[
'correct'
]
...
...
lms/lib/symmath/symmath_check.py
View file @
7a1aed89
...
...
@@ -238,8 +238,7 @@ def symmath_check(expect, ans, dynamath=None, options=None, debug=None, xml=None
###### PMathML input ######
# convert mathml answer to formula
try
:
if
dynamath
:
mmlans
=
dynamath
[
0
]
mmlans
=
dynamath
[
0
]
if
dynamath
else
None
except
Exception
,
err
:
mmlans
=
None
if
not
mmlans
:
...
...
lms/templates/staff_problem_info.html
View file @
7a1aed89
${module_content}
%if edit_link:
%if location.category in ['problem','video','html']:
% if edit_link:
<div>
<a
href=
"${edit_link}"
>
Edit
</a>
/
<a
href=
"#${element_id}_xqa-modal"
onclick=
"javascript:getlog('${element_id}', {
...
...
@@ -9,7 +10,7 @@ ${module_content}
'user': '${user}'
})"
id=
"${element_id}_xqa_log"
>
QA
</a>
</div>
% endif
%
endif
<div><a
href=
"#${element_id}_debug"
id=
"${element_id}_trig"
>
Staff Debug Info
</a></div>
<section
id=
"${element_id}_xqa-modal"
class=
"modal xqa-modal"
style=
"width:80%; left:20%; height:80%; overflow:auto"
>
...
...
@@ -74,3 +75,5 @@ category = ${category | h}
'user'
:
'${user}'
});
</script>
%endif
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