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
6b7ba379
Commit
6b7ba379
authored
Jan 22, 2013
by
Vik Paruchuri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Combined notification view
parent
22a2bdaa
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
4 deletions
+35
-4
lms/djangoapps/open_ended_grading/open_ended_notifications.py
+6
-0
lms/djangoapps/open_ended_grading/views.py
+26
-1
lms/templates/open_ended_problems/combined_notifications.html
+3
-3
No files found.
lms/djangoapps/open_ended_grading/open_ended_notifications.py
View file @
6b7ba379
...
...
@@ -7,6 +7,12 @@ from student.models import unique_id_for_user
import
open_ended_util
from
courseware.models
import
StudentModule
NOTIFICATION_TYPES
=
(
(
'student_needs_to_peer_grade'
,
'peer_grading'
,
'Peer Grading'
),
(
'staff_needs_to_grade'
,
'staff_grading'
,
'Staff Grading'
),
(
'overall_need_to_check'
,
'open_ended_problems'
,
'Problems you have submitted'
)
)
def
staff_grading_notifications
(
course_id
):
staff_gs
=
StaffGradingService
(
settings
.
STAFF_GRADING_INTERFACE
)
pending_grading
=
False
...
...
lms/djangoapps/open_ended_grading/views.py
View file @
6b7ba379
...
...
@@ -168,6 +168,31 @@ def combined_notifications(request, course_id):
user
=
request
.
user
notifications
=
open_ended_notifications
.
combined_notifications
(
course_id
,
user
)
response
=
notifications
[
'response'
]
notificaton_tuples
=
open_ended_notifications
.
NOTIFICATION_TYPES
notification_list
=
[]
for
response_num
in
xrange
(
0
,
len
(
notification_tuples
)):
tag
=
notification_tuples
[
response_num
][
0
]
if
tag
in
response
:
url_name
=
notification_tuples
[
response_num
][
1
]
human_name
=
notification_tuples
[
response_num
][
2
]
url
=
_reverse_with_slash
(
url_name
,
course_id
)
has_img
=
response
[
tag
]
img_path
=
"/static/images/slider-handle.png"
notification_item
=
{
'url'
:
url
,
'name'
:
human_name
,
'has_img'
:
has_img
,
'img'
:
img_path
,
}
notification_list
.
append
(
notification_item
)
combined_dict
=
{
'error_text'
:
""
,
'notification_list'
:
notification_list
,
}
return
combined_dict
lms/templates/open_ended_problems/combined_notifications.html
View file @
6b7ba379
...
...
@@ -18,7 +18,7 @@
<h2>
Instructions
</h2>
<p>
Here are items that could potentially need your attention.
</p>
% if success:
% if len(
item
_list) == 0:
% if len(
notification
_list) == 0:
<div
class=
"message-container"
>
No items require attention at the moment.
</div>
...
...
@@ -28,8 +28,8 @@
<li>
<a
href=
"${notification['url']}"
>
{notification['name']}
% if notification
.has_img
== True:
<img
src=
"${notification
.img
}"
/>
% if notification
['has_img']
== True:
<img
src=
"${notification
['img']
}"
/>
%endif
</a>
</li>
...
...
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