[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /homework structuretags.pm

raeburn raeburn at source.lon-capa.org
Sun Sep 27 20:46:06 EDT 2020


raeburn		Mon Sep 28 00:46:06 2020 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/homework	structuretags.pm 
  Log:
  - For 2.11
    Backport 1.571
  
  
Index: loncom/homework/structuretags.pm
diff -u loncom/homework/structuretags.pm:1.512.2.23 loncom/homework/structuretags.pm:1.512.2.24
--- loncom/homework/structuretags.pm:1.512.2.23	Thu Nov  7 13:59:19 2019
+++ loncom/homework/structuretags.pm	Mon Sep 28 00:46:06 2020
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # definition of tags that give a structure to a document
 #
-# $Id: structuretags.pm,v 1.512.2.23 2019/11/07 13:59:19 raeburn Exp $
+# $Id: structuretags.pm,v 1.512.2.24 2020/09/28 00:46:06 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -63,6 +63,7 @@
 use Apache::lonenc();
 use Apache::loncommon();
 use Time::HiRes qw( gettimeofday tv_interval );
+use HTML::Entities();
 use lib '/home/httpd/lib/perl/';
 use LONCAPA;
  
@@ -1388,9 +1389,11 @@
     my $uri = &Apache::lonenc::check_encrypt($env{'request.uri'});
     my $buttontext = &mt('Show Resource');
     my $timertext = &mt('Start Timer?');
+    my $shownsymb = &HTML::Entities::encode(&Apache::lonenc::check_encrypt($symb),'\'"<>&');
     $result .= (<<ENDCHECKOUT);
 <form name="markaccess" method="post" action="$uri">
 <input type="hidden" name="markaccess" value="yes" />
+<input type="hidden" name="symb" value="$shownsymb" />
 <input type="button" name="accessbutton" value="$buttontext" onclick="javascript:if (confirm('$timertext')) { document.markaccess.submit(); }" />
 </form>
 ENDCHECKOUT




More information about the LON-CAPA-cvs mailing list