[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm lonmeta.pm /metadata_database searchcat.pl /publisher lonpublisher.pm

www lon-capa-cvs@mail.lon-capa.org
Fri, 26 Dec 2003 16:27:20 -0000


www		Fri Dec 26 11:27:20 2003 EDT

  Modified files:              
    /loncom/interface	loncommon.pm lonmeta.pm 
    /loncom/metadata_database	searchcat.pl 
    /loncom/publisher	lonpublisher.pm 
  Log:
  Work on Bugs #789 and #1926: gradelevel and standards info
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.162 loncom/interface/loncommon.pm:1.163
--- loncom/interface/loncommon.pm:1.162	Mon Dec 22 18:34:49 2003
+++ loncom/interface/loncommon.pm	Fri Dec 26 11:27:20 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.162 2003/12/22 23:34:49 www Exp $
+# $Id: loncommon.pm,v 1.163 2003/12/26 16:27:20 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -762,7 +762,30 @@
     return $selectform;
 }
 
-
+sub select_level_form {
+    my ($deflevel,$name)=@_;
+    unless ($deflevel) { $deflevel=0; }
+    return &select_form($deflevel,$name,(
+					 0 => 'Not specified',
+					 1 => 'Grade 1',
+					 2 => 'Grade 2',
+					 3 => 'Grade 3',
+					 4 => 'Grade 4',
+					 5 => 'Grade 5',
+					 6 => 'Grade 6',
+					 7 => 'Grade 7',
+					 8 => 'Grade 8',
+					 9 => 'Grade 9',
+					 10 => 'Grade 10',
+					 11 => 'Grade 11',
+					 12 => 'Grade 12',
+					 13 => 'Grade 13',
+					 14 => '100 Level',
+					 15 => '200 Level',
+					 16 => '300 Level',
+					 17 => '400 Level',
+					 18 => 'Graduate Level'));
+}
 #-------------------------------------------
 
 =pod
Index: loncom/interface/lonmeta.pm
diff -u loncom/interface/lonmeta.pm:1.41 loncom/interface/lonmeta.pm:1.42
--- loncom/interface/lonmeta.pm:1.41	Mon Dec 22 16:44:17 2003
+++ loncom/interface/lonmeta.pm	Fri Dec 26 11:27:20 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Metadata display handler
 #
-# $Id: lonmeta.pm,v 1.41 2003/12/22 21:44:17 www Exp $
+# $Id: lonmeta.pm,v 1.42 2003/12/26 16:27:20 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -273,6 +273,9 @@
 				   'kw' => 'Keyword(s)',
 				   'no' => 'Notes',
 				   'ab' => 'Abstract',
+                                   'lg' => 'Lowest Grade Level',
+                                   'hg' => 'Highest Grade Level',
+                                   'st' => 'Standards',
 				   'mi' => 'MIME Type',
 				   'la' => 'Language',
 				   'cd' => 'Creation Date',
@@ -302,6 +305,12 @@
 <td bgcolor="#CCCCCC">$content{'notes'}&nbsp;</td></tr>
 <tr><td bgcolor='#AAAAAA'>$lt{'ab'}</td>
 <td bgcolor="#CCCCCC">$content{'abstract'}&nbsp;</td></tr>
+<tr><td bgcolor='#AAAAAA'>$lt{'lg'}</td>
+<td bgcolor="#CCCCCC">$content{'lowestgradelevel'}&nbsp;</td></tr>
+<tr><td bgcolor='#AAAAAA'>$lt{'hg'}</td>
+<td bgcolor="#CCCCCC">$content{'highestgradelevel'}&nbsp;</td></tr>
+<tr><td bgcolor='#AAAAAA'>$lt{'st'}</td>
+<td bgcolor="#CCCCCC">$content{'standards'}&nbsp;</td></tr>
 <tr><td bgcolor='#AAAAAA'>$lt{'mi'}</td>
 <td bgcolor="#CCCCCC">$mime ($content{'mime'})&nbsp;</td></tr>
 <tr><td bgcolor='#AAAAAA'>$lt{'la'}</td>
