Annotation Tools: Adding Try-Catch for anonyous_student_id issue in staging

- changed message and added i18n
This commit is contained in:
lduarte1991
2014-09-17 12:52:49 -04:00
parent 3943bbd7e9
commit bb4cfaba03
3 changed files with 14 additions and 5 deletions

View File

@@ -107,7 +107,10 @@ class VideoAnnotationModule(AnnotatableFields, XModule):
if self.runtime.get_user_role() in ['instructor', 'staff']:
self.is_course_staff = True
if self.runtime.get_real_user is not None:
self.user_email = self.runtime.get_real_user(self.runtime.anonymous_student_id).email
try:
self.user_email = self.runtime.get_real_user(self.runtime.anonymous_student_id).email
except: # pylint: disable=broad-except
self.user_email = _("No email address found.")
def _extract_instructions(self, xmltree):
""" Removes <instructions> from the xmltree and returns them as a string, otherwise None. """