version 1.211, 2004/04/19 17:44:47
|
version 1.212, 2004/04/19 21:46:50
|
Line 74 use Apache::lonmeta;
|
Line 74 use Apache::lonmeta;
|
use Apache::lonhtmlcommon; |
use Apache::lonhtmlcommon; |
use Apache::lonlocal; |
use Apache::lonlocal; |
use LONCAPA::lonmetadata(); |
use LONCAPA::lonmetadata(); |
|
use HTML::Entities(); |
|
|
###################################################################### |
###################################################################### |
###################################################################### |
###################################################################### |
Line 1061 sub parse_advanced_search {
|
Line 1062 sub parse_advanced_search {
|
$fillflag++; |
$fillflag++; |
} |
} |
} |
} |
unless ($fillflag) { |
if (! $fillflag) { |
&output_blank_field_error($r,$closebutton, |
&output_blank_field_error($r,$closebutton, |
'phase=disp_adv',$hidden_fields); |
'phase=disp_adv',$hidden_fields); |
return ; |
return ; |
Line 1717 Returns: the identifier of the table on
|
Line 1718 Returns: the identifier of the table on
|
sub set_up_table_structure { |
sub set_up_table_structure { |
my ($datatypes,$fullindicies) = |
my ($datatypes,$fullindicies) = |
&LONCAPA::lonmetadata::describe_metadata_storage(); |
&LONCAPA::lonmetadata::describe_metadata_storage(); |
unshift(@$datatypes,{name => 'id', |
# Copy the table description before modifying it... |
|
@Datatypes = @{$datatypes}; |
|
unshift(@Datatypes,{name => 'id', |
type => 'MEDIUMINT', |
type => 'MEDIUMINT', |
restrictions => 'UNSIGNED NOT NULL', |
restrictions => 'UNSIGNED NOT NULL', |
primary_key => 'yes', |
primary_key => 'yes', |
auto_inc => 'yes' }); |
auto_inc => 'yes' }); |
@Datatypes = @{$datatypes}; |
|
@Fullindicies = @{$fullindicies}; |
@Fullindicies = @{$fullindicies}; |
return; |
return; |
} |
} |
Line 1926 END
|
Line 1928 END
|
&update_status($r,'contacting '.$Servers_to_contact[0]); |
&update_status($r,'contacting '.$Servers_to_contact[0]); |
while (($time_remaining > 0) && |
while (($time_remaining > 0) && |
((@Servers_to_contact) || keys(%Server_status))) { |
((@Servers_to_contact) || keys(%Server_status))) { |
|
$time_remaining = $max_time - (time - $starttime) ; |
&update_seconds($r,$time_remaining); |
&update_seconds($r,$time_remaining); |
# Send out a search request if it needs to be done. |
# Send out a search request if it needs to be done. |
if (@Servers_to_contact) { |
if (@Servers_to_contact) { |
Line 2201 sub display_results {
|
Line 2204 sub display_results {
|
} |
} |
my $prefix=&catalogmode_output($Fields{'title'},$Fields{'url'}, |
my $prefix=&catalogmode_output($Fields{'title'},$Fields{'url'}, |
$Fields{'id'},$checkbox_num++); |
$Fields{'id'},$checkbox_num++); |
|
|
# Render the result into html |
# Render the result into html |
$output.= &$viewfunction($prefix,%Fields); |
$output.= &$viewfunction($prefix,%Fields); |
# Print them out as they come in. |
# Print them out as they come in. |
Line 2716 END
|
Line 2720 END
|
###################################################################### |
###################################################################### |
sub xml_sgml_view { |
sub xml_sgml_view { |
my ($prefix,%values) = @_; |
my ($prefix,%values) = @_; |
|
my $xml = <<END; |
|
<LonCapaResource> |
|
<url>$values{'url'}</url> |
|
<title>$values{'title'}</title> |
|
<author>$values{'author'}</author> |
|
<subject>$values{'subject'}</subject> |
|
<keywords>$values{'keywords'}</keywords> |
|
<notes>$values{'notes'}</notes> |
|
<mimeInfo> |
|
<mime>$values{'mime'}</mime> |
|
<mimetag>$values{'mimetag'}</mimetag> |
|
</mimeInfo> |
|
<languageInfo> |
|
<language>$values{'language'}</language> |
|
<languagetag>$values{'languagetag'}</languagetag> |
|
</languageInfo> |
|
<creationdate>$values{'creationdate'}</creationdate> |
|
<lastrevisiondate>$values{'lastrevisiondate'}</lastrevisiondate> |
|
<owner>$values{'owner'}</owner> |
|
<copyrightInfo> |
|
<copyright>$values{'copyright'}</copyright> |
|
<copyrighttag>$values{'copyrighttag'}</copyrighttag> |
|
</copyrightInfo> |
|
<repositoryLocation>$values{'hostname'}</repositoryLocation> |
|
<shortabstract>$values{'shortabstract'}</shortabstract> |
|
</LonCapaResource> |
|
END |
|
$xml = &HTML::Entities::encode($xml,'<>&'); |
my $result=<<END; |
my $result=<<END; |
$prefix |
$prefix |
<pre> |
<pre> |
<LonCapaResource> |
$xml |
<url>$values{'url'}</url> |
|
<title>$values{'title'}</title> |
|
<author>$values{'author'}</author> |
|
<subject>$values{'subject'}</subject> |
|
<keywords>$values{'keywords'}</keywords> |
|
<notes>$values{'notes'}</notes> |
|
<mimeInfo> |
|
<mime>$values{'mime'}</mime> |
|
<mimetag>$values{'mimetag'}</mimetag> |
|
</mimeInfo> |
|
<languageInfo> |
|
<language>$values{'language'}</language> |
|
<languagetag>$values{'languagetag'}</languagetag> |
|
</languageInfo> |
|
<creationdate>$values{'creationdate'}</creationdate> |
|
<lastrevisiondate>$values{'lastrevisiondate'}</lastrevisiondate> |
|
<owner>$values{'owner'}</owner> |
|
<copyrightInfo> |
|
<copyright>$values{'copyright'}</copyright> |
|
<copyrighttag>$values{'copyrighttag'}</copyrighttag> |
|
</copyrightInfo> |
|
<repositoryLocation>$values{'hostname'}</repositoryLocation> |
|
<shortabstract>$values{'shortabstract'}</shortabstract> |
|
</LonCapaResource> |
|
</pre> |
</pre> |
$values{'extrashow'} |
$values{'extrashow'} |
<hr align='left' width='200' noshade /> |
<hr align='left' width='200' noshade /> |