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
617bdc26
Commit
617bdc26
authored
May 27, 2012
by
ichuang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed courseware.views.quickedit to create StudentModule state if not pre-existing
parent
7791c7a9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
djangoapps/courseware/views.py
+11
-0
No files found.
djangoapps/courseware/views.py
View file @
617bdc26
...
@@ -340,6 +340,17 @@ def quickedit(request, id=None, qetemplate='quickedit.html',coursename=None):
...
@@ -340,6 +340,17 @@ def quickedit(request, id=None, qetemplate='quickedit.html',coursename=None):
xml
,
xml
,
id
,
id
,
state
=
None
)
state
=
None
)
# create empty student state for this problem, if not previously existing
s
=
StudentModule
.
objects
.
filter
(
student
=
request
.
user
,
module_id
=
id
)
if
len
(
s
)
==
0
or
s
is
None
:
smod
=
StudentModule
(
student
=
request
.
user
,
module_type
=
'problem'
,
module_id
=
id
,
state
=
instance
.
get_state
())
smod
.
save
()
lcp
=
instance
.
lcp
lcp
=
instance
.
lcp
pxml
=
lcp
.
tree
pxml
=
lcp
.
tree
pxmls
=
etree
.
tostring
(
pxml
,
pretty_print
=
True
)
pxmls
=
etree
.
tostring
(
pxml
,
pretty_print
=
True
)
...
...
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