Index: loncom/metadata_database/searchcat.pl
diff -u loncom/metadata_database/searchcat.pl:1.50 loncom/metadata_database/searchcat.pl:1.51
--- loncom/metadata_database/searchcat.pl:1.50	Fri Dec 26 10:13:48 2003
+++ loncom/metadata_database/searchcat.pl	Fri Dec 26 11:27:20 2003
@@ -2,7 +2,7 @@
 # The LearningOnline Network
 # searchcat.pl "Search Catalog" batch script
 #
-# $Id: searchcat.pl,v 1.50 2003/12/26 15:13:48 www Exp $
+# $Id: searchcat.pl,v 1.51 2003/12/26 16:27:20 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -283,6 +283,9 @@
         "version TEXT, notes TEXT, abstract TEXT, mime TEXT, language TEXT, ".
         "creationdate DATETIME, lastrevisiondate DATETIME, owner TEXT, ".
         "copyright TEXT, dependencies TEXT, ".
+	"modifyinguser TEXT, authorspace TEXT, ".
+	"lowestgradelevel INTEGER UNSIGNED, highestgradelevel INTEGER UNSIGNED, ".
+	"standards TEXT, ".
         "count INTEGER UNSIGNED, ".
         "course INTEGER UNSIGNED, course_list TEXT, ".
         "goto INTEGER UNSIGNED, goto_list TEXT, ".
@@ -335,6 +338,11 @@
      "?,".   # owner
      "?,".   # copyright
      "?,".   # dependencies
+     "?,".   # modifyinguser
+     "?,".   # authorspace
+     "?,".   # lowestgradelevel
+     "?,".   # highestgradelevel
+     "?,".   # standards
      "?,".   # count
      "?,".   # course
      "?,".   # course_list
@@ -395,6 +403,11 @@
                              $ref->{'owner'},
                              $ref->{'copyright'},
 			     $ref->{'dependencies'},
+			     $ref->{'modifyinguser'},
+			     $ref->{'authorspace'},
+			     $ref->{'lowestgradelevel'},
+			     $ref->{'highestgradelevel'},
+			     $ref->{'standards'},
 			     $dyn{'count'},
 			     $dyn{'course'},
 			     $dyn{'course_list'},
Index: loncom/publisher/lonpublisher.pm
diff -u loncom/publisher/lonpublisher.pm:1.149 loncom/publisher/lonpublisher.pm:1.150
--- loncom/publisher/lonpublisher.pm:1.149	Mon Dec 22 17:09:06 2003
+++ loncom/publisher/lonpublisher.pm	Fri Dec 26 11:27:20 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Publication Handler
 #
-# $Id: lonpublisher.pm,v 1.149 2003/12/22 22:09:06 www Exp $
+# $Id: lonpublisher.pm,v 1.150 2003/12/26 16:27:20 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1143,6 +1143,21 @@
 	    $metadatafields{'abstract'}.'</textarea></p>';
 
 	$source=~/\.(\w+)$/;
+
+
+	$scrout.=
+	    "\n<p><font color=\"#800000\" face=\"helvetica\"><b>".
+	    uc(&mt('Lowest Grade Level:')).
+           "</b></font></p><br />".
+	   &Apache::loncommon::select_level_form($metadatafields{'lowestgradelevel'},'lowestgradelevel').
+	    "\n<p><font color=\"#800000\" face=\"helvetica\"><b>".
+	    uc(&mt('Highest Grade Level:')).
+           "</b></font></p><br />".
+	   &Apache::loncommon::select_level_form($metadatafields{'highestgradelevel'},'highestgradelevel').
+           &textfield('Standards','standards',$metadatafields{'standards'});
+
+
+
 
 	$scrout.=&hiddenfield('mime',$1);