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

albertel lon-capa-cvs@mail.lon-capa.org
Wed, 26 Nov 2003 19:35:28 -0000


albertel		Wed Nov 26 14:35:28 2003 EDT

  Modified files:              
    /loncom/homework	structuretags.pm 
  Log:
  - removing the removal of the <form>
  
  
Index: loncom/homework/structuretags.pm
diff -u loncom/homework/structuretags.pm:1.226 loncom/homework/structuretags.pm:1.227
--- loncom/homework/structuretags.pm:1.226	Fri Nov 21 15:21:20 2003
+++ loncom/homework/structuretags.pm	Wed Nov 26 14:35:28 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # definition of tags that give a structure to a document
 #
-# $Id: structuretags.pm,v 1.226 2003/11/21 20:21:20 albertel Exp $
+# $Id: structuretags.pm,v 1.227 2003/11/26 19:35:28 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -429,26 +429,19 @@
 	    }
 	} elsif ($target eq 'web') {
 	    my $name= &get_resource_name($parstack,$safeeval);
-	    if ($status eq 'CAN_ANSWER') {
-		# create a page header and exit
-		$result.="$head_tag_start<title>$name</title></head>
+	    $result.="$head_tag_start<title>$name</title></head>
               $body_tag_start \n $form_tag_start".	
-		  '<input type="hidden" name="submitted" value="yes" />';
-		if ($ENV{'request.state'} eq "construct") {
-		    $result.= &problem_web_to_edit_header($ENV{'form.rndseed'});
-		}
-		# if we are viewing someone else preserve that info
-		if (defined $ENV{'form.grade_symb'}) {
-		    foreach my $field ('symb','courseid','domain','username') {
-			$result .= '<input type="hidden" name="grade_'.$field.
-			    '" value="'.$ENV{"form.grade_$field"}.'" />'."\n";
-		    }
+	      '<input type="hidden" name="submitted" value="yes" />';
+	    # create a page header and exit
+	    if ($ENV{'request.state'} eq "construct") {
+		$result.= &problem_web_to_edit_header($ENV{'form.rndseed'});
+	    }
+	    # if we are viewing someone else preserve that info
+	    if (defined $ENV{'form.grade_symb'}) {
+		foreach my $field ('symb','courseid','domain','username') {
+		    $result .= '<input type="hidden" name="grade_'.$field.
+			'" value="'.$ENV{"form.grade_$field"}.'" />'."\n";
 		}
-	    } elsif ($status eq 'SHOW_ANSWER' || $status eq 'CANNOT_ANSWER'
-		     || $status eq 'CLOSED' || $status eq 'UNAVALAILABLE' ||
-		     $status eq 'INVALID_ACCESS') {
-		$result.=$head_tag_start.
-		    "<title>$name</title></head>\n$body_tag_start\n";
 	    }
 	} elsif ($target eq 'tex') {
 	    my $startminipage = '';
@@ -539,17 +532,9 @@
 	    (($target eq 'web') && ($ENV{'request.state'} ne 'construct')) ||
 	    ($target eq 'answer') || ($target eq 'tex')
 	   ) {
-	    if ($status eq 'CAN_ANSWER') {
-		if ($target ne 'tex' &&
-		    $ENV{'form.answer_output_mode'} ne 'tex') {
-		    $result.="</form></body>\n";
-		}
-	    } elsif ($status eq 'SHOW_ANSWER' || $status eq 'CANNOT_ANSWER' ||
-		    $status eq 'UNCHECKEDOUT' || $status eq 'INVALID_ACCESS') {
-		if ($target ne 'tex' &&
-		    $ENV{'form.answer_output_mode'} ne 'tex') {
-		    $result.="</body>\n";
-		}
+	    if ($target ne 'tex' &&
+		$ENV{'form.answer_output_mode'} ne 'tex') {
+		$result.="</form></body>\n";
 	    }
 	    if ($target eq 'web') {
 		$result.=&Apache::lonxml::xmlend();