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
4112f8ad
Commit
4112f8ad
authored
Jan 22, 2013
by
Vik Paruchuri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pass back dictionaries where needed from notifications functions
parent
68db8b0d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
9 deletions
+19
-9
lms/djangoapps/courseware/tabs.py
+12
-4
lms/djangoapps/open_ended_grading/open_ended_notifications.py
+4
-4
lms/djangoapps/open_ended_grading/views.py
+3
-1
No files found.
lms/djangoapps/courseware/tabs.py
View file @
4112f8ad
...
...
@@ -108,7 +108,10 @@ def _staff_grading(tab, user, course, active_page):
if
has_access
(
user
,
course
,
'staff'
):
link
=
reverse
(
'staff_grading'
,
args
=
[
course
.
id
])
tab_name
=
"Staff grading"
pending_grading
,
img_path
=
open_ended_notifications
.
staff_grading_notifications
(
course
)
notifications
=
open_ended_notifications
.
staff_grading_notifications
(
course
)
pending_grading
=
notifications
[
'pending_grading'
]
img_path
=
notifications
[
'img_path'
]
tab
=
[
CourseTab
(
tab_name
,
link
,
active_page
==
"staff_grading"
,
pending_grading
,
img_path
)]
return
tab
...
...
@@ -118,7 +121,10 @@ def _peer_grading(tab, user, course, active_page):
if
user
.
is_authenticated
():
link
=
reverse
(
'peer_grading'
,
args
=
[
course
.
id
])
tab_name
=
"Peer grading"
pending_grading
,
img_path
=
open_ended_notifications
.
peer_grading_notifications
(
course
,
user
)
notifications
=
open_ended_notifications
.
peer_grading_notifications
(
course
,
user
)
pending_grading
=
notifications
[
'pending_grading'
]
img_path
=
notifications
[
'img_path'
]
tab
=
[
CourseTab
(
tab_name
,
link
,
active_page
==
"peer_grading"
,
pending_grading
,
img_path
)]
return
tab
...
...
@@ -128,8 +134,10 @@ def _combined_open_ended_grading(tab, user, course, active_page):
if
user
.
is_authenticated
:
link
=
reverse
(
'open_ended_problems'
,
args
=
[
course
.
id
])
tab_name
=
"Open Ended Questions"
pending_grading
,
img_path
=
open_ended_notifications
.
combined_notifications
(
course
,
user
)
notifications
=
open_ended_notifications
.
combined_notifications
(
course
,
user
)
pending_grading
=
notifications
[
'pending_grading'
]
img_path
=
notifications
[
'img_path'
]
tab
=
[
CourseTab
(
tab_name
,
link
,
active_page
==
"controller_query"
,
pending_grading
,
img_path
)]
return
tab
...
...
lms/djangoapps/open_ended_grading/open_ended_notifications.py
View file @
4112f8ad
...
...
@@ -23,7 +23,7 @@ def staff_grading_notifications(course):
if
pending_grading
:
img_path
=
"/static/images/slider-handle.png"
return
pending_grading
,
img_path
return
{
'pending_grading'
:
pending_grading
,
'img_path'
:
img_path
,
'response'
:
notifications
}
def
peer_grading_notifications
(
course
,
user
):
peer_gs
=
PeerGradingService
(
settings
.
PEER_GRADING_INTERFACE
)
...
...
@@ -41,7 +41,7 @@ def peer_grading_notifications(course, user):
if
pending_grading
:
img_path
=
"/static/images/slider-handle.png"
return
pending_grading
,
img_path
return
{
'pending_grading'
:
pending_grading
,
'img_path'
:
img_path
,
'response'
:
notifications
}
def
combined_notifications
(
course
,
user
):
controller_url
=
open_ended_util
.
get_controller_url
()
...
...
@@ -69,4 +69,4 @@ def combined_notifications(course, user):
if
pending_grading
:
img_path
=
"/static/images/slider-handle.png"
return
pending_grading
,
img_path
\ No newline at end of file
return
{
'pending_grading'
:
pending_grading
,
'img_path'
:
img_path
,
'response'
:
notifications
}
\ No newline at end of file
lms/djangoapps/open_ended_grading/views.py
View file @
4112f8ad
...
...
@@ -20,6 +20,7 @@ from .staff_grading import StaffGrading
from
student.models
import
unique_id_for_user
import
open_ended_util
import
open_ended_notifications
log
=
logging
.
getLogger
(
__name__
)
...
...
@@ -163,6 +164,7 @@ def student_problem_list(request, course_id):
'staff_access'
:
False
,
})
def
combined_notifications
(
request
,
course_id
):
pass
user
=
request
.
user
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