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
68e1bcf4
Commit
68e1bcf4
authored
Jul 31, 2013
by
Don Mitchell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove edu from doc string examples & typos
parent
f2977704
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
common/lib/xmodule/xmodule/modulestore/locator.py
+9
-9
common/lib/xmodule/xmodule/modulestore/tests/test_split_modulestore.py
+1
-1
No files found.
common/lib/xmodule/xmodule/modulestore/locator.py
View file @
68e1bcf4
...
...
@@ -45,7 +45,7 @@ class Locator(object):
def
__repr__
(
self
):
'''
repr(self) returns something like this: CourseLocator("
edu.
mit.eecs.6002x")
repr(self) returns something like this: CourseLocator("mit.eecs.6002x")
'''
classname
=
self
.
__class__
.
__name__
if
classname
.
find
(
'.'
)
!=
-
1
:
...
...
@@ -54,13 +54,13 @@ class Locator(object):
def
__str__
(
self
):
'''
str(self) returns something like this: "
edu.
mit.eecs.6002x"
str(self) returns something like this: "mit.eecs.6002x"
'''
return
unicode
(
self
)
.
encode
(
'utf8'
)
def
__unicode__
(
self
):
'''
unicode(self) returns something like this: "
edu.
mit.eecs.6002x"
unicode(self) returns something like this: "mit.eecs.6002x"
'''
return
self
.
url
()
...
...
@@ -89,12 +89,12 @@ class CourseLocator(Locator):
"""
Examples of valid CourseLocator specifications:
CourseLocator(version_guid=ObjectId('519665f6223ebd6980884f2b'))
CourseLocator(course_id='
edu.
mit.eecs.6002x')
CourseLocator(course_id='
edu.
mit.eecs.6002x;published')
CourseLocator(course_id='
edu.
mit.eecs.6002x', branch='published')
CourseLocator(course_id='mit.eecs.6002x')
CourseLocator(course_id='mit.eecs.6002x;published')
CourseLocator(course_id='mit.eecs.6002x', branch='published')
CourseLocator(url='edx://@519665f6223ebd6980884f2b')
CourseLocator(url='edx://
edu.
mit.eecs.6002x')
CourseLocator(url='edx://
edu.
mit.eecs.6002x;published')
CourseLocator(url='edx://mit.eecs.6002x')
CourseLocator(url='edx://mit.eecs.6002x;published')
Should have at lease a specific course_id (id for the course as if it were a project w/
versions) with optional 'branch',
...
...
@@ -253,7 +253,7 @@ class CourseLocator(Locator):
def
init_from_course_id
(
self
,
course_id
,
explicit_branch
=
None
):
"""
Course_id is a string like '
edu.mit.eecs.6002x' or 'edu.
mit.eecs.6002x;published'.
Course_id is a string like '
mit.eecs.6002x' or '
mit.eecs.6002x;published'.
Revision (optional) is a string like 'published'.
It may be provided explicitly (explicit_branch) or embedded into course_id.
...
...
common/lib/xmodule/xmodule/modulestore/tests/test_split_modulestore.py
View file @
68e1bcf4
...
...
@@ -331,7 +331,7 @@ class SplitModuleItemTests(SplitModuleTest):
block
.
grade_cutoffs
,
{
"Pass"
:
0.45
},
)
# try to look up other branchs
# try to look up other branch
e
s
self
.
assertRaises
(
ItemNotFoundError
,
modulestore
()
.
get_item
,
BlockUsageLocator
(
course_id
=
locator
.
as_course_locator
(),
...
...
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