--- loncom/publisher/lonpublisher.pm 2000/12/01 12:08:01 1.8 +++ loncom/publisher/lonpublisher.pm 2000/12/02 12:40:27 1.10 @@ -5,7 +5,7 @@ # # 05/29/00,05/30,10/11 Gerd Kortemeyer) # -# 11/28,11/29,11/30,12/01 Gerd Kortemeyer +# 11/28,11/29,11/30,12/01,12/02 Gerd Kortemeyer package Apache::lonpublisher; @@ -14,10 +14,13 @@ use Apache::File; use Apache::Constants qw(:common :http :methods); use HTML::TokeParser; use Apache::lonxml; -use Apache::lonhomework; +use Apache::structuretags; +use Apache::response; my %addid; my %nokey; +my %language; +my %cprtag; my %metadatafields; my %metadatakeys; @@ -74,11 +77,22 @@ sub metaread { } sub textfield { - my ($title,$value)=@_; + my ($title,$name,$value)=@_; return "\n
$title:
".
'';
}
+sub selectbox {
+ my ($title,$name,$value,%options)=@_;
+ my $selout="\n
$title:
".'';
+}
+
sub publish {
my ($source,$target,$style)=@_;
@@ -223,6 +237,7 @@ sub publish {
$ENV{'environment.generation'};
$metadatafields{'author'}=~s/\s+/ /g;
$metadatafields{'author'}=~s/\s+$//;
+ $metadatafields{'owner'}=$ENV{'user.name'}.'@'.$ENV{'user.domain'};
# ------------------------------------------------ Check out directory hierachy
@@ -263,12 +278,7 @@ sub publish {
# -------------------------------------------------- Parse content for metadata
- my $allmeta='';
- if ($source=~/\.problem$/) {
- $allmeta=Apache::lonhomework::subhandler('meta',$content);
- } else {
- $allmeta=Apache::lonxml::xmlparse('meta',$content);
- }
+ my $allmeta=Apache::lonxml::xmlparse('meta',$content);
&metaeval($allmeta);
# ---------------- Find and document discrepancies in the parameters and stores
@@ -309,9 +319,9 @@ sub publish {
'