--- loncom/homework/grades.pm 2020/08/26 18:13:40 1.771 +++ loncom/homework/grades.pm 2020/08/29 16:39:00 1.772 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Grading handler # -# $Id: grades.pm,v 1.771 2020/08/26 18:13:40 raeburn Exp $ +# $Id: grades.pm,v 1.772 2020/08/29 16:39:00 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1589,6 +1589,9 @@ INNERJS if (document.getSelection) txt = document.getSelection(); else if (document.selection) txt = document.selection.createRange().text; else return; + if (typeof(txt) != 'string') { + txt = String(txt); + } var cleantxt = txt.replace(new RegExp('([\\f\\n\\r\\t\\v ])+', 'g')," "); if (cleantxt=="") { alert("$js_lt{'plse'}");