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
5dab18fe
Commit
5dab18fe
authored
Dec 26, 2011
by
Piotr Mitros
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
About to fix correct_map. Working save point
parent
37896ac5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
17 deletions
+6
-17
courseware/capa_module.py
+6
-3
courseware/html_module.py
+0
-9
courseware/module_render.py
+0
-1
courseware/schematic_module.py
+0
-2
courseware/video_module.py
+0
-2
No files found.
courseware/capa_module.py
View file @
5dab18fe
...
...
@@ -7,7 +7,6 @@ from django.http import Http404
import
dateutil
import
datetime
#from xml.dom.minidom import parse, parseString
import
content_parser
import
libxml2
...
...
@@ -68,7 +67,7 @@ class LoncapaModule(XModule):
# User submitted a problem, and hasn't reset. We don't want
# more submissions.
if
self
.
lcp
.
done
and
not
self
.
rerandomize
:
if
self
.
lcp
.
done
and
self
.
rerandomize
:
#print "!"
check_button
=
False
save_button
=
False
...
...
@@ -235,7 +234,11 @@ class LoncapaModule(XModule):
for
key
in
get
:
answers
[
'_'
.
join
(
key
.
split
(
'_'
)[
1
:])]
=
get
[
key
]
js
=
json
.
dumps
(
self
.
lcp
.
grade_answers
(
answers
))
correct_map
=
self
.
lcp
.
grade_answers
(
answers
)
success
=
False
# TODO
js
=
json
.
dumps
({
'correct_map'
:
correct_map
,
'success'
:
success
})
return
js
...
...
courseware/html_module.py
View file @
5dab18fe
from
x_module
import
XModule
from
xml.dom.minidom
import
parse
,
parseString
import
json
## TODO: Abstract out from Django
...
...
@@ -23,10 +21,3 @@ class HtmlModule(XModule):
def
__init__
(
self
,
xml
,
item_id
,
ajax_url
=
None
,
track_url
=
None
,
state
=
None
):
print
"item id"
,
item_id
XModule
.
__init__
(
self
,
xml
,
item_id
,
ajax_url
,
track_url
,
state
)
# template_source=module.getAttribute('filename')
# return {'content':render_to_string(template_source, {})}
# print state
# if state!=None and "time" not in json.loads(state):
# self.video_time = 0
courseware/module_render.py
View file @
5dab18fe
from
django.http
import
HttpResponse
from
django.template
import
Context
,
loader
from
djangomako.shortcuts
import
render_to_response
,
render_to_string
from
xml.dom.minidom
import
parse
,
parseString
import
json
,
os
,
sys
from
django.core.context_processors
import
csrf
...
...
courseware/schematic_module.py
View file @
5dab18fe
from
x_module
import
XModule
from
xml.dom.minidom
import
parse
,
parseString
import
json
## TODO: Abstract out from Django
...
...
courseware/video_module.py
View file @
5dab18fe
from
x_module
import
XModule
from
xml.dom.minidom
import
parse
,
parseString
import
json
## TODO: Abstract out from Django
...
...
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