Commit 02d58a7c by ichuang

display course load error messages on modulestore reload by instructor

parent b0397ab0
...@@ -107,6 +107,11 @@ def instructor_dashboard(request, course_id): ...@@ -107,6 +107,11 @@ def instructor_dashboard(request, course_id):
modulestore().try_load_course(data_dir) modulestore().try_load_course(data_dir)
msg += "<br/><p>Course reloaded from %s</p>" % data_dir msg += "<br/><p>Course reloaded from %s</p>" % data_dir
track.views.server_track(request, 'reload %s' % data_dir, {}, page='idashboard') track.views.server_track(request, 'reload %s' % data_dir, {}, page='idashboard')
course_errors = modulestore().get_item_errors(course.location)
msg += '<ul>'
for cmsg, cerr in course_errors:
msg += "<li>%s: <pre>%s</pre>" % (cmsg,escape(cerr))
msg += '</ul>'
except Exception as err: except Exception as err:
msg += '<br/><p>Error: %s</p>' % escape(err) msg += '<br/><p>Error: %s</p>' % escape(err)
......
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