version 1.165, 2006/08/08 19:35:53
|
version 1.168.2.2, 2006/08/28 00:14:19
|
Line 287 sub portfolio_linked_path {
|
Line 287 sub portfolio_linked_path {
|
if ($group) { |
if ($group) { |
$start = "groups/$group/".$start; |
$start = "groups/$group/".$start; |
} |
} |
my %anchor_fields; |
my %anchor_fields = ( |
%anchor_fields = ( |
|
'selectfile' => $start, |
'selectfile' => $start, |
'currentpath' => '/' |
'currentpath' => '/' |
); |
); |
Line 299 sub portfolio_linked_path {
|
Line 298 sub portfolio_linked_path {
|
foreach my $dir (@tree) { |
foreach my $dir (@tree) { |
$fullpath .= $dir.'/'; |
$fullpath .= $dir.'/'; |
$result .= '/'; |
$result .= '/'; |
my %anchor_fields = (); |
my %anchor_fields = ( |
%anchor_fields = ( |
|
'selectfile' => $dir, |
'selectfile' => $dir, |
'currentpath' => $fullpath |
'currentpath' => $fullpath |
); |
); |
Line 367 sub pre_select_course {
|
Line 365 sub pre_select_course {
|
$r->print('<p>'.&mt('If you would like to associate this resource ([_1]) with a current or previous course, please select one from the list below, otherwise select, \'None\'','<tt>'.$res_uri.'</tt>').'</p>'); |
$r->print('<p>'.&mt('If you would like to associate this resource ([_1]) with a current or previous course, please select one from the list below, otherwise select, \'None\'','<tt>'.$res_uri.'</tt>').'</p>'); |
$output = &select_course(); |
$output = &select_course(); |
$r->print($output.'<br /><input type="submit" name="store" value="'. |
$r->print($output.'<br /><input type="submit" name="store" value="'. |
&mt('Associate Resource With Selected Course').'">'); |
&mt('Associate Resource With Selected Course').'" />'); |
$r->print('</form>'); |
$r->print('</form>'); |
|
|
my ($port_path,$group) = &get_port_path_and_group($uri); |
my ($port_path,$group) = &get_port_path_and_group($uri); |
$r->print('<br /><br /><form method="POST" action="'.$port_path.'">'. |
my $group_input; |
|
if ($group) { |
|
$group_input = '<input type="hidden" name="group" value="'.$group.'" />'; |
|
} |
|
$r->print('<br /><br /><form method="post" action="'.$port_path.'">'. |
'<input type="hidden" name="currentpath" value="'.$path.'" />'. |
'<input type="hidden" name="currentpath" value="'.$path.'" />'. |
'<input type="hidden" name="group" value="'.$group.'" />'. |
$group_input. |
'<input type="submit" name="cancel" value="'.&mt('Cancel').'">'. |
'<input type="submit" name="cancel" value="'.&mt('Cancel').'" />'. |
'</form>'); |
'</form>'); |
|
|
return; |
return; |
Line 722 sub handler {
|
Line 724 sub handler {
|
&Apache::loncommon::content_type($r,'text/html'); |
&Apache::loncommon::content_type($r,'text/html'); |
$r->send_http_header; |
$r->send_http_header; |
return OK if $r->header_only; |
return OK if $r->header_only; |
# |
|
my ($resdomain,$resuser)= |
my ($resdomain,$resuser)= |
(&Apache::lonnet::declutter($uri)=~/^(\w+)\/(\w+)\//); |
(&Apache::lonnet::declutter($uri)=~/^(\w+)\/(\w+)\//); |
if ($uri=~m:/adm/bombs/(.*)$:) { |
if ($uri=~m:/adm/bombs/(.*)$:) { |
Line 740 sub handler {
|
Line 741 sub handler {
|
} else { |
} else { |
&pre_select_course($r,$uri); |
&pre_select_course($r,$uri); |
} |
} |
|
} elsif ($uri=~m|^/editupload/[^/]+/[^/]+/groups/|) { |
|
$r->print(&Apache::loncommon::start_page('Edit Group Portfolio File Catalog Information', |
|
undef, |
|
{'domain' => $resdomain,})); |
|
|
|
&present_editable_metadata($r,$uri,'groups'); |
} elsif ($uri=~m|^/~|) { |
} elsif ($uri=~m|^/~|) { |
# Construction space |
# Construction space |
$r->print(&Apache::loncommon::start_page('Edit Catalog nformation', |
$r->print(&Apache::loncommon::start_page('Edit Catalog nformation', |
Line 1100 sub print_dynamic_metadata {
|
Line 1107 sub print_dynamic_metadata {
|
##################################################### |
##################################################### |
##################################################### |
##################################################### |
sub present_editable_metadata { |
sub present_editable_metadata { |
my ($r,$uri, $file_type) = @_; |
my ($r,$uri,$file_type) = @_; |
# Construction Space Call |
# Construction Space Call |
# Header |
# Header |
my $disuri=$uri; |
my $disuri=$uri; |
Line 1190 ENDEDIT
|
Line 1197 ENDEDIT
|
'lowestgradelevel','highestgradelevel','sourceavail','sourcerights', |
'lowestgradelevel','highestgradelevel','sourceavail','sourcerights', |
'obsolete','obsoletereplacement'); |
'obsolete','obsoletereplacement'); |
} |
} |
|
if ($file_type eq 'groups') { |
|
$Apache::lonpublisher::metadatafields{'courserestricted'}= |
|
'course.'.$env{'request.course.id'}; |
|
} |
if ((! $Apache::lonpublisher::metadatafields{'courserestricted'}) && |
if ((! $Apache::lonpublisher::metadatafields{'courserestricted'}) && |
(! $env{'form.new_courserestricted'})) { |
(! $env{'form.new_courserestricted'}) && (! $file_type eq 'groups')) { |
$Apache::lonpublisher::metadatafields{'courserestricted'}= |
$Apache::lonpublisher::metadatafields{'courserestricted'}= |
'none'; |
'none'; |
} elsif ($env{'form.new_courserestricted'}) { |
} elsif ($env{'form.new_courserestricted'}) { |
Line 1202 ENDEDIT
|
Line 1213 ENDEDIT
|
$Apache::lonpublisher::metadatafields{'copyright'}= |
$Apache::lonpublisher::metadatafields{'copyright'}= |
'default'; |
'default'; |
} |
} |
if ($file_type eq 'portfolio') { |
if (($file_type eq 'portfolio') || ($file_type eq 'groups')) { |
if (! $Apache::lonpublisher::metadatafields{'mime'}) { |
if (! $Apache::lonpublisher::metadatafields{'mime'}) { |
($Apache::lonpublisher::metadatafields{'mime'}) = |
($Apache::lonpublisher::metadatafields{'mime'}) = |
( $target=~/\.(\w+)$/ ); |
( $target=~/\.(\w+)$/ ); |