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

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


albertel		Thu Mar  2 17:06:27 2006 EDT

  Modified files:              
    /loncom/homework	bridgetask.pm 
  Log:
  - adding LC_ and LC_GRADE_ to class elements
  
  
Index: loncom/homework/bridgetask.pm
diff -u loncom/homework/bridgetask.pm:1.115 loncom/homework/bridgetask.pm:1.116
--- loncom/homework/bridgetask.pm:1.115	Thu Mar  2 16:20:30 2006
+++ loncom/homework/bridgetask.pm	Thu Mar  2 17:06:27 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.115 2006/03/02 21:20:30 albertel Exp $
+# $Id: bridgetask.pm,v 1.116 2006/03/02 22:06:27 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -260,7 +260,7 @@
 sub style {
     return (<<STYLE);
 <style type="text/css">
-.fail, .pass, .neutral {
+.LC_fail, .LC_pass, .LC_neutral {
     position: relative;
     margin : 5px;
     margin-bottom :10px;
@@ -273,7 +273,7 @@
     background-color : rgb(255,240,225);
 }
 
-.fail h4, .pass h4 {
+.LC_fail h4, .LC_pass h4 {
 	position:absolute;
 	left: -4px;
 	top: -8px;
@@ -283,25 +283,25 @@
 	border : thin solid;
 }
 
-.fail {
+.LC_fail {
 	color: red;
 }
 
-.pass {
+.LC_pass {
     color : green;
 }
 
-.neutral {
+.LC_neutral {
 	color : blue;
 }
 
-.question {
+.LC_question {
 	border : thin solid black;
 	padding : 4px;
 	margin-bottom : 1em;
 }
 
-.grade {
+.LC_grade {
 	font-size: x-large;
 	font-family: Arial;
 	position:absolute;
@@ -375,7 +375,7 @@
     my ($version)=&get_version();
     my (undef,undef,$udom,$uname) = &Apache::lonxml::whichuser();
     my $file_url = '/uploaded/'.$udom.'/'.$uname.'/portfolio/';
-    my $file_list="<ul class=\"handininfo\">\n";
+    my $file_list="<ul class=\"LC_GRADE_handininfo\">\n";
     foreach my $partial_file (split(',',$Apache::lonhomework::history{"resource.$version.0.bridgetask.portfiles"})) {
 	my $file=$file_url.$partial_file;
 	$file=~s|/+|/|g;
@@ -391,7 +391,7 @@
 				       );
 				       
     my $result=<<INFO;
-  <div class="maincontrols">
+  <div class="LC_GRADE_maincontrols">
     <input type="submit" name="next" value="$lt{'done'}" />
     <input type="submit" name="stop" value="$lt{'stop'}" />
   </div>
@@ -620,7 +620,7 @@
 	    if ($webgrade eq 'yes') { $result.=&webgrade_standard_info(); }
 	}
 	if ($target eq 'webgrade') {
-	    $result.="\n".'<div id="criterialist">';
+	    $result.="\n".'<div id="LC_GRADE_criterialist">';
 	}
     } elsif ($target eq 'edit') {
 	$result.=$head_tag_start."</head>".$body_tag_start.$form_tag_start.
@@ -815,7 +815,7 @@
 		    &show_task($status,$previous)) {
 		    $result.=&Apache::inputtags::gradestatus('0');
 		    $result.='</form>';
-		    my $action = &Apache::lonenc::check_encrypted($env{'request.uri'});
+		    my $action = &Apache::lonenc::check_encrypt($env{'request.uri'});
 		    $result.=<<DONEBUTTON;
 <form name="done" method="post" action="$action">
    <input type="hidden" name="donescreen" value="1" />
@@ -834,7 +834,7 @@
 		    my $start_time=
 			&Apache::lonlocal::locallocaltime($slot{'starttime'});
 
-		    my $status = "\n<div class='$bt_status'>\n";
+		    my $status = "\n<div class='LC_$bt_status LC_criteria'>\n";
 		    
 		    if ($bt_status eq 'pass')  {
 			$status.='<h2>You passed the '.$title.' given on '.
@@ -1713,7 +1713,7 @@
 		    if ($Apache::bridgetask::dimensionmandatory{$dim} eq 'N') {
 			$mandatory='Optional';
 		    }
-		    my $dim_info="<div class='$dim_status'>\n";
+		    my $dim_info="<div class='LC_$dim_status LC_question_grade'>\n";
 		    if ($dim_status eq 'pass') {
 			$dim_info.='<h3>Question : you passed this '.$mandatory.' question</h3>';
 		    }
@@ -1763,13 +1763,14 @@
 			my $status_display=$status;
 			$status_display=~s/^([a-z])/uc($1)/e;
 			@Apache::scripttag::parser_env = @_;
-			$result.='<div class="'.$status.'"><h4>'.$mandatory.
-			    ' Criteria</h4><p>';
+			$result.=
+			    '<div class="LC_'.$status.' LC_criteria"><h4>'
+			    .$mandatory.' Criteria</h4><p>';
 			@Apache::scripttag::parser_env = @_;
 			$result.=&Apache::scripttag::xmlparse($dimension{$instance.'.criteria.'.$id});
-			$result.='</p><p class="grade">'.$status_display.'</p>';
+			$result.='</p><p class="LC_grade">'.$status_display.'</p>';
 			if ($Apache::lonhomework::history{"resource.$version.0.$dim.$instance.$id.comment"}) {
-			    $result.='<p class="comment">'.&mt('Comment: [_1]',$Apache::lonhomework::history{"resource.$version.0.$dim.$instance.$id.comment"}).'</p>';
+			    $result.='<p class="LC_comment">'.&mt('Comment: [_1]',$Apache::lonhomework::history{"resource.$version.0.$dim.$instance.$id.comment"}).'</p>';
 			}
 			$result.='</div>';
 		    }
@@ -1782,26 +1783,26 @@
 	    @Apache::scripttag::parser_env = @_;
 	    &Apache::scripttag::xmlparse($dimension{$instance.'.text'});
 	    foreach my $id (@{$dimension{$instance.'.criterias'}}) {
-		my $link='criteria_'.$instance.'_'.$id;
+		my $link='LC_GRADE_criteria_'.$instance.'_'.$id;
 		my $status=$Apache::lonhomework::history{"resource.$version.0.$dim.$instance.$id.status"};
-		$result.='<div class="criteria" id="'.$link.'">'."\n".
+		$result.='<div class="LC_GRADE_criteria" id="'.$link.'">'."\n".
 		    '<a name="'.$link.'" />'."\n".
 		    '<a name="next_'.$last_link.'" />'."\n".
-		    '<div class="criteriatext">'."\n";
+		    '<div class="LC_GRADE_criteriatext">'."\n";
 		@Apache::scripttag::parser_env = @_;
 		$result.=&Apache::scripttag::xmlparse($dimension{$instance.'.criteria.'.$id});
 		$result.='</div>'."\n".
 		    #$dimension{$instance.'.criteria.'.$id}.
-		    '<div class="grade">'."\n".
-		    '<label class="ungraded"><input type="radio" name="HWVAL_'.$link.'" value="ungraded" '.($status eq 'ungraded' || !$status ? 'checked="checked"':'').' />'.&mt('Ungraded').'</label>'."\n".
-		    '<label class="fail"><input type="radio" name="HWVAL_'.$link.'" value="fail" '.($status eq 'fail' ? 'checked="checked"':'').' />'.&mt('Fail').'</label>'."\n".
-		    '<label class="pass"><input type="radio" name="HWVAL_'.$link.'" value="pass" '.($status eq 'pass' ? 'checked="checked"':'').' />'.&mt('Pass').'</label>'."\n".
-		    '<label class="review"><input type="radio" name="HWVAL_'.$link.'" value="review" '.($status eq 'review' ? 'checked="checked"':'').' />'.&mt('Review').'</label>'."\n".
+		    '<div class="LC_GRADE_grade">'."\n".
+		    '<label class="LC_GRADE_ungraded"><input type="radio" name="HWVAL_'.$link.'" value="ungraded" '.($status eq 'ungraded' || !$status ? 'checked="checked"':'').' />'.&mt('Ungraded').'</label>'."\n".
+		    '<label class="LC_GRADE_fail"><input type="radio" name="HWVAL_'.$link.'" value="fail" '.($status eq 'fail' ? 'checked="checked"':'').' />'.&mt('Fail').'</label>'."\n".
+		    '<label class="LC_GRADE_pass"><input type="radio" name="HWVAL_'.$link.'" value="pass" '.($status eq 'pass' ? 'checked="checked"':'').' />'.&mt('Pass').'</label>'."\n".
+		    '<label class="LC_GRADE_review"><input type="radio" name="HWVAL_'.$link.'" value="review" '.($status eq 'review' ? 'checked="checked"':'').' />'.&mt('Review').'</label>'."\n".
 		    '</div>'."\n".
-		    '<label class="comment">'.&mt('Additional Comment for Student')."\n".
-		    '<textarea class="comment_area" name="HWVAL_comment_'.$link.'">'.&HTML::Entities::encode($Apache::lonhomework::history{"resource.$version.0.$dim.$instance.$id.comment"}).'</textarea>'."\n".
+		    '<label class="LC_GRADE_comment">'.&mt('Additional Comment for Student')."\n".
+		    '<textarea class="LC_GRADE_comment_area" name="HWVAL_comment_'.$link.'">'.&HTML::Entities::encode($Apache::lonhomework::history{"resource.$version.0.$dim.$instance.$id.comment"}).'</textarea>'."\n".
 		    '</label>'."\n".
-		    '<ul class="navbuttons">'."\n".
+		    '<ul class="LC_GRADE_navbuttons">'."\n".
 		    '<li><a href="#'.$last_link.'">Prev</a></li>'."\n".
 		    '<li><a href="#next_'.$link.'">Next</a></li>'."\n".
 		    '</ul>'."\n".
@@ -1882,7 +1883,7 @@
 	}
     }
     if ($result) {
-	return '<ul class="pastgrading">'.$result.'</ul>';
+	return '<ul class="LC_pastgrading">'.$result.'</ul>';
     }
     return '';
 }