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
084a3c33
Commit
084a3c33
authored
Jan 10, 2013
by
Diana Huang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update comments and remove some unnecessary code
parent
0bfb1fee
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
27 deletions
+3
-27
lms/djangoapps/open_ended_grading/tests.py
+2
-3
lms/djangoapps/open_ended_grading/views.py
+1
-24
No files found.
lms/djangoapps/open_ended_grading/tests.py
View file @
084a3c33
"""
"""
This file demonstrates writing tests using the unittest module. These will pass
Tests for open ended grading interfaces
when you run "manage.py test".
Replace this with more appropriate tests for your application.
django-admin.py test --settings=lms.envs.test --pythonpath=. lms/djangoapps/open_ended_grading
"""
"""
from
django.test
import
TestCase
from
django.test
import
TestCase
...
...
lms/djangoapps/open_ended_grading/views.py
View file @
084a3c33
# Grading Views
# Grading Views
from
collections
import
defaultdict
import
csv
import
logging
import
logging
import
os
import
urllib
import
urllib
from
django.conf
import
settings
from
django.conf
import
settings
from
django.contrib.auth.models
import
User
,
Group
from
django.http
import
HttpResponse
from
django_future.csrf
import
ensure_csrf_cookie
from
django.views.decorators.cache
import
cache_control
from
django.views.decorators.cache
import
cache_control
from
mitxmako.shortcuts
import
render_to_response
from
mitxmako.shortcuts
import
render_to_response
from
django.core.urlresolvers
import
reverse
from
django.core.urlresolvers
import
reverse
from
courseware
import
grades
from
courseware.access
import
has_access
,
get_access_group_name
from
courseware.courses
import
get_course_with_access
from
django_comment_client.models
import
Role
,
FORUM_ROLE_ADMINISTRATOR
,
FORUM_ROLE_MODERATOR
,
FORUM_ROLE_COMMUNITY_TA
from
django_comment_client.utils
import
has_forum_access
from
psychometrics
import
psychoanalyze
from
student.models
import
CourseEnrollment
from
student.models
import
unique_id_for_user
from
student.models
import
unique_id_for_user
from
xmodule.course_module
import
CourseDescriptor
from
courseware.courses
import
get_course_with_access
from
xmodule.modulestore
import
Location
from
xmodule.modulestore.django
import
modulestore
from
xmodule.modulestore.exceptions
import
InvalidLocationError
,
ItemNotFoundError
,
NoPathToItem
from
xmodule.modulestore.search
import
path_to_location
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
grading_service
import
GradingServiceError
from
grading_service
import
GradingServiceError
import
json
import
json
import
track.views
from
.staff_grading
import
StaffGrading
from
.staff_grading
import
StaffGrading
...
@@ -52,14 +33,11 @@ def staff_grading(request, course_id):
...
@@ -52,14 +33,11 @@ def staff_grading(request, course_id):
"""
"""
course
=
get_course_with_access
(
request
.
user
,
course_id
,
'staff'
)
course
=
get_course_with_access
(
request
.
user
,
course_id
,
'staff'
)
grading
=
StaffGrading
(
course
)
ajax_url
=
reverse
(
'staff_grading'
,
kwargs
=
{
'course_id'
:
course_id
})
ajax_url
=
reverse
(
'staff_grading'
,
kwargs
=
{
'course_id'
:
course_id
})
if
not
ajax_url
.
endswith
(
'/'
):
if
not
ajax_url
.
endswith
(
'/'
):
ajax_url
+=
'/'
ajax_url
+=
'/'
return
render_to_response
(
'instructor/staff_grading.html'
,
{
return
render_to_response
(
'instructor/staff_grading.html'
,
{
'view_html'
:
''
,
'course'
:
course
,
'course'
:
course
,
'course_id'
:
course_id
,
'course_id'
:
course_id
,
'ajax_url'
:
ajax_url
,
'ajax_url'
:
ajax_url
,
...
@@ -99,7 +77,6 @@ def peer_grading(request, course_id):
...
@@ -99,7 +77,6 @@ def peer_grading(request, course_id):
ajax_url
+=
'/'
ajax_url
+=
'/'
return
render_to_response
(
'peer_grading/peer_grading.html'
,
{
return
render_to_response
(
'peer_grading/peer_grading.html'
,
{
'view_html'
:
''
,
'course'
:
course
,
'course'
:
course
,
'course_id'
:
course_id
,
'course_id'
:
course_id
,
'ajax_url'
:
ajax_url
,
'ajax_url'
:
ajax_url
,
...
...
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