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
df935d42
Commit
df935d42
authored
Mar 26, 2013
by
Vik Paruchuri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issues with open ended image grading and peer grading centralized module finder.
parent
83c0feb8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
12 deletions
+4
-12
common/lib/xmodule/xmodule/open_ended_grading_classes/openendedchild.py
+0
-4
lms/djangoapps/courseware/module_render.py
+3
-7
lms/djangoapps/open_ended_grading/views.py
+1
-1
No files found.
common/lib/xmodule/xmodule/open_ended_grading_classes/openendedchild.py
View file @
df935d42
...
...
@@ -357,10 +357,6 @@ class OpenEndedChild(object):
if
get_data
[
'can_upload_files'
]
in
[
'true'
,
'1'
]:
has_file_to_upload
=
True
file
=
get_data
[
'student_file'
][
0
]
if
self
.
system
.
track_fuction
:
self
.
system
.
track_function
(
'open_ended_image_upload'
,
{
'filename'
:
file
.
name
})
else
:
log
.
info
(
"No tracking function found when uploading image."
)
uploaded_to_s3
,
image_ok
,
s3_public_url
=
self
.
upload_image_to_s3
(
file
)
if
uploaded_to_s3
:
image_tag
=
self
.
generate_image_tag_from_url
(
s3_public_url
,
file
.
name
)
...
...
lms/djangoapps/courseware/module_render.py
View file @
df935d42
...
...
@@ -208,9 +208,6 @@ def get_module_for_descriptor(user, request, descriptor, model_data_cache, cours
'waittime'
:
settings
.
XQUEUE_WAITTIME_BETWEEN_REQUESTS
}
def
get_or_default
(
key
,
default
):
getattr
(
settings
,
key
,
default
)
#This is a hacky way to pass settings to the combined open ended xmodule
#It needs an S3 interface to upload images to S3
#It needs the open ended grading interface in order to get peer grading to be done
...
...
@@ -226,12 +223,11 @@ def get_module_for_descriptor(user, request, descriptor, model_data_cache, cours
open_ended_grading_interface
[
'mock_staff_grading'
]
=
settings
.
MOCK_STAFF_GRADING
if
is_descriptor_combined_open_ended
:
s3_interface
=
{
'access_key'
:
get
_or_default
(
'AWS_ACCESS_KEY_ID'
,
''
),
'secret_access_key'
:
get
_or_default
(
'AWS_SECRET_ACCESS_KEY'
,
''
),
'storage_bucket_name'
:
get
_or_default
(
'AWS_STORAGE_BUCKET_NAME'
,
''
)
'access_key'
:
get
attr
(
settings
,
'AWS_ACCESS_KEY_ID'
,
''
),
'secret_access_key'
:
get
attr
(
settings
,
'AWS_SECRET_ACCESS_KEY'
,
''
),
'storage_bucket_name'
:
get
attr
(
settings
,
'AWS_STORAGE_BUCKET_NAME'
,
''
)
}
def
inner_get_module
(
descriptor
):
"""
Delegate to get_module. It does an access check, so may return None
...
...
lms/djangoapps/open_ended_grading/views.py
View file @
df935d42
...
...
@@ -111,7 +111,7 @@ def peer_grading(request, course_id):
#Get the peer grading modules currently in the course
items
=
modulestore
()
.
get_items
([
'i4x'
,
None
,
course_id_parts
[
1
],
'peergrading'
,
None
])
#See if any of the modules are centralized modules (ie display info from multiple problems)
items
=
[
i
for
i
in
items
if
i
.
metadata
.
get
(
"use_for_single_location"
,
True
)
in
false_dict
]
items
=
[
i
for
i
in
items
if
getattr
(
i
,
"use_for_single_location"
,
True
)
in
false_dict
]
#Get the first one
item_location
=
items
[
0
]
.
location
#Generate a url for the first module and redirect the user to it
...
...
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