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

albertel lon-capa-cvs-allow@mail.lon-capa.org
Tue, 30 Oct 2007 00:09:30 -0000


This is a MIME encoded message

--albertel1193702970
Content-Type: text/plain

albertel		Mon Oct 29 20:09:30 2007 EDT

  Modified files:              
    /loncom/interface	loncommon.pm 
    /loncom/homework	structuretags.pm 
  Log:
  - BUG#5330 Authoring space fixups
  
  
--albertel1193702970
Content-Type: text/plain
Content-Disposition: attachment; filename="albertel-20071029200930.txt"

Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.599 loncom/interface/loncommon.pm:1.600
--- loncom/interface/loncommon.pm:1.599	Fri Oct 26 16:51:43 2007
+++ loncom/interface/loncommon.pm	Mon Oct 29 20:09:09 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.599 2007/10/26 20:51:43 albertel Exp $
+# $Id: loncommon.pm,v 1.600 2007/10/30 00:09:09 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -5058,6 +5058,24 @@
   right: 1em;
 }
 
+
+div.LC_edit_problem_header {
+  font: normal medium $sans;
+}
+div.LC_edit_problem_header,
+div.LC_edit_problem_header div {
+  margin-top: 5px;
+}
+div.LC_edit_problem_header_title {
+  font: larger medium $sans;
+  background: $tabbg;
+}
+hr.LC_edit_problem_divide {
+  color: $tabbg;
+  background-color: $tabbg;
+  height: 3px;
+  border: 0px;
+}
 END
 }
 
Index: loncom/homework/structuretags.pm
diff -u loncom/homework/structuretags.pm:1.405 loncom/homework/structuretags.pm:1.406
--- loncom/homework/structuretags.pm:1.405	Tue Oct 16 20:22:51 2007
+++ loncom/homework/structuretags.pm	Mon Oct 29 20:09:30 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # definition of tags that give a structure to a document
 #
