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
8b1579e4
Commit
8b1579e4
authored
Feb 21, 2013
by
Jay Zoldak
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1527 from MITx/feature/vik/check-if-submission-allowed
Feature/vik/check if submission allowed
parents
3fe6a74e
c55f9970
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
3 deletions
+18
-3
common/lib/xmodule/xmodule/open_ended_grading_classes/open_ended_module.py
+2
-2
common/lib/xmodule/xmodule/open_ended_grading_classes/openendedchild.py
+8
-1
common/lib/xmodule/xmodule/tests/test_self_assessment.py
+8
-0
No files found.
common/lib/xmodule/xmodule/open_ended_grading_classes/open_ended_module.py
View file @
8b1579e4
...
...
@@ -108,7 +108,7 @@ class OpenEndedModule(openendedchild.OpenEndedChild):
self
.
answer
=
find_with_default
(
oeparam
,
'answer_display'
,
'No answer given.'
)
parsed_grader_payload
.
update
({
'location'
:
s
ystem
.
location
.
url
()
,
'location'
:
s
elf
.
location_string
,
'course_id'
:
system
.
course_id
,
'prompt'
:
prompt_string
,
'rubric'
:
rubric_string
,
...
...
@@ -138,7 +138,7 @@ class OpenEndedModule(openendedchild.OpenEndedChild):
"""
event_info
=
dict
()
event_info
[
'problem_id'
]
=
s
ystem
.
location
.
url
()
event_info
[
'problem_id'
]
=
s
elf
.
location_string
event_info
[
'student_id'
]
=
system
.
anonymous_student_id
event_info
[
'survey_responses'
]
=
get
...
...
common/lib/xmodule/xmodule/open_ended_grading_classes/openendedchild.py
View file @
8b1579e4
...
...
@@ -108,6 +108,12 @@ class OpenEndedChild(object):
self
.
peer_gs
=
PeerGradingService
(
system
.
open_ended_grading_interface
,
system
)
self
.
system
=
system
self
.
location_string
=
location
try
:
self
.
location_string
=
self
.
location_string
.
url
()
except
:
pass
self
.
setup_response
(
system
,
location
,
definition
,
descriptor
)
def
setup_response
(
self
,
system
,
location
,
definition
,
descriptor
):
...
...
@@ -418,7 +424,8 @@ class OpenEndedChild(object):
return
success
,
string
def
check_if_student_can_submit
(
self
):
location
=
self
.
system
.
location
.
url
()
location
=
self
.
location_string
student_id
=
self
.
system
.
anonymous_student_id
success
=
False
allowed_to_submit
=
True
...
...
common/lib/xmodule/xmodule/tests/test_self_assessment.py
View file @
8b1579e4
...
...
@@ -67,10 +67,18 @@ class SelfAssessmentTest(unittest.TestCase):
def
get_fake_item
(
name
):
return
responses
[
name
]
def
get_data_for_location
(
self
,
location
,
student
):
return
{
'count_graded'
:
0
,
'count_required'
:
0
,
'student_sub_count'
:
0
,
}
mock_query_dict
=
MagicMock
()
mock_query_dict
.
__getitem__
.
side_effect
=
get_fake_item
mock_query_dict
.
getlist
=
get_fake_item
self
.
module
.
peer_gs
.
get_data_for_location
=
get_data_for_location
self
.
assertEqual
(
self
.
module
.
get_score
()[
'score'
],
0
)
...
...
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