[LON-CAPA-cvs] cvs: loncom(version_2_9_X) /homework grades.pm
raeburn
raeburn@source.lon-capa.org
Mon, 18 May 2009 20:07:34 -0000
This is a MIME encoded message
--raeburn1242677254
Content-Type: text/plain
raeburn Mon May 18 20:07:34 2009 EDT
Modified files: (Branch: version_2_9_X)
/loncom/homework grades.pm
Log:
- Excluding redesign-related changes for now (1.533, 1.537, and 1.538).
--raeburn1242677254
Content-Type: text/plain
Content-Disposition: attachment; filename="raeburn-20090518200734.txt"
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.574 loncom/homework/grades.pm:1.574.2.1
--- loncom/homework/grades.pm:1.574 Thu May 14 14:24:07 2009
+++ loncom/homework/grades.pm Mon May 18 20:07:34 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.574 2009/05/14 14:24:07 bisitz Exp $
+# $Id: grades.pm,v 1.574.2.1 2009/05/18 20:07:34 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -8278,50 +8278,36 @@
'saveState'=>"",
'gradingMenu'=>1,
'showgrading'=>"yes");
-
- my $url1 = &Apache::lonhtmlcommon::build_url('grades/',\%fields);
-
+ my $url = &Apache::lonhtmlcommon::build_url('grades/',\%fields);
+ my @menu = ({ url => $url,
+ name => &mt('Manual Grading/View Submissions'),
+ short_description =>
+ &mt('Start the process of hand grading submissions.'),
+ });
$fields{'command'} = 'csvform';
- my $url2 = &Apache::lonhtmlcommon::build_url('grades/',\%fields);
-
+ $url = &Apache::lonhtmlcommon::build_url('grades/',\%fields);
+ push(@menu, { url => $url,
+ name => &mt('Upload Scores'),
+ short_description =>
+ &mt('Specify a file containing the class scores for current resource.')});
$fields{'command'} = 'processclicker';
- my $url3 = &Apache::lonhtmlcommon::build_url('grades/',\%fields);
-
+ $url = &Apache::lonhtmlcommon::build_url('grades/',\%fields);
+ push(@menu, { url => $url,
+ name => &mt('Process Clicker'),
+ short_description =>
+ &mt('Specify a file containing the clicker information for this resource.')});
$fields{'command'} = 'scantron_selectphase';
- my $url4 = &Apache::lonhtmlcommon::build_url('grades/',\%fields);
-
- my @menu = ({ categorytitle=>'Course Grading',
- items =>[
- { linktext => 'Manual Grading/View Submissions',
- url => $url1,
- permission => 'F',
- icon => 'edit-find-replace.png',
- linktitle => 'Start the process of hand grading submissions.'
- },
- { linktext => 'Upload Scores',
- url => $url2,
- permission => 'F',
- icon => 'uploadscores.png',
- linktitle => 'Specify a file containing the class scores for current resource.'
- },
- { linktext => 'Process Clicker',
- url => $url3,
- permission => 'F',
- icon => 'addClickerInfoFile.png',
- linktitle => 'Specify a file containing the clicker information for this resource.'
- },
- { linktext => 'Grade/Manage/Review Scantron Forms',
- url => $url4,
- permission => 'F',
- icon => 'stat.png',
- linktitle => 'Grade scantron exams, upload/download scantron data files, and review previously graded scantron exams.'
- }
- ]
- });
-
- #$fields{'command'} = 'verify';
- #$url = &Apache::lonhtmlcommon::build_url('grades/',\%fields);
- #
+ $url = &Apache::lonhtmlcommon::build_url('grades/',\%fields);
+ push(@menu, { url => $url,
+ name => &mt('Grade/Manage/Review Scantron Forms'),
+ short_description =>
+ &mt('Grade scantron exams, upload/download scantron data files, and review previously graded scantron exams.')});
+ $fields{'command'} = 'verify';
+ $url = &Apache::lonhtmlcommon::build_url('grades/',\%fields);
+ push(@menu, { url => "",
+ name => &mt('Verify Receipt'),
+ short_description =>
+ &mt('')});
# Create the menu
my $Str;
# $Str .= '<h2>'.&mt('Please select a grading task').'</h2>';
@@ -8333,15 +8319,24 @@
'<input type="hidden" name="saveState" value="" />'."\n".
'<input type="hidden" name="gradingMenu" value="1" />'."\n".
'<input type="hidden" name="showgrading" value="yes" />'."\n";
-
- $Str .= Apache::lonhtmlcommon::generate_menu(@menu);
- #$menudata->{'jscript'}
- $Str .='<hr /><input type="button" value="'.&mt('Verify Receipt').'" '.
- ' onClick="javascript:checkChoice(document.forms.gradingMenu,\'5\',\'verify\')" '.
- ' /> '.
- &Apache::lonnet::recprefix($env{'request.course.id'}).
- '-<input type="text" name="receipt" size="4" onChange="javascript:checkReceiptNo(this.form,\'OK\')" />';
-
+ foreach my $menudata (@menu) {
+ if ($menudata->{'name'} ne &mt('Verify Receipt')) {
+ $Str .=' <h3><a '.
+ $menudata->{'jscript'}.
+ ' href="'.
+ $menudata->{'url'}.'" >'.
+ $menudata->{'name'}."</a></h3>\n";
+ } else {
+ $Str .='<hr /><input type="button" value="'.&mt('Verify Receipt').'" '.
+ $menudata->{'jscript'}.
+ ' onClick="javascript:checkChoice(document.forms.gradingMenu,\'5\',\'verify\')" '.
+ ' /> '.
+ &Apache::lonnet::recprefix($env{'request.course.id'}).
+ '-<input type="text" name="receipt" size="4" onChange="javascript:checkReceiptNo(this.form,\'OK\')" />';
+ }
+ $Str .= ' '.(' 'x8).$menudata->{'short_description'}.
+ "\n";
+ }
$Str .="</form>\n";
my $receiptalert = &mt("Please enter a receipt number given by a student in the receipt box.");
$request->print(<<GRADINGMENUJS);
@@ -8458,91 +8453,102 @@
'<input type="hidden" name="showgrading" value="yes" />'."\n";
$result.='
-<h2>
- '.&mt('Grade Current Resource').'
-</h2>
-<div>
- '.$table.'
-</div>
-
-<div class="LC_columnSection">
-
- <fieldset>
- <legend>
- '.&mt('Sections').'
- </legend>
- <select name="section" multiple="multiple" size="5">'."\n";
- $result.= $selsec;
+ <div class="LC_grade_select_mode">
+ <div class="LC_grade_select_mode_current">
+ <h2>
+ '.&mt('Grade Current Resource').'
+ </h2>
+ <div class="LC_grade_select_mode_body">
+ <div class="LC_grades_resource_info">
+ '.$table.'
+ </div>
+ <div class="LC_grade_select_mode_selector">
+ <div class="LC_grade_select_mode_selector_header">
+ '.&mt('Sections').'
+ </div>
+ <div class="LC_grade_select_mode_selector_body">
+ <select name="section" multiple="multiple" size="5">'."\n";
+ if (ref($sections)) {
+ foreach my $section (sort(@$sections)) {
+ $result.='<option value="'.$section.'" '.
+ ($saveSec eq $section ? 'selected="selected"':'').'>'.$section.'</option>'."\n";
+ }
+ }
$result.= '<option value="all" '.($saveSec eq 'all' ? 'selected="selected"' : ''). '>all</option></select> ';
$result.='
- </fieldset>
-
- <fieldset>
- <legend>
- '.&mt('Groups').'
- </legend>
- '.&Apache::lonstatistics::GroupSelect('group','multiple',5).'
- </fieldset>
-
- <fieldset>
- <legend>
- '.&mt('Access Status').'
- </legend>
- '.&Apache::lonhtmlcommon::StatusOptions($saveStatus,undef,5,undef,'mult').'
- </fieldset>
-
- <fieldset>
- <legend>
- '.&mt('Submission Status').'
- </legend>
- <select name="submitonly" size="5">
- <option value="yes" '. ($saveSub eq 'yes' ? 'selected="selected"' : '').'>'.&mt('with submissions').'</option>
- <option value="queued" '. ($saveSub eq 'queued' ? 'selected="selected"' : '').'>'.&mt('in grading queue').'</option>
- <option value="graded" '. ($saveSub eq 'graded' ? 'selected="selected"' : '').'>'.&mt('with ungraded submissions').'</option>
- <option value="incorrect" '.($saveSub eq 'incorrect' ? 'selected="selected"' : '').'>'.&mt('with incorrect submissions').'</option>
+ </div>
+ </div>
+ <div class="LC_grade_select_mode_selector">
+ <div class="LC_grade_select_mode_selector_header">
+ '.&mt('Groups').'
+ </div>
+ <div class="LC_grade_select_mode_selector_body">
+ '.&Apache::lonstatistics::GroupSelect('group','multiple',5).'
+ </div>
+ </div>
+ <div class="LC_grade_select_mode_selector">
+ <div class="LC_grade_select_mode_selector_header">
+ '.&mt('Access Status').'
+ </div>
+ <div class="LC_grade_select_mode_selector_body">
+ '.&Apache::lonhtmlcommon::StatusOptions($saveStatus,undef,5,undef,'mult').'
+ </div>
+ </div>
+ <div class="LC_grade_select_mode_selector">
+ <div class="LC_grade_select_mode_selector_header">
+ '.&mt('Submission Status').'
+ </div>
+ <div class="LC_grade_select_mode_selector_body">
+ <select name="submitonly" size="5">
+ <option value="yes" '. ($saveSub eq 'yes' ? 'selected="selected"' : '').'>'.&mt('with submissions').'</option>
+ <option value="queued" '. ($saveSub eq 'queued' ? 'selected="selected"' : '').'>'.&mt('in grading queue').'</option>
+ <option value="graded" '. ($saveSub eq 'graded' ? 'selected="selected"' : '').'>'.&mt('with ungraded submissions').'</option>
+ <option value="incorrect" '.($saveSub eq 'incorrect' ? 'selected="selected"' : '').'>'.&mt('with incorrect submissions').'</option>
<option value="all" '. ($saveSub eq 'all' ? 'selected="selected"' : '').'>'.&mt('with any status').'</option>
- </select>
- </fieldset>
-
-</div>
-
-<br />
- <div>
- <div>
+ </select>
+ </div>
+ </div>
+ <div class="LC_grade_select_mode_type_body">
+ <div class="LC_grade_select_mode_type">
<label>
<input type="radio" name="radioChoice" value="submission" '.
($saveCmd eq 'submission' ? 'checked="checked"' : '').' /> '.
&mt('Select individual students to grade and view submissions.').'
- </label>
+ </label>
</div>
- <div>
- <label>
+ <div class="LC_grade_select_mode_type">
+ <label>
<input type="radio" name="radioChoice" value="viewgrades" '.
($saveCmd eq 'viewgrades' ? 'checked="checked"' : '').' /> '.
&mt('Grade all selected students in a grading table.').'
</label>
</div>
- <div>
- <input type="button" onClick="javascript:checkChoice(this.form,\'2\');" value="'.&mt('Next').' →" />
+ <div class="LC_grade_select_mode_type">
+ <input type="button" onClick="javascript:checkChoice(this.form,\'2\');" value="'.&mt('Next->').'" />
</div>
</div>
-
-
+ </div>
+ </div>
+ <div class="LC_grade_select_mode_page">
<h2>
'.&mt('Grade Complete Folder for One Student').'
</h2>
- <div>
- <div>
+ <div class="LC_grades_select_mode_body">
+ <div class="LC_grade_select_mode_type_body">
+ <div class="LC_grade_select_mode_type">
<label>
<input type="radio" name="radioChoice" value="pickStudentPage" '.
- ($saveCmd eq 'pickStudentPage' ? 'checked="checked"' : '').' /> '.
+ ($saveCmd eq 'pickStudentPage' ? 'checked="checked"' : '').' /> '.
&mt('The <b>complete</b> page/sequence/folder: For one student').'
</label>
</div>
- <div>
- <input type="button" onClick="javascript:checkChoice(this.form,\'2\');" value="'.&mt('Next').' →" />
+ <div class="LC_grade_select_mode_type">
+ <input type="button" onClick="javascript:checkChoice(this.form,\'2\');" value="'.&mt('Next->').'" />
</div>
+ </div>
</div>
+ </div>
+ </div>
</form>';
$result .= &show_grading_menu_form($symb);
return $result;
--raeburn1242677254--