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

raeburn raeburn at source.lon-capa.org
Sat Mar 29 21:10:00 EDT 2025


raeburn		Sun Mar 30 01:10:00 2025 EDT

  Modified files:              
    /loncom/homework	structuretags.pm 
  Log:
  - Satisfy w3c xhtml validation. Omit </form> tag added by &end_problem() if
    $form_tag_start not included in prior output from &start_problem().
  
  
Index: loncom/homework/structuretags.pm
diff -u loncom/homework/structuretags.pm:1.590 loncom/homework/structuretags.pm:1.591
--- loncom/homework/structuretags.pm:1.590	Sat Mar  1 17:20:14 2025
+++ loncom/homework/structuretags.pm	Sun Mar 30 01:09:59 2025
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # definition of tags that give a structure to a document
 #
-# $Id: structuretags.pm,v 1.590 2025/03/01 17:20:14 raeburn Exp $
+# $Id: structuretags.pm,v 1.591 2025/03/30 01:09:59 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2294,8 +2294,21 @@
 	   ) {
 	    if (($target ne 'tex') &&
 		($env{'form.answer_output_mode'} ne 'tex') && 
-                (!$env{'form.grade_imsexport'})) {
-		$result.="</form>";
+		(!$env{'form.grade_imsexport'})) {
+		unless (($target eq 'web') && (( $status eq 'CLOSED' ) ||
+					       ( $status eq 'UNCHECKEDOUT') ||
+					       ( $status eq 'NOT_YET_VIEWED') ||
+					       ( $status eq 'BANNED') ||
+					       ( $status eq 'UNAVAILABLE') ||
+					       ( $status eq 'NOT_IN_A_SLOT') ||
+					       ( $status eq 'NOTRESERVABLE') ||
+					       ( $status eq 'RESERVABLE') ||
+					       ( $status eq 'RESERVABLE_LATER') ||
+					       ( $status eq 'INVALID_ACCESS') ||
+					       ( $status eq 'NEED_DIFFERENT_IP') ||
+					       ( $status eq 'NEEDS_CHECKIN'))) {
+		    $result.='</form>';
+		}
 	    }
 	    if ($target eq 'web') {
                 #




More information about the LON-CAPA-cvs mailing list