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

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 02 Mar 2006 22:23:31 -0000


albertel		Thu Mar  2 17:23:31 2006 EDT

  Modified files:              
    /loncom/homework	bridgetask.pm 
  Log:
  - adding a wrapper <div> to the whole task
  - missed a LC_GRADE class
  
  
Index: loncom/homework/bridgetask.pm
diff -u loncom/homework/bridgetask.pm:1.116 loncom/homework/bridgetask.pm:1.117
--- loncom/homework/bridgetask.pm:1.116	Thu Mar  2 17:06:27 2006
+++ loncom/homework/bridgetask.pm	Thu Mar  2 17:23:31 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # definition of tags that give a structure to a document
 #
-# $Id: bridgetask.pm,v 1.116 2006/03/02 22:06:27 albertel Exp $
+# $Id: bridgetask.pm,v 1.117 2006/03/02 22:23:31 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -418,6 +418,7 @@
     my ($result,$head_tag_start,$body_tag_start,$form_tag_start)=
 	&Apache::structuretags::page_start($target,$token,$tagstack,$parstack,$parser,$safeeval);
     
+    $body_tag_start = '<div class="LC_task">'."\n";
     if ($target eq 'web' && $env{'request.state'} ne 'construct') {
 	if ($Apache::lonhomework::modifygrades) {
 	    $body_tag_start.='<form name="gradesubmission" method="post" action="';
@@ -870,8 +871,8 @@
 		    $result=~s/\Q$internal_location\E/$status/;
 		}
 	    } 
-	    if ($target eq 'web' || $target eq 'webgrade') {
-		$result.=&Apache::lonxml::xmlend().'</html>';
+	    if ($target eq 'web') {
+		$result.="\n</div>\n".&Apache::lonxml::xmlend().'</html>';
 	    }
 	}
 	if ($target eq 'grade' && !$env{'form.webgrade'} && !$previous) {
@@ -1010,7 +1011,8 @@
 	#    &mt('Throw Away &amp; Stop Grading').'" /> ';
 	#$result.='<input type="submit" name="save" value="'.
 	#    &mt('Save Partial Grade and Continue Grading').'" /> ';
-	$result.='</form>'.&Apache::loncommon::endbodytag().'</html>';
+	$result.='</form>'."\n</div>\n".
+	    &Apache::loncommon::endbodytag().'</html>';
     } elsif ($target eq 'meta') {
 	$result.=&Apache::response::meta_package_write('Task');
         $result.=&Apache::response::meta_stores_write('solved','string',
@@ -1883,7 +1885,7 @@
 	}
     }
     if ($result) {
-	return '<ul class="LC_pastgrading">'.$result.'</ul>';
+	return '<ul class="LC_GRADE_pastgrading">'.$result.'</ul>';
     }
     return '';
 }