--- loncom/homework/grades.pm 2015/03/18 12:53:24 1.735 +++ loncom/homework/grades.pm 2015/06/09 21:22:48 1.736 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Grading handler # -# $Id: grades.pm,v 1.735 2015/03/18 12:53:24 raeburn Exp $ +# $Id: grades.pm,v 1.736 2015/06/09 21:22:48 damieng Exp $ # # Copyright Michigan State University Board of Trustees # @@ -857,10 +857,11 @@ sub listStudents { my $res_error; my ($partlist,$handgrade,$responseType) = &response_type($symb,\$res_error); - my %lt = &Apache::lonlocal::texthash ( + my %js_lt = &Apache::lonlocal::texthash ( 'multiple' => 'Please select a student or group of students before clicking on the Next button.', 'single' => 'Please select the student before clicking on the Next button.', ); + &js_escape(\%js_lt); $request->print(&Apache::lonhtmlcommon::scripttag(< 'Please select a word or group of words from document and then click this link.', adds => 'Add selection to keyword list? Edit if desired.', + col1 => 'red', + col2 => 'green', + col3 => 'blue', + siz1 => 'normal', + siz2 => '+1', + siz3 => '+2', + sty1 => 'normal', + sty2 => 'italic', + sty3 => 'bold', + ); + my %html_js_lt = &Apache::lonlocal::texthash( comp => 'Compose Message for: ', incl => 'Include', type => 'Type', @@ -1438,21 +1451,15 @@ INNERJS txtc => 'Text Color', font => 'Font Size', fnst => 'Font Style', - col1 => 'red', - col2 => 'green', - col3 => 'blue', - siz1 => 'normal', - siz2 => '+1', - siz3 => '+2', - sty1 => 'normal', - sty2 => 'italic', - sty3 => 'bold', ); + &js_escape(\%js_lt); + &html_escape(\%html_js_lt); + &js_escape(\%html_js_lt); $request->print(&Apache::lonhtmlcommon::scripttag(<"); pDoc.write(""); - pDoc.write("

 $lt{'comp'}\"+fullname+\"<\\/h1>"); + pDoc.write("

 $html_js_lt{'comp'}\"+fullname+\"<\\/h1>"); pDoc.write(''); - pDoc.write(""); pDoc.write(""); pDoc.write("
$lt{'incl'}<\\/b><\\/td>$lt{'type'}<\\/b><\\/td>$lt{'mesa'}<\\/td><\\/tr>"); + pDoc.write("$html_js_lt{'incl'}<\\/b><\\/td>$html_js_lt{'type'}<\\/b><\\/td>$html_js_lt{'mesa'}<\\/td><\\/tr>"); } function displaySubject(msg,shwsel) { pDoc = pWin.document; pDoc.write("
<\\/td>"); - pDoc.write("$lt{'subj'}<\\/td>"); + pDoc.write("$html_js_lt{'subj'}<\\/td>"); pDoc.write("<\\/td><\\/tr>"); } @@ -1587,7 +1594,7 @@ INNERJS pDoc = pWin.document; pDoc.write("
<\\/td>"); - pDoc.write("$lt{'new'}<\\/td>"); + pDoc.write("$html_js_lt{'new'}<\\/td>"); pDoc.write("