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
cf9c01a9
Commit
cf9c01a9
authored
Sep 07, 2017
by
Braden MacDonald
Committed by
GitHub
Sep 07, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #164 from open-craft/bogdan-fix-apros-instructor-tool
Fix Instructor Tool in Apros
parents
a88e37be
5a1489b5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
problem_builder/public/js/instructor_tool.js
+1
-1
problem_builder/tasks.py
+6
-4
No files found.
problem_builder/public/js/instructor_tool.js
View file @
cf9c01a9
...
@@ -288,7 +288,7 @@ function InstructorToolBlock(runtime, element) {
...
@@ -288,7 +288,7 @@ function InstructorToolBlock(runtime, element) {
// Returns the <option> element so that it can be enabled later,
// Returns the <option> element so that it can be enabled later,
// if it's found to have a descendant that is enabled.
// if it's found to have a descendant that is enabled.
var
appendBlock
=
function
(
block
)
{
var
appendBlock
=
function
(
block
)
{
var
blockId
=
block
.
id
.
split
(
'+block@'
).
pop
()
,
var
blockId
=
block
.
id
,
padding
=
Array
(
2
*
block
.
depth
).
join
(
' '
),
padding
=
Array
(
2
*
block
.
depth
).
join
(
' '
),
disabled
=
(
block
.
enabled
?
undefined
:
'disabled'
),
disabled
=
(
block
.
enabled
?
undefined
:
'disabled'
),
labelAttr
,
labelAttr
,
...
...
problem_builder/tasks.py
View file @
cf9c01a9
...
@@ -6,7 +6,8 @@ import time
...
@@ -6,7 +6,8 @@ import time
from
celery.task
import
task
from
celery.task
import
task
from
celery.utils.log
import
get_task_logger
from
celery.utils.log
import
get_task_logger
from
lms.djangoapps.instructor_task.models
import
ReportStore
from
lms.djangoapps.instructor_task.models
import
ReportStore
from
opaque_keys.edx.keys
import
CourseKey
from
opaque_keys
import
InvalidKeyError
from
opaque_keys.edx.keys
import
CourseKey
,
UsageKey
from
student.models
import
user_by_anonymous_id
from
student.models
import
user_by_anonymous_id
from
xmodule.modulestore.django
import
modulestore
from
xmodule.modulestore.django
import
modulestore
from
xmodule.modulestore.exceptions
import
ItemNotFoundError
from
xmodule.modulestore.exceptions
import
ItemNotFoundError
...
@@ -29,11 +30,12 @@ def export_data(course_id, source_block_id_str, block_types, user_ids, match_str
...
@@ -29,11 +30,12 @@ def export_data(course_id, source_block_id_str, block_types, user_ids, match_str
logger
.
debug
(
"Beginning data export"
)
logger
.
debug
(
"Beginning data export"
)
try
:
try
:
course_key
=
CourseKey
.
from_string
(
course_id
)
course_key
=
CourseKey
.
from_string
(
course_id
)
src_block
=
modulestore
()
.
get_items
(
course_key
,
qualifiers
=
{
'name'
:
source_block_id_str
},
depth
=
0
)[
0
]
usage_key
=
UsageKey
.
from_string
(
source_block_id_str
)
except
In
dex
Error
:
except
In
validKey
Error
:
raise
ValueError
(
"Could not find the specified Block ID."
)
raise
ValueError
(
"Could not find the specified Block ID."
)
course_key_str
=
unicode
(
course_key
)
src_block
=
modulestore
()
.
get_item
(
usage_key
)
course_key_str
=
unicode
(
course_key
)
type_map
=
{
cls
.
__name__
:
cls
for
cls
in
[
MCQBlock
,
RatingBlock
,
AnswerBlock
]}
type_map
=
{
cls
.
__name__
:
cls
for
cls
in
[
MCQBlock
,
RatingBlock
,
AnswerBlock
]}
if
not
block_types
:
if
not
block_types
:
...
...
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