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
9b1ae9f9
Commit
9b1ae9f9
authored
Mar 04, 2013
by
Carlos Andrés Rocha
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1583 from MITx/fix/ned/clean-ups
Fix/ned/clean ups
parents
3a748b1e
7c8a9022
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
16 additions
and
20 deletions
+16
-20
cms/djangoapps/contentstore/management/commands/delete_course.py
+1
-2
cms/djangoapps/contentstore/management/commands/prompt.py
+1
-1
common/djangoapps/student/views.py
+3
-3
common/lib/xmodule/xmodule/modulestore/store_utilities.py
+0
-0
common/lib/xmodule/xmodule/modulestore/xml_exporter.py
+0
-0
common/lib/xmodule/xmodule/peer_grading_module.py
+1
-1
lms/djangoapps/course_wiki/views.py
+1
-1
lms/djangoapps/courseware/grades.py
+1
-1
lms/djangoapps/django_comment_client/forum/views.py
+0
-3
lms/djangoapps/multicourse/multicourse_settings.py
+1
-1
lms/djangoapps/simplewiki/views.py
+2
-2
lms/lib/comment_client/models.py
+1
-1
lms/lib/symmath/formula.py
+2
-2
lms/templates/courseware/course_navigation.html
+1
-1
lms/templates/problem.html
+1
-1
No files found.
cms/djangoapps/contentstore/management/commands/delete_course.py
View file @
9b1ae9f9
...
...
@@ -17,8 +17,7 @@ from auth.authz import _delete_course_group
class
Command
(
BaseCommand
):
help
=
\
'''Delete a MongoDB backed course'''
help
=
'''Delete a MongoDB backed course'''
def
handle
(
self
,
*
args
,
**
options
):
if
len
(
args
)
!=
1
and
len
(
args
)
!=
2
:
...
...
cms/djangoapps/contentstore/management/commands/prompt.py
View file @
9b1ae9f9
...
...
@@ -13,7 +13,7 @@ def query_yes_no(question, default="yes"):
"""
valid
=
{
"yes"
:
True
,
"y"
:
True
,
"ye"
:
True
,
"no"
:
False
,
"n"
:
False
}
if
default
==
None
:
if
default
is
None
:
prompt
=
" [y/n] "
elif
default
==
"yes"
:
prompt
=
" [Y/n] "
...
...
common/djangoapps/student/views.py
View file @
9b1ae9f9
...
...
@@ -115,7 +115,7 @@ def get_date_for_press(publish_date):
def
press
(
request
):
json_articles
=
cache
.
get
(
"student_press_json_articles"
)
if
json_articles
==
None
:
if
json_articles
is
None
:
if
hasattr
(
settings
,
'RSS_URL'
):
content
=
urllib
.
urlopen
(
settings
.
PRESS_URL
)
.
read
()
json_articles
=
json
.
loads
(
content
)
...
...
@@ -301,7 +301,7 @@ def change_enrollment(request):
action
=
request
.
POST
.
get
(
"enrollment_action"
,
""
)
course_id
=
request
.
POST
.
get
(
"course_id"
,
None
)
if
course_id
==
None
:
if
course_id
is
None
:
return
HttpResponse
(
json
.
dumps
({
'success'
:
False
,
'error'
:
'There was an error receiving the course id.'
}))
...
...
@@ -1203,7 +1203,7 @@ def _get_news(top=None):
"Return the n top news items on settings.RSS_URL"
feed_data
=
cache
.
get
(
"students_index_rss_feed_data"
)
if
feed_data
==
None
:
if
feed_data
is
None
:
if
hasattr
(
settings
,
'RSS_URL'
):
feed_data
=
urllib
.
urlopen
(
settings
.
RSS_URL
)
.
read
()
else
:
...
...
common/lib/xmodule/xmodule/modulestore/store_utilities.py
View file @
9b1ae9f9
common/lib/xmodule/xmodule/modulestore/xml_exporter.py
View file @
9b1ae9f9
common/lib/xmodule/xmodule/peer_grading_module.py
View file @
9b1ae9f9
...
...
@@ -524,7 +524,7 @@ class PeerGradingModule(XModule):
'''
Show individual problem interface
'''
if
get
==
None
or
get
.
get
(
'location'
)
==
None
:
if
get
is
None
or
get
.
get
(
'location'
)
is
None
:
if
not
self
.
use_for_single_location
:
#This is an error case, because it must be set to use a single location to be called without get parameters
#This is a dev_facing_error
...
...
lms/djangoapps/course_wiki/views.py
View file @
9b1ae9f9
...
...
@@ -49,7 +49,7 @@ def course_wiki_redirect(request, course_id):
if
not
course_slug
:
log
.
exception
(
"This course is improperly configured. The slug cannot be empty."
)
valid_slug
=
False
if
re
.
match
(
'^[-
\
w
\
.]+$'
,
course_slug
)
==
None
:
if
re
.
match
(
'^[-
\
w
\
.]+$'
,
course_slug
)
is
None
:
log
.
exception
(
"This course is improperly configured. The slug can only contain letters, numbers, periods or hyphens."
)
valid_slug
=
False
...
...
lms/djangoapps/courseware/grades.py
View file @
9b1ae9f9
...
...
@@ -140,7 +140,7 @@ def grade(student, request, course, student_module_cache=None, keep_raw_scores=F
grading_context
=
course
.
grading_context
raw_scores
=
[]
if
student_module_cache
==
None
:
if
student_module_cache
is
None
:
student_module_cache
=
StudentModuleCache
(
course
.
id
,
student
,
grading_context
[
'all_descriptors'
])
totaled_scores
=
{}
...
...
lms/djangoapps/django_comment_client/forum/views.py
View file @
9b1ae9f9
...
...
@@ -79,7 +79,6 @@ def get_threads(request, course_id, discussion_id=None, per_page=THREADS_PER_PAG
if
group_id
:
default_query_params
[
"group_id"
]
=
group_id
#so by default, a moderator sees all items, and a student sees his cohort
query_params
=
merge_dict
(
default_query_params
,
...
...
@@ -106,7 +105,6 @@ def get_threads(request, course_id, discussion_id=None, per_page=THREADS_PER_PAG
def
inline_discussion
(
request
,
course_id
,
discussion_id
):
"""
Renders JSON for DiscussionModules
"""
...
...
@@ -168,7 +166,6 @@ def inline_discussion(request, course_id, discussion_id):
@login_required
def
forum_form_discussion
(
request
,
course_id
):
"""
Renders the main Discussion page, potentially filtered by a search query
"""
...
...
lms/djangoapps/multicourse/multicourse_settings.py
View file @
9b1ae9f9
...
...
@@ -68,7 +68,7 @@ def get_course_settings(coursename):
def
is_valid_course
(
coursename
):
return
get_course_settings
(
coursename
)
!=
None
return
get_course_settings
(
coursename
)
is
not
None
def
get_course_property
(
coursename
,
property
):
...
...
lms/djangoapps/simplewiki/views.py
View file @
9b1ae9f9
...
...
@@ -236,7 +236,7 @@ def history(request, article_path, page=1, course_id=None):
page_size
=
10
if
page
==
None
:
if
page
is
None
:
page
=
1
try
:
p
=
int
(
page
)
...
...
@@ -310,7 +310,7 @@ def revision_feed(request, page=1, namespace=None, course_id=None):
page_size
=
10
if
page
==
None
:
if
page
is
None
:
page
=
1
try
:
p
=
int
(
page
)
...
...
lms/lib/comment_client/models.py
View file @
9b1ae9f9
...
...
@@ -23,7 +23,7 @@ class Model(object):
try
:
return
self
.
attributes
[
name
]
except
KeyError
:
if
self
.
retrieved
or
self
.
id
==
None
:
if
self
.
retrieved
or
self
.
id
is
None
:
raise
AttributeError
(
"Field {0} does not exist"
.
format
(
name
))
self
.
retrieve
()
return
self
.
__getattr__
(
name
)
...
...
lms/lib/symmath/formula.py
View file @
9b1ae9f9
...
...
@@ -70,7 +70,7 @@ StrPrinter._print_hat = _print_hat
def
to_latex
(
x
):
if
x
==
None
:
return
''
if
x
is
None
:
return
''
# LatexPrinter._print_dot = _print_dot
xs
=
latex
(
x
)
xs
=
xs
.
replace
(
r'\XI'
,
'XI'
)
# workaround for strange greek
...
...
@@ -278,7 +278,7 @@ class formula(object):
if
self
.
the_sympy
:
return
self
.
the_sympy
if
xml
==
None
:
# root
if
xml
is
None
:
# root
if
not
self
.
is_mathml
():
return
my_sympify
(
self
.
expr
)
if
self
.
is_presentation_mathml
():
...
...
lms/templates/courseware/course_navigation.html
View file @
9b1ae9f9
...
...
@@ -2,7 +2,7 @@
<
%
page
args=
"active_page=None"
/>
<
%
if
active_page
=
=
None
and
active_page_context
is
not
UNDEFINED:
if
active_page
is
None
and
active_page_context
is
not
UNDEFINED:
#
If
active_page
is
not
passed
in
as
an
argument
,
it
may
be
in
the
context
as
active_page_context
active_page =
active_page_context
...
...
lms/templates/problem.html
View file @
9b1ae9f9
<
%
namespace
name=
'static'
file=
'static_content.html'
/>
<h2
class=
"problem-header"
>
${ problem['name'] }
% if problem['weight'] != 1 and problem['weight']
!=
None:
% if problem['weight'] != 1 and problem['weight']
is not
None:
: ${ problem['weight'] } points
% endif
</h2>
...
...
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