Show policy, grading policy, and top-level errors
* Save errors for courses that failed to load in modulestore * global staff can see course errors on their dashboard * put policy loading errors into the error trackers * add has_access(user, 'global', 'staff'), which is equiv to user.is_staff for now
This commit is contained in:
@@ -140,7 +140,19 @@ def dashboard(request):
|
||||
if not user.is_active:
|
||||
message = render_to_string('registration/activate_account_notice.html', {'email': user.email})
|
||||
|
||||
context = {'courses': courses, 'message': message}
|
||||
|
||||
# Global staff can see what courses errored on their dashboard
|
||||
staff_access = False
|
||||
if has_access(user, 'global', 'staff'):
|
||||
# Show any courses that errored on load
|
||||
staff_access = True
|
||||
errored_courses = modulestore().get_errored_courses()
|
||||
|
||||
context = {'courses': courses,
|
||||
'message': message,
|
||||
'staff_access': staff_access,
|
||||
'errored_courses': errored_courses,}
|
||||
|
||||
return render_to_response('dashboard.html', context)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user