version 1.246, 2012/05/21 19:01:12
|
version 1.248, 2012/11/09 18:56:50
|
Line 351 sub pre_select_course {
|
Line 351 sub pre_select_course {
|
if ($group) { |
if ($group) { |
$group_input = '<input type="hidden" name="group" value="'.$group.'" />'; |
$group_input = '<input type="hidden" name="group" value="'.$group.'" />'; |
} |
} |
$r->print('<br /><br /><form method="post" action="'.$port_path.'">'. |
$r->print(' <form method="post" action="'.$port_path.'">'. |
'<input type="hidden" name="currentpath" value="'.$path.'" />'. |
'<input type="hidden" name="currentpath" value="'.$path.'" />'. |
$group_input. |
$group_input. |
'<input type="submit" name="cancel" value="'.&mt('Cancel').'" />'. |
'<input type="submit" name="cancel" value="'.&mt('Cancel').'" />'. |
Line 874 sub report_bombs {
|
Line 874 sub report_bombs {
|
$uri = &Apache::lonnet::declutter($uri); |
$uri = &Apache::lonnet::declutter($uri); |
$r->print('<h1>'.&Apache::lonnet::clutter($uri).'</h1>'); |
$r->print('<h1>'.&Apache::lonnet::clutter($uri).'</h1>'); |
my ($domain,$author)=($uri=~/^($match_domain)\/($match_username)\//); |
my ($domain,$author)=($uri=~/^($match_domain)\/($match_username)\//); |
if (!&Apache::loncacc::constructaccess('/priv/'.$domain.'/'.$author.'/')) { |
if (!&Apache::lonnet::constructaccess('/priv/'.$domain.'/'.$author.'/')) { |
$r->print('<p class="LC_error">'.&mt('Not authorized').'</p>'); |
$r->print('<p class="LC_error">'.&mt('Not authorized').'</p>'); |
return; |
return; |
} |
} |
Line 1365 sub present_editable_metadata {
|
Line 1365 sub present_editable_metadata {
|
} else { |
} else { |
|
|
# Display Metadata, not Bombs |
# Display Metadata, not Bombs |
my $displayfile=&mt('Metadata for [_1]',$disuri); |
my $displayfile = |
|
&mt('Metadata for [_1]' |
|
,'<span class="LC_filename"'.$disuri.'</span>'); |
if ($disuri=~/\/default$/) { |
if ($disuri=~/\/default$/) { |
my $dir=$disuri; |
my $dir=$disuri; |
$dir=~s/default$//; |
$dir=~s/default$//; |
Line 1376 sub present_editable_metadata {
|
Line 1378 sub present_editable_metadata {
|
%Apache::lonpublisher::metadatakeys=(); |
%Apache::lonpublisher::metadatakeys=(); |
my $result=&Apache::lonnet::getfile($fn); |
my $result=&Apache::lonnet::getfile($fn); |
if ($result == -1){ |
if ($result == -1){ |
$r->print(&mt('Creating new file [_1]'),$meta_uri); |
my $message = &Apache::lonhtmlcommon::confirm_success( |
|
&mt('Creating new file [_1]' |
|
,'<span class="LC_filename"'.$meta_uri.'</span>')); |
|
$message = &Apache::loncommon::confirmwrapper($message); |
|
$r->print($message); |
} else { |
} else { |
&Apache::lonpublisher::metaeval($result); |
&Apache::lonpublisher::metaeval($result); |
} |
} |
Line 1463 ENDEDIT
|
Line 1469 ENDEDIT
|
if ($Apache::lonpublisher::metadatafields{'courserestricted'} ne 'none') { |
if ($Apache::lonpublisher::metadatafields{'courserestricted'} ne 'none') { |
|
|
if ($file_type eq 'portfolio') { |
if ($file_type eq 'portfolio') { |
$r->print(&mt('Associated with course [_1]', |
$r->print( |
'<strong><a href="'.$uri.'?changecourse=true">'. |
&mt('Associated with course [_1]' |
$env{$Apache::lonpublisher::metadatafields{'courserestricted'}. |
,'<strong>' |
".description"}. |
.$env{$Apache::lonpublisher::metadatafields{'courserestricted'} |
'</a></strong>').'<br />'); |
.".description"}.'</strong>') |
|
.' <a href="'.$uri.'?changecourse=true">' |
|
.&mt('Change') |
|
.'</a>'.'<br />' |
|
); |
|
|
} else { |
} else { |
$r->print(&mt('Associated with course [_1]', |
$r->print(&mt('Associated with course [_1]', |
'<strong>'. |
'<strong>'. |
$env{$Apache::lonpublisher::metadatafields{'courserestricted'}. |
$env{$Apache::lonpublisher::metadatafields{'courserestricted'}. |
".description"}.'</strong>').'<br />'); |
".description"}.'</strong>').'<br />'); |
} |
} |
} else { |
} else { |
$r->print('<a href="'.$uri.'?changecourse=true">'.&mt('This resource is not associated with a course.').'</a><br />'); |
$r->print( |
} |
&mt('This resource is not associated with a course.') |
} |
.' <a href="'.$uri.'?changecourse=true">'.&mt('Change').'</a><br />' |
|
); |
|
} |
|
} |
if (@added_order) { |
if (@added_order) { |
foreach my $field_name (@added_order) { |
foreach my $field_name (@added_order) { |
push(@fields,$field_name); |
push(@fields,$field_name); |