-# $Id: structuretags.pm,v 1.405 2007/10/17 00:22:51 albertel Exp $
+# $Id: structuretags.pm,v 1.406 2007/10/30 00:09:30 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -332,34 +332,43 @@
 
 sub problem_web_to_edit_header {
     my ($rndseed)=@_;
-    my $result.='<input type="hidden" name="problemmode" value="'.&mt('View').'" />';
+    my $result .= '<div class="LC_edit_problem_header">';
+
+    $result.='<div class="LC_edit_problem_header_edit_row">';
+    $result.='<input type="hidden" name="problemmode" value="'.&mt('View').'" />';
     $result .= '<input type="submit" name="problemmode" accesskey="e" value="'.&mt('Edit').'" />';
-    $result .= '<input type="submit" name="problemmode" accesskey="x" value="'.&mt('EditXML').'" />
-             <input type="submit" name="newrandomization" accesskey="a" value="'.&mt('New Randomization').'" />
-             <input type="submit" name="resetdata" accesskey="r" value="'.&mt('Reset Submissions').'" />
-             <nobr><input type="submit" name="changerandseed" value="'.&mt('Change Random Seed To:').'" />
-              <input type="text" name="rndseed" size="10" value="'.
-	       $rndseed.'"
-           onchange="javascript:document.lonhomework.changerandseed.click()" /></nobr>
-             <span class="LC_nobreak"><label><input type="checkbox" name="showallfoils" ';
+    $result .= '<input type="submit" name="problemmode" accesskey="x" value="'.&mt('EditXML').'" />';
+    $result.='</div>';
+
+    if (!$Apache::lonhomework::parsing_a_task) {
+	$result .= 
+	    '<div class="LC_edit_problem_header_title">'.
+	    &mt('Problem Testing').
+	    &Apache::loncommon::help_open_topic('Problem_Editor_Testing_Area').
+	    '</div>';
+    } else {
+	$result .= 
+	    '<div class="LC_edit_problem_header_title">'.
+	    &mt('Task Testing').
+	    '</div>';
+    }
+    
     my $show_all_foils_text = 
 	($Apache::lonhomework::parsing_a_task) ?
 	&mt('&nbsp;Show&nbsp;All&nbsp;Instances')
 	: &mt('&nbsp;Show&nbsp;All&nbsp;Foils');
 
-    if (defined($env{'form.showallfoils'})) { $result.='checked="on"'; }
-    $result.= ' />'.$show_all_foils_text.'</label></span>'.
-	&Apache::loncommon::help_open_topic('Problem_Editor_Testing_Area','Testing Problems').
-	'<hr />';
-    $result.=&mt('Apply style file: ').'
-<input type="text" name="style_file" value="'.&HTML::Entities::encode($env{'construct.style'},'"<>&').'" />
- <a href="javascript:openbrowser(\'lonhomework\',\'style_file\',\'sty\')">'.&mt('Select').'</a>
-<input type="submit" name="clear_style_file" value="'.&mt('Clear').'" />
-<br />';
+    my $show_all= '<span class="LC_nobreak"><label><input type="checkbox" name="showallfoils" ';
+    if (defined($env{'form.showallfoils'})) { $show_all.='checked="checked"'; }
+    $show_all.= ' />'.$show_all_foils_text.'</label></span>';
+
+
 
+    $result .= '<div class="LC_edit_problem_header_status_row">';
     if (!$Apache::lonhomework::parsing_a_task) {
 	$result.="
-<nobr>
+<div class='LC_edit_problem_header_row1'>
+<span class=\"LC_nobreak\">
 ".&mt("Problem Status:")."
 <select name='problemstate'>
   <option value=''></option>
@@ -369,8 +378,8 @@
   ".&option('CANNOT_ANSWER_correct','problemstate').&mt("Open and correct")."</option>
   ".&option('SHOW_ANSWER'          ,'problemstate').&mt("Show Answer")."</option>
 </select>
-</nobr>
-<nobr>
+</span>
+<span class=\"LC_nobreak\">
 ".&mt("Problem Type:")."
 <select name='problemtype'>
   <option value=''></option>
@@ -378,8 +387,11 @@
   ".&option('problem','problemtype').&mt("Homework problem")."</option>
   ".&option('survey' ,'problemtype').&mt("Survey Question")."</option>
 </select>
-</nobr>
-<nobr>
+</span>
+$show_all
+</div>
+<div class='LC_edit_problem_header_row2'>
+<span class=\"LC_nobreak\">
 ".&mt("Feedback Mode:")."
 <select name='problemstatus'>
   <option value=''></option>
@@ -387,21 +399,13 @@
   ".&option('no', 'problemstatus').&mt("Don't Show Incorect/Correct Feedback")."</option>
   ".&option('no_feedback_ever', 'problemstatus').&mt("Don't Show Any Feedback")."</option>
 </select>
-</nobr>
-<input type='submit' name='changeproblemmode' value='".&mt("Change")."' />
-<hr />";
-	my $numtoanalyze=$env{'form.numtoanalyze'};
-	if (!$numtoanalyze) { $numtoanalyze=20; }
-	$result.= '<input type="submit" name="problemmode" value='.
-	    &mt('"Calculate answers').'" /> for
-             <input type="text" name="numtoanalyze" value="'.
-	     $numtoanalyze.'" size="5" /> '.&mt('versions of this problem').
-	     '.'.&Apache::loncommon::help_open_topic("Analyze_Problem",
-						     '',undef,undef,300).
-						     '<hr />';
+</span>
+";
+
     } elsif ($Apache::lonhomework::parsing_a_task) {
 	$result.="
-<nobr>
+<div class='LC_edit_problem_header_row1'>
+<span class=\"LC_nobreak\">
 ".&mt("Problem Status:")."
 <select name='problemstate'>
   <option value=''></option>
@@ -410,10 +414,45 @@
   ".&option('WEB_GRADE'            ,'problemstate').&mt("Criteria Grading")."</option>
   ".&option('SHOW_ANSWER'          ,'problemstate').&mt("Show Feedback")."</option>
 </select>
-</nobr>
-<input type='submit' name='changeproblemmode' value='".&mt("Change")."' />
-<hr />";
+</span>
+$show_all
+";
+    }
+
+    $result.='
+       <span class="LC_nobreak">
+       '.&mt('Apply style file: ').'
+         <input type="text" name="style_file" value="'.&HTML::Entities::encode($env{'construct.style'},'"<>&').'" />
+         <a href="javascript:openbrowser(\'lonhomework\',\'style_file\',\'sty\')">'.&mt('Select').'</a>
+       </span>
+     </div>
+     <input type="submit" name="changeproblemmode" value="'.&mt("Change View").'" />
+     <input type="submit" name="clear_style_file" accesskey="d" value="'.&mt('Show Default View').'" />
+     <input type="submit" name="resetdata" accesskey="r" value="'.&mt('Reset Submissions').'" />
+   </div>
+   <hr class="LC_edit_problem_divide" />
+   <div class="LC_edit_problem_header_randomize_row">
+     <input type="submit" name="newrandomization" accesskey="a" value="'.&mt('New Randomization').'" />
+     <input type="submit" name="changerandseed" value="'.&mt('Change Random Seed To:').'" />
+     <input type="text" name="rndseed" size="10" value="'.
+	       $rndseed.'"
+             onchange="javascript:document.lonhomework.changerandseed.click()" />';
+
+    if (!$Apache::lonhomework::parsing_a_task) {
+	my $numtoanalyze=$env{'form.numtoanalyze'};
+	if (!$numtoanalyze) { $numtoanalyze=20; }
+	$result .= &mt('[_1] for [_2] versions of this problem.',
+		       '<input type="submit" name="problemmode" value='.&mt('"Calculate answers').'" />',
+		       '<input type="text" name="numtoanalyze" value="'.
+		       $numtoanalyze.'" size="5" />').
+		       &Apache::loncommon::help_open_topic("Analyze_Problem",
+							   '',undef,undef,300);
     }
+
+    $result.='
+   </div>
+   <hr class="LC_edit_problem_divide" />
+</div>';
     return $result;
 }
 

--albertel1193702970--