diff --git a/lms/templates/imageannotation.html b/lms/templates/imageannotation.html
index 259e3120f9..06e4964a30 100644
--- a/lms/templates/imageannotation.html
+++ b/lms/templates/imageannotation.html
@@ -221,11 +221,17 @@
if ("${annotation_mode}" == "instructor" && "${instructor_email}" == "" && !is_staff)
osda.annotator.destroy();
}
+
+ // if the following is true, template is being rendered in LMS, otherwise it is in Studio
if (typeof Annotator !== 'undefined') {
startosda();
} else {
- require(["osda"], function(osda){
- startosda();
- });
+ try {
+ require(["osda"], function(osda){
+ startosda();
+ });
+ } catch(error) {
+ console.log("Error: " + error.message + " - Annotator not loaded in LMS.");
+ }
}
\ No newline at end of file
diff --git a/lms/templates/textannotation.html b/lms/templates/textannotation.html
index 8b094108da..edc51a327f 100644
--- a/lms/templates/textannotation.html
+++ b/lms/templates/textannotation.html
@@ -204,11 +204,16 @@ ${static.css(group='style-xmodule-annotations', raw=True)}
Catch = new CatchAnnotation($('#catchDIV'),catchOptions);
}
+ // if the following is true, template is being rendered in LMS, otherwise it is in Studio
if (typeof Annotator !== 'undefined') {
startova();
} else {
- require(["ova"], function(ova){
- startova();
- });
+ try {
+ require(["ova"], function(ova) {
+ startova();
+ });
+ } catch(error) {
+ console.log("Error: " + error.message + " - Annotator not loaded in LMS.");
+ }
}
diff --git a/lms/templates/videoannotation.html b/lms/templates/videoannotation.html
index 443cf8965c..bbeed57e08 100644
--- a/lms/templates/videoannotation.html
+++ b/lms/templates/videoannotation.html
@@ -201,8 +201,12 @@ ${static.css(group='style-xmodule-annotations', raw=True)}
if (typeof Annotator !== 'undefined') {
startova();
} else {
- require(["ova"], function(ova){
- startova();
- });
+ try {
+ require(["ova"], function(ova) {
+ startova();
+ });
+ } catch(error) {
+ console.log("Error: " + error.message + " - Annotator not loaded in LMS.");
+ }
}