[LON-CAPA-cvs] cvs: loncom /interface lonmeta.pm
banghart
lon-capa-cvs@mail.lon-capa.org
Sat, 19 Nov 2005 00:16:04 -0000
banghart Fri Nov 18 19:16:04 2005 EDT
Modified files:
/loncom/interface lonmeta.pm
Log:
- Remove inappropriate fields from list of metadata tags
- Generalize code to handle all metadata fields similarly
Index: loncom/interface/lonmeta.pm
diff -u loncom/interface/lonmeta.pm:1.129 loncom/interface/lonmeta.pm:1.130
--- loncom/interface/lonmeta.pm:1.129 Fri Nov 18 19:00:38 2005
+++ loncom/interface/lonmeta.pm Fri Nov 18 19:16:01 2005
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Metadata display handler
#
-# $Id: lonmeta.pm,v 1.129 2005/11/19 00:00:38 banghart Exp $
+# $Id: lonmeta.pm,v 1.130 2005/11/19 00:16:01 banghart Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -240,8 +240,6 @@
my %fields =
('title' => 'Title',
'author' =>'Author(s)',
- 'authorspace' => 'Author Space',
- 'modifyinguser' => 'Last Modifying User',
'subject' => 'Subject',
'keywords' => 'Keyword(s)',
'notes' => 'Notes',
@@ -515,29 +513,17 @@
} else {
$cur_values_stu = $value;
}
- if ($type eq 'author') {
- return
- '<input type="text" name="'.$fieldname.'" size="'.$size.'" '.
- 'value="'.$value.'" />'.
- &relatedfield(1,$relatedsearchflag,$relatedsep,$fieldname,
- $relatedvalue);
-
- }
if ($type eq 'courserestricted') {
return ('<input type="hidden" name="new_courserestricted" value="'.$course_key.'" />');
}
- if ($type eq 'authorspace') {
- }
- if ($type eq 'modifyinguser') {
- }
- if ($type eq 'subject') {
- }
- if ($type eq 'keywords') {
+ if (($type eq 'keywords') || ($type eq 'subject')
+ || ($type eq 'author')||($type eq 'notes')
+ || ($type eq 'abstract')|| ($type eq 'title')) {
if ($values) {
if ($only_one) {
- $output .= (&Apache::loncommon::select_form($value,'new_keywords',%meta_options));
+ $output .= (&Apache::loncommon::select_form($value,'new_'.$type,%meta_options));
} else {
- $output .= (&Apache::loncommon::multiple_select_form('new_keywords',\@cur_values_inst,undef,\%meta_options));
+ $output .= (&Apache::loncommon::multiple_select_form('new_'.$type,\@cur_values_inst,undef,\%meta_options));
}
}
if ($stu_add) {
@@ -548,11 +534,6 @@
}
return ($output);
}
- if ($type eq 'notes') {
- }
- if ($type eq 'abstract') {
- }
-
if (($type eq 'lowestgradelevel') ||
($type eq 'highestgradelevel')) {
return &Apache::loncommon::select_level_form($value,$fieldname).