Grade a student even if they are on the restricted list
This commit is contained in:
@@ -164,31 +164,29 @@ class XQueueCertInterface(object):
|
||||
|
||||
if is_whitelisted or grade['grade'] is not None:
|
||||
|
||||
# check to see whether the student is on the
|
||||
# the embargoed country restricted list
|
||||
if self.restricted.filter(user=student).exists():
|
||||
cert.status = status.restricted
|
||||
cert.save()
|
||||
return cert.status
|
||||
|
||||
cert_status = status.generating
|
||||
key = make_hashkey(random.random())
|
||||
|
||||
cert.status = cert_status
|
||||
cert.grade = grade['percent']
|
||||
cert.user = student
|
||||
cert.course_id = course_id
|
||||
cert.key = key
|
||||
cert.name = profile.name
|
||||
|
||||
contents = {
|
||||
'action': 'create',
|
||||
'username': student.username,
|
||||
'course_id': course_id,
|
||||
'name': profile.name,
|
||||
}
|
||||
|
||||
self._send_to_xqueue(contents, key)
|
||||
# check to see whether the student is on the
|
||||
# the embargoed country restricted list
|
||||
# otherwise, put a new certificate request
|
||||
# on the queue
|
||||
if self.restricted.filter(user=student).exists():
|
||||
cert.status = status.restricted
|
||||
else:
|
||||
contents = {
|
||||
'action': 'create',
|
||||
'username': student.username,
|
||||
'course_id': course_id,
|
||||
'name': profile.name,
|
||||
}
|
||||
cert.status = status.generating
|
||||
self._send_to_xqueue(contents, key)
|
||||
cert.save()
|
||||
else:
|
||||
cert_status = status.notpassing
|
||||
|
||||
@@ -273,7 +273,7 @@
|
||||
% if cert_status['status'] == 'processing':
|
||||
<p class="message-copy">Final course details are being wrapped up at
|
||||
this time. Your final standing will be available shortly.</p>
|
||||
% elif cert_status['status'] in ('generating', 'ready', 'notpassing'):
|
||||
% elif cert_status['status'] in ('generating', 'ready', 'notpassing', 'restricted'):
|
||||
<p class="message-copy">Your final grade:
|
||||
<span class="grade-value">${"{0:.0f}%".format(float(cert_status['grade'])*100)}</span>.
|
||||
% if cert_status['status'] == 'notpassing':
|
||||
|
||||
Reference in New Issue
Block a user