'.$lt{$_}.
@@ -568,11 +829,11 @@ $disuri
$obsoletewarning
$versiondisplay
-
+
ENDHEAD
- if ($ENV{'user.adv'}) {
+ if ($env{'user.adv'}) {
&print_dynamic_metadata($r,$uri,\%content);
}
return;
@@ -590,8 +851,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'}) ||
@@ -600,7 +859,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',
@@ -625,7 +884,7 @@ sub print_dynamic_metadata {
$r->print(''.
&mt('Overall Assessment Statistical Data').
''.
- '');
+ '');
$r->print(''.$lt{'stdno'}.' | '.
''.
&prettyprint('stdno',$dynmeta{'stdno'}).
@@ -644,7 +903,7 @@ sub print_dynamic_metadata {
$r->print(''.
&mt('Detailed Assessment Statistical Data').
'');
- my $table = ''.
+ my $table = ''.
''.
'Course | '.
'Section(s) | '.
@@ -704,7 +963,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{$_}.' | '.
''.
@@ -715,8 +974,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').
@@ -738,7 +997,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$/) {
@@ -756,16 +1015,19 @@ 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;
}
+
+
#####################################################
#####################################################
### ###
@@ -774,32 +1036,57 @@ sub print_dynamic_metadata {
#####################################################
#####################################################
sub present_editable_metadata {
- my ($r,$uri) = @_;
+ my ($r,$uri, $file_type) = @_;
# Construction Space Call
# Header
my $disuri=$uri;
my $fn=&Apache::lonnet::filelocation('',$uri);
$disuri=~s/^\/\~/\/priv\//;
$disuri=~s/\.meta$//;
+ my $meta_uri = $disuri;
+ if ($disuri =~ m|/portfolio/|) {
+ ($disuri, $meta_uri) = &portfolio_display_uri($disuri);
+ }
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'}) {
+ my $showdel=1;
+ if ($env{'form.delmsg'}) {
if (&Apache::lonmsg::del_url_author_res_msg($target) eq 'ok') {
$bombs=&mt('Messages deleted.');
+ $showdel=0;
} 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.');
+ $showdel=0;
+ } else {
+ $bombs=&mt('Error clearing messages');
+ }
+ }
+ my $del=&mt('Delete Messages for this Resource');
+ my $clear=&mt('Clear all Messages in Subdirectory');
+ my $goback=&mt('Back to Source File');
$r->print(<$disuri
| | |