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
ec04b0cb
Commit
ec04b0cb
authored
Aug 07, 2012
by
Bridger Maxwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed yield_module_descendents to be stack-based, so it plays nicer with the profiler.
parent
1f34cf33
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
lms/djangoapps/courseware/grades.py
+6
-4
No files found.
lms/djangoapps/courseware/grades.py
View file @
ec04b0cb
...
...
@@ -12,10 +12,12 @@ from models import StudentModule
log
=
logging
.
getLogger
(
"mitx.courseware"
)
def
yield_module_descendents
(
module
):
for
child
in
module
.
get_display_items
():
yield
child
for
module
in
yield_module_descendents
(
child
):
yield
module
stack
=
module
.
get_display_items
()
while
len
(
stack
)
>
0
:
next_module
=
stack
.
pop
()
stack
.
extend
(
next_module
.
get_display_items
()
)
yield
next_module
def
grade
(
student
,
request
,
course
,
student_module_cache
=
None
):
"""
...
...
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