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

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 20 Apr 2006 19:07:11 -0000


albertel		Thu Apr 20 15:07:11 2006 EDT

  Modified files:              
    /loncom/homework	structuretags.pm 
  Log:
  - was not correct enc urls in the checkout/timer start screens
  
  
Index: loncom/homework/structuretags.pm
diff -u loncom/homework/structuretags.pm:1.351 loncom/homework/structuretags.pm:1.352
--- loncom/homework/structuretags.pm:1.351	Wed Apr 19 23:35:06 2006
+++ loncom/homework/structuretags.pm	Thu Apr 20 15:07:09 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # definition of tags that give a structure to a document
 #
-# $Id: structuretags.pm,v 1.351 2006/04/20 03:35:06 albertel Exp $
+# $Id: structuretags.pm,v 1.352 2006/04/20 19:07:09 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -440,13 +440,14 @@
                 'warning'=>'Checking out resources is subject to course policies, and may exclude future credit even if done erroneously.',
                 'checkout'=>'Check out Exam for Viewing',
 		'checkout?'=>'Check out Exam?');
+    my $uri = &Apache::lonenc::check_encrypt($env{'request.uri'});
     return (<<ENDCHECKOUT);
 <h2>$lt{'resource'}</h2>
     <p>$lt{'id_expln'}</p>
 <font color="red">
 <p>$lt{'warning'}</p>
 </font>
-<form name="checkout" method="POST" action="$env{'request.uri'}">
+<form name="checkout" method="POST" action="$uri">
 <input type="hidden" name="doescheckout" value="yes" />
 <input type="button" name="checkoutbutton" value="$lt{'checkout'}" onClick="javascript:if (confirm('$lt{'checkout?'}')) { document.checkout.submit(); }" />
 </form>
@@ -458,9 +459,10 @@
     my ($map)=&Apache::lonnet::decode_symb($symb);
     my $foldertitle=&Apache::lonnet::gettitle($map);
     &Apache::lonxml::debug("map is $map title is $foldertitle");
+    my $uri = &Apache::lonenc::check_encrypt($env{'request.uri'});
     return (<<ENDCHECKOUT);
 <h2>The resources in "$foldertitle" are open for a limited time. Once you click the 'Show Resource' button below you have $time to complete all resources "$foldertitle".</h2>
-<form name="markaccess" method="POST" action="$env{'request.uri'}">
+<form name="markaccess" method="POST" action="$uri">
 <input type="hidden" name="markaccess" value="yes" />
 <input type="button" name="accessbutton" value="Show Resource" onClick="javascript:if (confirm('Start Timer?')) { document.markaccess.submit(); }" />
 </form>