[LON-CAPA-cvs] cvs: loncom /homework grades.pm
bisitz
bisitz at source.lon-capa.org
Fri Aug 9 10:56:17 EDT 2013
bisitz Fri Aug 9 14:56:17 2013 EDT
Modified files:
/loncom/homework grades.pm
Log:
"Manual Grading by Page or Sequence":
- Improved and consistent page layout - Use pick_box for selection of grading options. Moved hidden fields outside pick_box to comply XHTML conformity.
- Internationalization: grading table header
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.699 loncom/homework/grades.pm:1.700
--- loncom/homework/grades.pm:1.699 Fri Aug 9 10:52:54 2013
+++ loncom/homework/grades.pm Fri Aug 9 14:56:17 2013
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.699 2013/08/09 10:52:54 kruse Exp $
+# $Id: grades.pm,v 1.700 2013/08/09 14:56:17 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -4455,48 +4455,68 @@
my ($curpage) =&Apache::lonnet::decode_symb($symb);
# my ($curpage,$mapId) =&Apache::lonnet::decode_symb($symb);
# my $type=($curpage =~ /\.(page|sequence)/);
- my $select = '<select name="selectpage">'."\n";
+
+ # Collection of hidden fields
my $ctr=0;
foreach (@$titles) {
- my ($minder,$showtitle) = ($_ =~ /(\d+)\.(.*)/);
- $select.='<option value="'.$ctr.'" '.
- ($$symbx{$_} =~ /$curpage$/ ? 'selected="selected"' : '').
- '>'.$showtitle.'</option>'."\n";
- $ctr++;
+ my ($minder,$showtitle) = ($_ =~ /(\d+)\.(.*)/);
+ $result.='<input type="hidden" name="page'.$ctr.'" value="'.$$symbx{$_}.'" />'."\n";
+ $result.='<input type="hidden" name="title'.$ctr.'" value="'.$showtitle.'" />'."\n";
+ $ctr++;
}
- $select.= '</select>';
- $result.=' <b>'.&mt('Problems from').':</b> '.$select."<br />\n";
+ $result.='<input type="hidden" name="page" />'."\n".
+ '<input type="hidden" name="title" />'."\n";
+
+ $result.=&build_section_inputs();
+ my $stu_status = join(':',&Apache::loncommon::get_env_multiple('form.Status'));
+ $result.='<input type="hidden" name="Status" value="'.$stu_status.'" />'."\n".
+ '<input type="hidden" name="command" value="displayPage" />'."\n".
+ '<input type="hidden" name="symb" value="'.&Apache::lonenc::check_encrypt($symb).'" />'."\n";
+ # Show grading options
+ $result.=&Apache::lonhtmlcommon::start_pick_box();
+ my $select = '<select name="selectpage">'."\n";
$ctr=0;
foreach (@$titles) {
my ($minder,$showtitle) = ($_ =~ /(\d+)\.(.*)/);
- $result.='<input type="hidden" name="page'.$ctr.'" value="'.$$symbx{$_}.'" />'."\n";
- $result.='<input type="hidden" name="title'.$ctr.'" value="'.$showtitle.'" />'."\n";
+ $select.='<option value="'.$ctr.'"'.
+ ($$symbx{$_} =~ /$curpage$/ ? ' selected="selected"' : '').
+ '>'.$showtitle.'</option>'."\n";
$ctr++;
}
- $result.='<input type="hidden" name="page" />'."\n".
- '<input type="hidden" name="title" />'."\n";
+ $select.= '</select>';
- my $options =
- '<label><input type="radio" name="vProb" value="no" checked="checked" /> '.&mt('no').' </label>'."\n".
- '<label><input type="radio" name="vProb" value="yes" /> '.&mt('yes').' </label>'."<br />\n";
- $result.=' <b>'.&mt('View Problem Text').': </b>'.$options;
-
- $options =
- '<label><input type="radio" name="lastSub" value="none" /> '.&mt('none').' </label>'."\n".
- '<label><input type="radio" name="lastSub" value="datesub" checked="checked" /> '.&mt('all submissions').'</label>'."\n".
- '<label><input type="radio" name="lastSub" value="all" /> '.&mt('all submissions with details').' </label>'."\n";
- $result.=' <b>'.&mt('View Submissions').': </b>'.$options;
+ $result.=
+ &Apache::lonhtmlcommon::row_title(&mt('Problems from'))
+ .$select
+ .&Apache::lonhtmlcommon::row_closure();
+
+ $result.=
+ &Apache::lonhtmlcommon::row_title(&mt('View Problem Text'))
+ .'<label><input type="radio" name="vProb" value="no"'
+ .' checked="checked" /> '.&mt('no').' </label>'."\n"
+ .'<label><input type="radio" name="vProb" value="yes" />'
+ .&mt('yes').'</label>'."\n"
+ .&Apache::lonhtmlcommon::row_closure();
+
+ $result.=
+ &Apache::lonhtmlcommon::row_title(&mt('View Submissions'))
+ .'<label><input type="radio" name="lastSub" value="none" /> '
+ .&mt('none').' </label>'."\n"
+ .'<label><input type="radio" name="lastSub" value="datesub"'
+ .' checked="checked" /> '.&mt('all submissions').'</label>'."\n"
+ .'<label><input type="radio" name="lastSub" value="all" /> '
+ .&mt('all submissions with details').' </label>'
+ .&Apache::lonhtmlcommon::row_closure();
- $result.=&build_section_inputs();
- my $stu_status = join(':',&Apache::loncommon::get_env_multiple('form.Status'));
- $result.='<input type="hidden" name="Status" value="'.$stu_status.'" />'."\n".
- '<input type="hidden" name="command" value="displayPage" />'."\n".
- '<input type="hidden" name="symb" value="'.&Apache::lonenc::check_encrypt($symb).'" />'."<br />\n";
-
- $result.=' <b>'.&mt('Use CODE').': </b> <input type="text" name="CODE" value="" /> <br />'."\n";
+ $result.=
+ &Apache::lonhtmlcommon::row_title(&mt('Use CODE'))
+ .'<input type="text" name="CODE" value="" />'
+ .&Apache::lonhtmlcommon::row_closure(1)
+ .&Apache::lonhtmlcommon::end_pick_box();
- $result.=' <input type="button" '.
+ # Show list of students to select for grading
+ $result.='<br /><input type="button" '.
'onclick="javascript:checkPickOne(this.form);" value="'.&mt('Next').' →" /><br />'."\n";
$request->print($result);
@@ -4641,7 +4661,7 @@
'</span>'."\n".
&Apache::loncommon::start_data_table().
&Apache::loncommon::start_data_table_header_row().
- '<th align="center"> Prob. </th>'.
+ '<th>'.&mt('Prob.').'</th>'.
'<th> '.($env{'form.vProb'} eq 'no' ? &mt('Title') : &mt('Problem Text')).'/'.&mt('Grade').'</th>'.
&Apache::loncommon::end_data_table_header_row();
More information about the LON-CAPA-cvs
mailing list