[LON-CAPA-cvs] cvs: loncom /homework grades.pm /interface loncommon.pm
bisitz
bisitz@source.lon-capa.org
Fri, 05 Feb 2010 14:52:32 -0000
bisitz Fri Feb 5 14:52:32 2010 EDT
Modified files:
/loncom/homework grades.pm
/loncom/interface loncommon.pm
Log:
Optimized manual grading screen layout:
- Optimized floating of items in submission details option list
- Moved additonal functions (Activity, Change Parameters) directly below corresponding student's name; optimized spacing
- Each student has HTML headline now
- Moved alternating colors from student's name background to left side border
- No additional border needed for each student; adjusted margins and padding
- Better separate footer from rest
- Adding warning style to "...do not save the scores" message
- Added missing &mt() call
- Removed now unused styles (including changes in grades.pm 1.588 and grades.pm 1.590)
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.591 loncom/homework/grades.pm:1.592
--- loncom/homework/grades.pm:1.591 Wed Jan 27 06:26:55 2010
+++ loncom/homework/grades.pm Fri Feb 5 14:52:28 2010
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.591 2010/01/27 06:26:55 raeburn Exp $
+# $Id: grades.pm,v 1.592 2010/02/05 14:52:28 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -944,10 +944,18 @@
my $saveStatus = $stu_status eq '' ? 'Active' : $stu_status;
$env{'form.Status'} = $saveStatus;
$submission_options.=
- '<label><input type="radio" name="lastSub" value="lastonly" '.$checklastsub.' /> '.&mt('last submission only').' </label>'."\n".
- '<label><input type="radio" name="lastSub" value="last" /> '.&mt('last submission & parts info').' </label>'."\n".
- '<label><input type="radio" name="lastSub" value="datesub" /> '.&mt('by dates and submissions').' </label>'."\n".
- '<label><input type="radio" name="lastSub" value="all" /> '.&mt('all details').'</label>';
+ '<span class="LC_nobreak">'.
+ '<label><input type="radio" name="lastSub" value="lastonly" '.$checklastsub.' /> '.
+ &mt('last submission only').' </label></span>'."\n".
+ '<span class="LC_nobreak">'.
+ '<label><input type="radio" name="lastSub" value="last" /> '.
+ &mt('last submission & parts info').' </label></span>'."\n".
+ '<span class="LC_nobreak">'.
+ '<label><input type="radio" name="lastSub" value="datesub" /> '.
+ &mt('by dates and submissions').'</label></span>'."\n".
+ '<span class="LC_nobreak">'.
+ '<label><input type="radio" name="lastSub" value="all" /> '.
+ &mt('all details').'</label></span>';
$gradeTable .= &Apache::lonhtmlcommon::row_title(&mt('Submissions'))
.$submission_options
.&Apache::lonhtmlcommon::row_closure();
@@ -2079,12 +2087,31 @@
}
# This is where output for one specific student would start
- my $add_class = ($counter%2) ? 'LC_grade_show_user_odd_row' : '';
- $request->print("\n\n".
- '<div class="LC_grade_show_user '.$add_class.'">'.
- '<div class="LC_grade_user_name">'.&nameUserString(undef,$env{'form.fullname'},$uname,$udom).'</div>'.
- '<div class="LC_grade_show_user_body">'."\n");
+ my $add_class = ($counter%2) ? ' LC_grade_show_user_odd_row' : '';
+ $request->print(
+ "\n\n"
+ .'<div class="LC_grade_show_user'.$add_class.'">'
+ .'<h2>'.&nameUserString(undef,$env{'form.fullname'},$uname,$udom).'</h2>'
+ ."\n"
+ );
+ # Show additional functions if allowed
+ if ($perm{'vgr'}) {
+ $request->print(
+ &Apache::loncommon::track_student_link(
+ &mt('View recent activity'),
+ $uname,$udom,'check')
+ .' '
+ );
+ }
+ if ($perm{'opa'}) {
+ $request->print(
+ &Apache::loncommon::pprmlink(
+ &mt('Set/Change parameters'),
+ $uname,$udom,$symb,'check'));
+ }
+
+ # Show Problem
if ($env{'form.vProb'} eq 'all' or $env{'form.vAns'} eq 'all') {
my $mode;
if ($env{'form.vProb'} eq 'all' && $env{'form.vAns'} eq 'all') {
@@ -2144,7 +2171,9 @@
if ($$timestamp eq '') {
$lastsubonly.='<div class="LC_grade_submissions_body">'.$$string[0].'</div>';
} else {
- $lastsubonly = '<div class="LC_grade_submissions_body"> <b>Date Submitted:</b> '.$$timestamp."\n";
+ $lastsubonly =
+ '<div class="LC_grade_submissions_body">'
+ .'<b>'.&mt('Date Submitted:').'</b> '.$$timestamp."\n";
my %seenparts;
my @part_response_id = &flatten_responseType($responseType);
@@ -2298,7 +2327,7 @@
'<div class="LC_Box">'
.'<h3 class="LC_hcell">'.&mt('Assign Grades').'</h3>'
);
- $request->print(&gradeBox_start()); # <div class="LC_grade_assign_body">
+ $request->print(&gradeBox_start());
foreach my $part_response_id (@part_response_id) {
my ($partid,$respid) = @{ $part_response_id };
my $part_resp = join('_',@{ $part_response_id });
@@ -2314,16 +2343,6 @@
$request->print('</div>');
$request->print('<div class="LC_grade_info_links">');
- if ($perm{'vgr'}) {
- $request->print(
- &Apache::loncommon::track_student_link(&mt('View recent activity'),
- $uname,$udom,'check'));
- }
- if ($perm{'opa'}) {
- $request->print(
- &Apache::loncommon::pprmlink(&mt('Set/Change parameters'),
- $uname,$udom,$symb,'check'));
- }
$request->print('</div>');
$result='<input type="hidden" name="partlist'.$counter.
@@ -2340,13 +2359,12 @@
# Done with printing info for one student
- $request->print('</div>');#LC_grade_show_user_body
$request->print('</div>');#LC_grade_show_user
# print end of form
if ($counter == $total) {
- my $endform='<table border="0"><tr><td>'."\n";
+ my $endform='<br /><hr /><table border="0"><tr><td>'."\n";
$endform.='<input type="button" value="'.&mt('Save & Next').'" '.
'onclick="javascript:checksubmit(this.form,\'Save & Next\','.
$total.','.scalar(@partlist).');" target="_self" /> '."\n";
@@ -2361,7 +2379,9 @@
'onclick="javascript:checksubmit(this.form,\'Previous\');" target="_self" /> '."\n".
'<input type="button" value="'.&mt('Next').'" '.
'onclick="javascript:checksubmit(this.form,\'Next\');" target="_self" /> ';
- $endform.=&mt('(Next and Previous (student) do not save the scores.)')."\n" ;
+ $endform.='<span class="LC_warning">'.
+ &mt('(Next and Previous (student) do not save the scores.)').
+ '</span>'."\n" ;
$endform.="<input type='hidden' value='".&get_increment().
"' name='increment' />";
$endform.='</td></tr></table></form>';
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.935 loncom/interface/loncommon.pm:1.936
--- loncom/interface/loncommon.pm:1.935 Sat Jan 30 22:40:43 2010
+++ loncom/interface/loncommon.pm Fri Feb 5 14:52:32 2010
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.935 2010/01/30 22:40:43 bisitz Exp $
+# $Id: loncommon.pm,v 1.936 2010/02/05 14:52:32 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -5766,56 +5766,36 @@
}
div.LC_grade_show_user {
- margin-top: 20px;
- border: 1px solid black;
-}
-
-div.LC_grade_user_name {
- background: #DDDDEE;
- border-bottom: 1px solid black;
- font-weight: bold;
- font-size: large;
+ border-left: 5px solid $sidebg;
+ margin: 0;
+ padding: 15px 0 5px 10px;
}
-div.LC_grade_show_user_odd_row div.LC_grade_user_name {
- background: #DDEEDD;
+div.LC_grade_show_user_odd_row {
+ border-left: 5px solid #000000;
}
-div.LC_grade_show_problem,
div.LC_grade_submissions,
div.LC_grade_message_center,
-div.LC_grade_info_links,
-div.LC_grade_assign {
+div.LC_grade_info_links {
margin: 5px;
width: 99%;
background: #FFFFFF;
}
-div.LC_grade_show_problem_header,
div.LC_grade_submissions_header,
-div.LC_grade_message_center_header,
-div.LC_grade_assign_header {
+div.LC_grade_message_center_header {
font-weight: bold;
font-size: large;
}
-div.LC_grade_show_problem_problem,
div.LC_grade_submissions_body,
-div.LC_grade_message_center_body,
-div.LC_grade_assign_body {
+div.LC_grade_message_center_body {
border: 1px solid black;
width: 99%;
background: #FFFFFF;
}
-span.LC_grade_check_note {
- font-weight: normal;
- font-size: medium;
- display: inline;
- position: absolute;
- right: 1em;
-}
-
table.LC_scantron_action {
width: 100%;
}