Display alerts from notifications on the panel.
This commit is contained in:
committed by
Vik Paruchuri
parent
9f19eafcf0
commit
486753a263
@@ -195,9 +195,14 @@ def combined_notifications(request, course_id):
|
||||
notification_list = []
|
||||
description_dict = {
|
||||
'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."
|
||||
}
|
||||
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)):
|
||||
tag=notification_tuples[response_num][0]
|
||||
if tag in response:
|
||||
@@ -210,7 +215,8 @@ def combined_notifications(request, course_id):
|
||||
'url' : url,
|
||||
'name' : human_name,
|
||||
'alert' : has_img,
|
||||
'description': description_dict[human_name]
|
||||
'description': description_dict[human_name],
|
||||
'alert_message': alert_dict[human_name]
|
||||
}
|
||||
notification_list.append(notification_item)
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
table-layout: auto;
|
||||
margin-top: 10px;
|
||||
width:70%;
|
||||
text-align: center;
|
||||
td, th
|
||||
{
|
||||
padding: 7px;
|
||||
@@ -18,10 +17,6 @@
|
||||
margin: 30px 0px;
|
||||
}
|
||||
|
||||
.alert
|
||||
{
|
||||
background-color: red;
|
||||
}
|
||||
.notification
|
||||
{
|
||||
margin: 10px;
|
||||
@@ -31,24 +26,39 @@
|
||||
.notification-link
|
||||
{
|
||||
display:block;
|
||||
height: 8em;
|
||||
height: 9em;
|
||||
padding: 10px;
|
||||
border: 1px solid black;
|
||||
text-align: center;
|
||||
p
|
||||
{
|
||||
font-size: .9em;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
.notification-title
|
||||
.notification-title
|
||||
{
|
||||
text-transform: uppercase;
|
||||
background: #1d9dd9;
|
||||
color: white;
|
||||
padding: 5px 0px;
|
||||
font-size: 1.1em;
|
||||
}
|
||||
.notification-link:hover
|
||||
{
|
||||
background-color: #eee;
|
||||
color: black;
|
||||
}
|
||||
.notification-description
|
||||
{
|
||||
padding-top:5%;
|
||||
}
|
||||
.alert-message
|
||||
{
|
||||
img
|
||||
{
|
||||
vertical-align: baseline;
|
||||
}
|
||||
}
|
||||
@include clearfix;
|
||||
}
|
||||
|
||||
|
||||
@@ -32,6 +32,9 @@
|
||||
% endif
|
||||
<a href="${notification['url']}" class="notification-link">
|
||||
<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">
|
||||
<p>${notification['description']}</p>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user