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
c535a6b9
Commit
c535a6b9
authored
May 22, 2014
by
Sarina Canelake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Opaque-keys: fix pep8 violations
parent
b56e12ff
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
13 deletions
+11
-13
common/djangoapps/course_groups/cohorts.py
+1
-0
common/djangoapps/student/tests/test_roles.py
+0
-1
common/lib/xmodule/xmodule/modulestore/locator.py
+3
-4
common/lib/xmodule/xmodule/modulestore/tests/test_locators.py
+6
-6
lms/djangoapps/bulk_email/forms.py
+1
-1
lms/djangoapps/bulk_email/tasks.py
+0
-1
No files found.
common/djangoapps/course_groups/cohorts.py
View file @
c535a6b9
...
...
@@ -32,6 +32,7 @@ def local_random():
return
_local_random
def
is_course_cohorted
(
course_key
):
"""
Given a course key, return a boolean for whether or not the course is
...
...
common/djangoapps/student/tests/test_roles.py
View file @
c535a6b9
...
...
@@ -132,7 +132,6 @@ class RolesTestCase(TestCase):
"Student doesn't have access to {}"
.
format
(
unicode
(
self
.
course_id
))
)
def
test_get_user_for_role
(
self
):
"""
test users_for_role
...
...
common/lib/xmodule/xmodule/modulestore/locator.py
View file @
c535a6b9
...
...
@@ -88,13 +88,12 @@ class BlockLocatorBase(Locator):
({BLOCK_TYPE_PREFIX}\+(?P<block_type>{ALLOWED_ID_CHARS}+)\+?)?
({BLOCK_PREFIX}\+(?P<block_id>{ALLOWED_ID_CHARS}+))?
"""
.
format
(
ALLOWED_ID_CHARS
=
Locator
.
ALLOWED_ID_CHARS
,
BRANCH_PREFIX
=
BRANCH_PREFIX
,
VERSION_PREFIX
=
Locator
.
VERSION_PREFIX
,
BLOCK_TYPE_PREFIX
=
Locator
.
BLOCK_TYPE_PREFIX
,
BLOCK_PREFIX
=
BLOCK_PREFIX
)
ALLOWED_ID_CHARS
=
Locator
.
ALLOWED_ID_CHARS
,
BRANCH_PREFIX
=
BRANCH_PREFIX
,
VERSION_PREFIX
=
Locator
.
VERSION_PREFIX
,
BLOCK_TYPE_PREFIX
=
Locator
.
BLOCK_TYPE_PREFIX
,
BLOCK_PREFIX
=
BLOCK_PREFIX
)
URL_RE
=
re
.
compile
(
'^'
+
URL_RE_SOURCE
+
'$'
,
re
.
IGNORECASE
|
re
.
VERBOSE
|
re
.
UNICODE
)
@classmethod
def
parse_url
(
cls
,
string
):
"""
...
...
common/lib/xmodule/xmodule/modulestore/tests/test_locators.py
View file @
c535a6b9
...
...
@@ -158,12 +158,12 @@ class LocatorTest(TestCase):
)
testobj
=
UsageKey
.
from_string
(
testurn
)
self
.
check_block_locn_fields
(
testobj
,
org
=
expected_org
,
offering
=
expected_offering
,
branch
=
expected_branch
,
block_type
=
'problem'
,
block
=
expected_block_ref
testobj
,
org
=
expected_org
,
offering
=
expected_offering
,
branch
=
expected_branch
,
block_type
=
'problem'
,
block
=
expected_block_ref
)
self
.
assertEqual
(
unicode
(
testobj
),
testurn
)
testobj
=
testobj
.
for_version
(
ObjectId
())
...
...
lms/djangoapps/bulk_email/forms.py
View file @
c535a6b9
...
...
@@ -67,7 +67,7 @@ class CourseAuthorizationAdminForm(forms.ModelForm): # pylint: disable=R0924
try
:
course_key
=
SlashSeparatedCourseKey
.
from_deprecated_string
(
cleaned_id
)
except
InvalidKeyError
:
msg
=
u'Course id invalid.'
msg
=
u'Course id invalid.'
msg
+=
u' --- Entered course id was: "{0}". '
.
format
(
cleaned_id
)
msg
+=
'Please recheck that you have supplied a valid course id.'
raise
forms
.
ValidationError
(
msg
)
...
...
lms/djangoapps/bulk_email/tasks.py
View file @
c535a6b9
...
...
@@ -192,7 +192,6 @@ def perform_delegate_email_batches(entry_id, course_id, task_input, action_name)
log
.
warning
(
u"Task
%
s: "
+
format_msg
,
task_id
,
course_id
,
email_obj
.
course_id
)
raise
ValueError
(
format_msg
%
(
course_id
,
email_obj
.
course_id
))
# Fetch the course object.
course
=
get_course
(
course_id
)
...
...
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