[LON-CAPA-cvs] cvs: loncom /interface/spreadsheet studentcalc.pm

matthew lon-capa-cvs@mail.lon-capa.org
Wed, 16 Jul 2003 15:57:32 -0000


matthew		Wed Jul 16 11:57:32 2003 EDT

  Modified files:              
    /loncom/interface/spreadsheet	studentcalc.pm 
  Log:
  Bug 1584: pgrd button for each resource in the student level sheet.
  
  
Index: loncom/interface/spreadsheet/studentcalc.pm
diff -u loncom/interface/spreadsheet/studentcalc.pm:1.13 loncom/interface/spreadsheet/studentcalc.pm:1.14
--- loncom/interface/spreadsheet/studentcalc.pm:1.13	Mon Jun 23 16:47:00 2003
+++ loncom/interface/spreadsheet/studentcalc.pm	Wed Jul 16 11:57:32 2003
@@ -1,5 +1,5 @@
 #
-# $Id: studentcalc.pm,v 1.13 2003/06/23 20:47:00 matthew Exp $
+# $Id: studentcalc.pm,v 1.14 2003/07/16 15:57:32 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -144,6 +144,24 @@
     return $link;
 }
 
+sub convenience_links {
+    my $self = shift;
+    my ($resource) = @_;
+    my $symb = &Apache::lonnet::escape($resource->{'symb'});
+    my $result = <<"END";
+<a href="/adm/grades?symb=$symb&command=submission" target="LONcatInfo">
+    <img src="/adm/lonMisc/subm_button.gif" border=0 />
+    </a>
+<a href="/adm/grades?symb=$symb&command=gradingmenu" target="LONcatInfo">
+    <img src="/adm/lonMisc/pgrd_button.gif" border=0 />
+    </a>
+<a href="/adm/parmset?symb=$symb" target="LONcatInfo">
+    <img src="/adm/lonMisc/pprm_button.gif" border=0 />
+    </a>
+END
+    return $result;
+}
+
 sub outsheet_html {
     my $self = shift;
     my ($r) = @_;
@@ -208,7 +226,7 @@
         $tableheader =<<"END";
 </p><p>
 <table border="2">
-<tr><th>Row</th><th>Assessment</th>
+<tr><th>Row</th><th>&nbsp;</th><th>Assessment</th>
 END
     } else {
         $tableheader =<<"END";
@@ -242,6 +260,7 @@
             my $row_output = '<tr>';
             if ($editing_is_allowed) {
                 $row_output .= '<td>'.$rownum.'</td>';
+                $row_output .= '<td>'.$self->convenience_links($resource).'</td>';
                 $row_output .= '<td>'.
                     '<a href="/adm/assesscalc?sname='.$self->{'name'}.
                     '&sdomain='.$self->{'domain'}.