'.$lt{$_}.
@@ -558,11 +686,11 @@ $disuri
$obsoletewarning
$versiondisplay
-
+
ENDHEAD
- if ($ENV{'user.adv'}) {
+ if ($env{'user.adv'}) {
&print_dynamic_metadata($r,$uri,\%content);
}
return;
@@ -580,8 +708,6 @@ sub print_dynamic_metadata {
$r->rflush();
my %items=&fieldnames();
my %dynmeta=&dynamicmeta($uri);
- &Apache::lonnet::logthis('dynamic metadata keys:'.$/.
- join("\n",keys(%dynmeta)));
#
# General Access and Usage Statistics
if (exists($dynmeta{'count'}) ||
@@ -590,7 +716,7 @@ sub print_dynamic_metadata {
exists($dynmeta{'goto'}) ||
exists($dynmeta{'course'})) {
$r->print(''.&mt('Access and Usage Statistics').''.
- '');
+ '');
foreach ('count',
'sequsage','sequsage_list',
'comefrom','comefrom_list',
@@ -615,7 +741,7 @@ sub print_dynamic_metadata {
$r->print(''.
&mt('Overall Assessment Statistical Data').
''.
- '');
+ '');
$r->print(''.$lt{'stdno'}.' | '.
''.
&prettyprint('stdno',$dynmeta{'stdno'}).
@@ -634,7 +760,7 @@ sub print_dynamic_metadata {
$r->print(''.
&mt('Detailed Assessment Statistical Data').
'');
- my $table = ''.
+ my $table = ''.
''.
'Course | '.
'Section(s) | '.
@@ -694,7 +820,7 @@ sub print_dynamic_metadata {
exists($dynmeta{'correct'}) ||
exists($dynmeta{'technical'})){
$r->print(''.&mt('Evaluation Data').''.
- '');
+ '');
foreach ('clear','depth','helpful','correct','technical') {
$r->print(''.$lt{$_}.' | '.
''.
@@ -705,8 +831,8 @@ sub print_dynamic_metadata {
$r->print(''.&mt('No Evaluation Data is available for this resource.').'');
}
$uri=~/^\/res\/(\w+)\/(\w+)\//;
- if ((($ENV{'user.domain'} eq $1) && ($ENV{'user.name'} eq $2))
- || ($ENV{'user.role.ca./'.$1.'/'.$2})) {
+ if ((($env{'user.domain'} eq $1) && ($env{'user.name'} eq $2))
+ || ($env{'user.role.ca./'.$1.'/'.$2})) {
if (exists($dynmeta{'comments'})) {
$r->print(''.&mt('Evaluation Comments').' ('.
&mt('visible to author and co-authors only').
@@ -728,7 +854,7 @@ sub print_dynamic_metadata {
# All other stuff
$r->print(''.
&mt('Additional Metadata (non-standard, parameters, exports)').
- '');
+ '');
foreach (sort(keys(%content))) {
my $name=$_;
if ($name!~/\.display$/) {
@@ -746,13 +872,14 @@ sub print_dynamic_metadata {
$name.'.'.$_).'; ';
}
}
- $r->print(''.$display.': '.$content{$name});
+ $r->print(''.$display.' | '.$content{$name});
if ($otherinfo) {
$r->print(' ('.$otherinfo.')');
}
- $r->print(" \n");
+ $r->print(" | \n");
}
}
+ $r->print(" ");
return;
}
@@ -764,7 +891,7 @@ sub print_dynamic_metadata {
#####################################################
#####################################################
sub present_editable_metadata {
- my ($r,$uri) = @_;
+ my ($r,$uri, $file_type) = @_;
# Construction Space Call
# Header
my $disuri=$uri;
@@ -772,22 +899,33 @@ sub present_editable_metadata {
$disuri=~s/^\/\~/\/priv\//;
$disuri=~s/\.meta$//;
my $target=$uri;
- $target=~s/^\/\~/\/res\/$ENV{'request.role.domain'}\//;
+ $target=~s/^\/\~/\/res\/$env{'request.role.domain'}\//;
$target=~s/\.meta$//;
my $bombs=&Apache::lonmsg::retrieve_author_res_msg($target);
if ($bombs) {
- if ($ENV{'form.delmsg'}) {
+ if ($env{'form.delmsg'}) {
if (&Apache::lonmsg::del_url_author_res_msg($target) eq 'ok') {
$bombs=&mt('Messages deleted.');
} else {
$bombs=&mt('Error deleting messages');
}
}
- my $del=&mt('Delete Messages');
+ if ($env{'form.clearmsg'}) {
+ my $cleardir=$target;
+ $cleardir=~s/\/[^\/]+$/\//;
+ if (&Apache::lonmsg::clear_author_res_msg($cleardir) eq 'ok') {
+ $bombs=&mt('Messages cleared.');
+ } else {
+ $bombs=&mt('Error clearing messages');
+ }
+ }
+ my $del=&mt('Delete Messages for this Resource');
+ my $clear=&mt('Clear all Messages in Subdirectory');
$r->print(<$disuri
| | |