From 486753a2636568f24b029941e729b20656a130dc Mon Sep 17 00:00:00 2001 From: Diana Huang Date: Wed, 23 Jan 2013 15:41:18 -0500 Subject: [PATCH] Display alerts from notifications on the panel. --- lms/djangoapps/open_ended_grading/views.py | 10 +++++-- .../sass/course/_open_ended_grading.scss | 26 +++++++++++++------ .../combined_notifications.html | 3 +++ 3 files changed, 29 insertions(+), 10 deletions(-) diff --git a/lms/djangoapps/open_ended_grading/views.py b/lms/djangoapps/open_ended_grading/views.py index 2269ff0bac..41a3c6d9ba 100644 --- a/lms/djangoapps/open_ended_grading/views.py +++ b/lms/djangoapps/open_ended_grading/views.py @@ -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) diff --git a/lms/static/sass/course/_open_ended_grading.scss b/lms/static/sass/course/_open_ended_grading.scss index b7a28cbe0c..b526d1adf2 100644 --- a/lms/static/sass/course/_open_ended_grading.scss +++ b/lms/static/sass/course/_open_ended_grading.scss @@ -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; } diff --git a/lms/templates/open_ended_problems/combined_notifications.html b/lms/templates/open_ended_problems/combined_notifications.html index f8267d9704..a24d150d25 100644 --- a/lms/templates/open_ended_problems/combined_notifications.html +++ b/lms/templates/open_ended_problems/combined_notifications.html @@ -32,6 +32,9 @@ % endif
${notification['name']}
+ %if notification['alert']: +

${notification['alert_message']}

+ %endif

${notification['description']}