Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
problem-builder
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
OpenEdx
problem-builder
Commits
48fd5952
Commit
48fd5952
authored
Jul 13, 2015
by
Kelketek
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #42 from open-craft/export-bugfixes
Export bugfixes
parents
472a3130
8d6fcbfd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
2 deletions
+9
-2
problem_builder/data_export.py
+2
-0
problem_builder/public/js/data_export.js
+1
-1
problem_builder/tasks.py
+6
-1
No files found.
problem_builder/data_export.py
View file @
48fd5952
...
...
@@ -172,6 +172,8 @@ class DataExportBlock(XBlock):
return
{
'error'
:
'permission denied'
}
from
.tasks
import
export_data
as
export_data_task
# Import here since this is edX LMS specific
self
.
_delete_export
()
# Make sure we nail down our state before sending off an asynchronous task.
self
.
save
()
if
not
username
:
user_id
=
None
else
:
...
...
problem_builder/public/js/data_export.js
View file @
48fd5952
...
...
@@ -26,7 +26,7 @@ function DataExportBlock(runtime, element) {
}
function
updateStatus
(
newStatus
)
{
var
statusChanged
=
newStatus
!==
status
;
var
statusChanged
=
!
_
.
isEqual
(
newStatus
,
status
)
;
status
=
newStatus
;
if
(
status
.
export_pending
)
{
// Keep polling for status updates when an export is running.
...
...
problem_builder/tasks.py
View file @
48fd5952
...
...
@@ -9,6 +9,7 @@ from instructor_task.models import ReportStore
from
opaque_keys
import
InvalidKeyError
from
opaque_keys.edx.keys
import
UsageKey
,
CourseKey
from
xmodule.modulestore.django
import
modulestore
from
xmodule.modulestore.exceptions
import
ItemNotFoundError
from
.mcq
import
MCQBlock
,
RatingBlock
from
problem_builder
import
AnswerBlock
...
...
@@ -56,7 +57,11 @@ def export_data(course_id, source_block_id_str, block_types, user_id, get_root=T
blocks_to_include
.
append
(
block
)
elif
block
.
has_children
:
for
child_id
in
block
.
children
:
scan_for_blocks
(
block
.
runtime
.
get_block
(
child_id
))
try
:
scan_for_blocks
(
block
.
runtime
.
get_block
(
child_id
))
except
ItemNotFoundError
:
# Blocks may refer to missing children. Don't break in this case.
pass
scan_for_blocks
(
root
)
...
...
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