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
85079da3
Commit
85079da3
authored
May 12, 2012
by
Piotr Mitros
Committed by
pmitros
May 12, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor bug fix/conflict between grades and i4xsystem
parent
747105e3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
6 deletions
+14
-6
djangoapps/courseware/grades.py
+5
-1
djangoapps/courseware/module_render.py
+2
-1
djangoapps/courseware/modules/x_module.py
+7
-4
No files found.
djangoapps/courseware/grades.py
View file @
85079da3
...
...
@@ -135,7 +135,11 @@ def get_score(user, problem, cache):
if
id
in
cache
and
response
.
max_grade
!=
None
:
total
=
response
.
max_grade
else
:
total
=
float
(
courseware
.
modules
.
capa_module
.
Module
(
etree
.
tostring
(
problem
),
"id"
)
.
max_score
())
## HACK 1: We shouldn't specifically reference capa_module
## HACK 2: Backwards-compatibility: This should be written when a grade is saved, and removed from the system
from
module_render
import
I4xSystem
system
=
I4xSystem
(
None
,
None
,
None
)
total
=
float
(
courseware
.
modules
.
capa_module
.
Module
(
system
,
etree
.
tostring
(
problem
),
"id"
)
.
max_score
())
response
.
max_grade
=
total
response
.
save
()
...
...
djangoapps/courseware/module_render.py
View file @
85079da3
...
...
@@ -25,7 +25,8 @@ class I4xSystem(object):
def
__init__
(
self
,
ajax_url
,
track_function
,
render_function
,
filestore
=
None
):
self
.
ajax_url
=
ajax_url
self
.
track_function
=
track_function
self
.
filestore
=
OSFS
(
settings
.
DATA_DIR
)
if
not
filestore
:
self
.
filestore
=
OSFS
(
settings
.
DATA_DIR
)
self
.
render_function
=
render_function
self
.
exception404
=
Http404
...
...
djangoapps/courseware/modules/x_module.py
View file @
85079da3
...
...
@@ -51,8 +51,11 @@ class XModule(object):
self
.
item_id
=
item_id
self
.
state
=
state
self
.
ajax_url
=
system
.
ajax_url
self
.
tracker
=
system
.
track_function
self
.
filestore
=
system
.
filestore
self
.
render_function
=
system
.
render_function
if
system
:
## These are temporary; we really should go
## through self.system.
self
.
ajax_url
=
system
.
ajax_url
self
.
tracker
=
system
.
track_function
self
.
filestore
=
system
.
filestore
self
.
render_function
=
system
.
render_function
self
.
system
=
system
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