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
1263d82d
Commit
1263d82d
authored
Jul 11, 2012
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add comments on StudentModuleCache arguments
parent
f0717570
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletions
+9
-1
lms/djangoapps/courseware/models.py
+9
-1
No files found.
lms/djangoapps/courseware/models.py
View file @
1263d82d
...
@@ -72,6 +72,10 @@ class StudentModuleCache(object):
...
@@ -72,6 +72,10 @@ class StudentModuleCache(object):
'''
'''
Find any StudentModule objects that are needed by any child modules of the
Find any StudentModule objects that are needed by any child modules of the
supplied descriptor. Avoids making multiple queries to the database
supplied descriptor. Avoids making multiple queries to the database
descriptor: An XModuleDescriptor
depth is the number of levels of descendent modules to load StudentModules for, in addition to
the supplied descriptor. If depth is None, load all descendent StudentModules
'''
'''
if
user
.
is_authenticated
():
if
user
.
is_authenticated
():
module_ids
=
self
.
_get_module_state_keys
(
descriptor
,
depth
)
module_ids
=
self
.
_get_module_state_keys
(
descriptor
,
depth
)
...
@@ -92,7 +96,11 @@ class StudentModuleCache(object):
...
@@ -92,7 +96,11 @@ class StudentModuleCache(object):
def
_get_module_state_keys
(
self
,
descriptor
,
depth
):
def
_get_module_state_keys
(
self
,
descriptor
,
depth
):
'''
'''
Get a list of the state_keys needed for StudentModules
Get a list of the state_keys needed for StudentModules
required for this chunk of module xml
required for this module descriptor
descriptor: An XModuleDescriptor
depth is the number of levels of descendent modules to load StudentModules for, in addition to
the supplied descriptor. If depth is None, load all descendent StudentModules
'''
'''
keys
=
[
descriptor
.
location
.
url
()]
keys
=
[
descriptor
.
location
.
url
()]
...
...
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