[LON-CAPA-cvs] cvs: loncom /interface lonmeta.pm slotrequest.pm
banghart
lon-capa-cvs@mail.lon-capa.org
Wed, 26 Oct 2005 23:37:52 -0000
banghart Wed Oct 26 19:37:52 2005 EDT
Modified files:
/loncom/interface lonmeta.pm slotrequest.pm
Log:
Beginning to handle single and multiple selection of
instructor defined keyword list.
Index: loncom/interface/lonmeta.pm
diff -u loncom/interface/lonmeta.pm:1.118 loncom/interface/lonmeta.pm:1.119
--- loncom/interface/lonmeta.pm:1.118 Tue Oct 25 14:47:49 2005
+++ loncom/interface/lonmeta.pm Wed Oct 26 19:37:51 2005
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Metadata display handler
#
-# $Id: lonmeta.pm,v 1.118 2005/10/25 18:47:49 albertel Exp $
+# $Id: lonmeta.pm,v 1.119 2005/10/26 23:37:51 banghart Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -483,6 +483,7 @@
if (defined($course_key)) {
my $stu_add;
my $only_one;
+ my $values = $env{$course_key.'.metadata.'.$_.'.values'};
if ($env{$course_key.'.metadata.'.$_.'.options'} =~ m/stuadd/) {
$stu_add = 'true';
}
@@ -498,11 +499,22 @@
if ($type eq 'subject') {
}
if ($type eq 'keywords') {
+ my %hash;
+ my $def;
+ foreach (split(/,/,$values)) {
+ $hash{$_} = $_;
+ }
+ if ($only_one) {
+ return(&Apache::loncommon::select_form($def,'new_keywords',%hash));
+ } else {
+ return(&Apache::loncommon::multiple_select_form('new_keywords',undef,undef,%hash));
+ }
}
if ($type eq 'notes') {
}
if ($type eq 'abstract') {
}
+
if (($type eq 'lowestgradelevel') ||
($type eq 'highestgradelevel')) {
return &Apache::loncommon::select_level_form($value,$fieldname).
Index: loncom/interface/slotrequest.pm
diff -u loncom/interface/slotrequest.pm:1.25 loncom/interface/slotrequest.pm:1.26
--- loncom/interface/slotrequest.pm:1.25 Mon Oct 17 17:21:39 2005
+++ loncom/interface/slotrequest.pm Wed Oct 26 19:37:51 2005
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler for requesting to have slots added to a students record
#
-# $Id: slotrequest.pm,v 1.25 2005/10/17 21:21:39 albertel Exp $
+# $Id: slotrequest.pm,v 1.26 2005/10/26 23:37:51 banghart Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -34,7 +34,7 @@
use Apache::loncommon();
use Apache::lonlocal;
use Apache::lonnet;
-use Date::Manip;
+# use Date::Manip;
sub fail {
my ($r,$code)=@_;