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
2191f3e2
Commit
2191f3e2
authored
Jan 22, 2013
by
Vik Paruchuri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add in open ended problems view
parent
fe77bb00
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
49 additions
and
5 deletions
+49
-5
lms/djangoapps/courseware/tabs.py
+1
-1
lms/djangoapps/open_ended_grading/views.py
+6
-3
lms/templates/open_ended_problems/open_ended_problems.html
+37
-0
lms/urls.py
+5
-1
No files found.
lms/djangoapps/courseware/tabs.py
View file @
2191f3e2
...
@@ -157,7 +157,7 @@ def _peer_grading(tab, user, course, active_page):
...
@@ -157,7 +157,7 @@ def _peer_grading(tab, user, course, active_page):
def
_combined_open_ended_grading
(
tab
,
user
,
course
,
active_page
):
def
_combined_open_ended_grading
(
tab
,
user
,
course
,
active_page
):
if
user
.
is_authenticated
:
if
user
.
is_authenticated
:
link
=
reverse
(
'
peer_grading
'
,
args
=
[
course
.
id
])
link
=
reverse
(
'
open_ended_problems
'
,
args
=
[
course
.
id
])
peer_grading_url
=
settings
.
PEER_GRADING_INTERFACE
peer_grading_url
=
settings
.
PEER_GRADING_INTERFACE
split_url
=
peer_grading_url
.
split
(
"/"
)
split_url
=
peer_grading_url
.
split
(
"/"
)
controller_url
=
"http://"
+
split_url
[
2
]
+
"/grading_controller"
controller_url
=
"http://"
+
split_url
[
2
]
+
"/grading_controller"
...
...
lms/djangoapps/open_ended_grading/views.py
View file @
2191f3e2
...
@@ -13,6 +13,7 @@ from courseware.courses import get_course_with_access
...
@@ -13,6 +13,7 @@ from courseware.courses import get_course_with_access
from
peer_grading_service
import
PeerGradingService
from
peer_grading_service
import
PeerGradingService
from
peer_grading_service
import
MockPeerGradingService
from
peer_grading_service
import
MockPeerGradingService
from
controller_query_service
import
ControllerQueryService
from
grading_service
import
GradingServiceError
from
grading_service
import
GradingServiceError
import
json
import
json
from
.staff_grading
import
StaffGrading
from
.staff_grading
import
StaffGrading
...
@@ -26,6 +27,8 @@ if settings.MOCK_PEER_GRADING:
...
@@ -26,6 +27,8 @@ if settings.MOCK_PEER_GRADING:
else
:
else
:
peer_gs
=
PeerGradingService
(
settings
.
PEER_GRADING_INTERFACE
)
peer_gs
=
PeerGradingService
(
settings
.
PEER_GRADING_INTERFACE
)
controller_qs
=
ControllerQueryService
(
settings
.
PEER_GRADING_INTERFACE
)
"""
"""
Reverses the URL from the name and the course id, and then adds a trailing slash if
Reverses the URL from the name and the course id, and then adds a trailing slash if
it does not exist yet
it does not exist yet
...
@@ -127,7 +130,7 @@ def student_problem_list(request, course_id, student_id):
...
@@ -127,7 +130,7 @@ def student_problem_list(request, course_id, student_id):
error_text
=
""
error_text
=
""
problem_list
=
[]
problem_list
=
[]
try
:
try
:
problem_list_json
=
peer_gs
.
get_problem
_list
(
course_id
,
unique_id_for_user
(
request
.
user
))
problem_list_json
=
controller_qs
.
get_grading_status
_list
(
course_id
,
unique_id_for_user
(
request
.
user
))
problem_list_dict
=
json
.
loads
(
problem_list_json
)
problem_list_dict
=
json
.
loads
(
problem_list_json
)
success
=
problem_list_dict
[
'success'
]
success
=
problem_list_dict
[
'success'
]
if
'error'
in
problem_list_dict
:
if
'error'
in
problem_list_dict
:
...
@@ -143,9 +146,9 @@ def student_problem_list(request, course_id, student_id):
...
@@ -143,9 +146,9 @@ def student_problem_list(request, course_id, student_id):
error_text
=
"Could not get problem list"
error_text
=
"Could not get problem list"
success
=
False
success
=
False
ajax_url
=
_reverse_with_slash
(
'
peer_grading
'
,
course_id
)
ajax_url
=
_reverse_with_slash
(
'
open_ended_problems
'
,
course_id
)
return
render_to_response
(
'
peer_grading/peer_grading
.html'
,
{
return
render_to_response
(
'
open_ended_problems/open_ended_problems
.html'
,
{
'course'
:
course
,
'course'
:
course
,
'course_id'
:
course_id
,
'course_id'
:
course_id
,
'ajax_url'
:
ajax_url
,
'ajax_url'
:
ajax_url
,
...
...
lms/templates/open_ended_problems/open_ended_problems.html
0 → 100644
View file @
2191f3e2
<
%
inherit
file=
"/main.html"
/>
<
%
block
name=
"bodyclass"
>
${course.css_class}
</
%
block>
<
%
namespace
name=
'static'
file=
'/static_content.html'
/>
<
%
block
name=
"headextra"
>
<
%
static:css
group=
'course'
/>
</
%
block>
<
%
block
name=
"title"
><title>
${course.number} Open Ended Problems
</title></
%
block>
<
%
include
file=
"/courseware/course_navigation.html"
args=
"active_page='open_ended_problems'"
/>
<section
class=
"container"
>
<div
class=
"open-ended-problems"
data-ajax_url=
"${ajax_url}"
>
<div
class=
"error-container"
>
${error_text}
</div>
<h1>
Open Ended Problems
</h1>
<h2>
Instructions
</h2>
<p>
Here are a list of open ended problems for this course.
</p>
% if success:
% if len(problem_list) == 0:
<div
class=
"message-container"
>
You have not attempted any open ended problems yet.
</div>
%else:
<ul
class=
"problem-list"
>
%for problem in problem_list:
<li>
<a
href=
"${ajax_url}problem?location=${problem['location']}"
>
${problem['problem_name']} (${problem['state']} , ${problem['grader_type']} )
</a>
</li>
%endfor
</ul>
%endif
%endif
</div>
</section>
\ No newline at end of file
lms/urls.py
View file @
2191f3e2
...
@@ -282,7 +282,11 @@ if settings.COURSEWARE_ENABLED:
...
@@ -282,7 +282,11 @@ if settings.COURSEWARE_ENABLED:
url
(
r'^courses/(?P<course_id>[^/]+/[^/]+/[^/]+)/peer_grading/save_calibration_essay$'
,
url
(
r'^courses/(?P<course_id>[^/]+/[^/]+/[^/]+)/peer_grading/save_calibration_essay$'
,
'open_ended_grading.peer_grading_service.save_calibration_essay'
,
name
=
'peer_grading_save_calibration_essay'
),
'open_ended_grading.peer_grading_service.save_calibration_essay'
,
name
=
'peer_grading_save_calibration_essay'
),
# Cohorts management
# Open Ended problem list
url
(
r'^courses/(?P<course_id>[^/]+/[^/]+/[^/]+)/open_ended_problems$'
,
'open_ended_grading.views.student_problem_list'
,
name
=
'open_ended_problems'
),
# Cohorts management
url
(
r'^courses/(?P<course_id>[^/]+/[^/]+/[^/]+)/cohorts$'
,
url
(
r'^courses/(?P<course_id>[^/]+/[^/]+/[^/]+)/cohorts$'
,
'course_groups.views.list_cohorts'
,
name
=
"cohorts"
),
'course_groups.views.list_cohorts'
,
name
=
"cohorts"
),
url
(
r'^courses/(?P<course_id>[^/]+/[^/]+/[^/]+)/cohorts/add$'
,
url
(
r'^courses/(?P<course_id>[^/]+/[^/]+/[^/]+)/cohorts/add$'
,
...
...
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