Commit 486753a2 by Diana Huang Committed by Vik Paruchuri

Display alerts from notifications on the panel.

parent 9f19eafc
...@@ -195,9 +195,14 @@ def combined_notifications(request, course_id): ...@@ -195,9 +195,14 @@ def combined_notifications(request, course_id):
notification_list = [] notification_list = []
description_dict = { description_dict = {
'Peer Grading': "View all problems that require peer assessment in this particular course.", 'Peer Grading': "View all problems that require peer assessment in this particular course.",
'Staff Grading': "View ungraded submissions submitted by your students for the open ended problems in the course.", 'Staff Grading': "View ungraded submissions submitted by students for the open ended problems in the course.",
'Problems you have submitted': "View open ended problems that you have previously submitted for grading." 'Problems you have submitted': "View open ended problems that you have previously submitted for grading."
} }
alert_dict = {
'Peer Grading': "New submissions to grade",
'Staff Grading': "New submissions to grade",
'Problems you have submitted': "New grades have been returned"
}
for response_num in xrange(0,len(notification_tuples)): for response_num in xrange(0,len(notification_tuples)):
tag=notification_tuples[response_num][0] tag=notification_tuples[response_num][0]
if tag in response: if tag in response:
...@@ -210,7 +215,8 @@ def combined_notifications(request, course_id): ...@@ -210,7 +215,8 @@ def combined_notifications(request, course_id):
'url' : url, 'url' : url,
'name' : human_name, 'name' : human_name,
'alert' : has_img, 'alert' : has_img,
'description': description_dict[human_name] 'description': description_dict[human_name],
'alert_message': alert_dict[human_name]
} }
notification_list.append(notification_item) notification_list.append(notification_item)
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
table-layout: auto; table-layout: auto;
margin-top: 10px; margin-top: 10px;
width:70%; width:70%;
text-align: center;
td, th td, th
{ {
padding: 7px; padding: 7px;
...@@ -18,10 +17,6 @@ ...@@ -18,10 +17,6 @@
margin: 30px 0px; margin: 30px 0px;
} }
.alert
{
background-color: red;
}
.notification .notification
{ {
margin: 10px; margin: 10px;
...@@ -31,24 +26,39 @@ ...@@ -31,24 +26,39 @@
.notification-link .notification-link
{ {
display:block; display:block;
height: 8em; height: 9em;
padding: 10px; padding: 10px;
border: 1px solid black; border: 1px solid black;
text-align: center; text-align: center;
p
{
font-size: .9em;
text-align: center;
}
} }
.notification-title .notification-title
{ {
text-transform: uppercase; text-transform: uppercase;
background: #1d9dd9;
color: white;
padding: 5px 0px;
font-size: 1.1em;
} }
.notification-link:hover .notification-link:hover
{ {
background-color: #eee; background-color: #eee;
color: black;
} }
.notification-description .notification-description
{ {
padding-top:5%; padding-top:5%;
} }
.alert-message
{
img
{
vertical-align: baseline;
}
}
@include clearfix; @include clearfix;
} }
......
...@@ -32,6 +32,9 @@ ...@@ -32,6 +32,9 @@
% endif % endif
<a href="${notification['url']}" class="notification-link"> <a href="${notification['url']}" class="notification-link">
<div class="notification-title">${notification['name']}</div> <div class="notification-title">${notification['name']}</div>
%if notification['alert']:
<p class="alert-message"><img src="/static/images/white-error-icon.png" /> ${notification['alert_message']}</p>
%endif
<div class="notification-description"> <div class="notification-description">
<p>${notification['description']}</p> <p>${notification['description']}</p>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment