-Sorry, no recipients ...
+
+Sorry, no recipients ...
ENDFAILREDIR
@@ -101,6 +103,7 @@ sub redirect_back {
+
$typestyle
Sent $sendsomething message(s).
$status
@@ -116,18 +119,19 @@ sub no_redirect_back {
ENDNOREDIR
- if ($feedurl ne '/adm/feedback') {
+ if ($feedurl!~/^\/adm\/feedback/) {
$r->print('');
}
- $r->print (<print (<
-Sorry, no feedback possible on this resource ...
+
+Sorry, no feedback possible on this resource ...
-ENDNOREDIR
+ENDNOREDIRTWO
}
sub screen_header {
@@ -139,7 +143,7 @@ sub screen_header {
}
if ($ENV{'course.'.$ENV{'request.course.id'}.'.question.email'}) {
$options.=
- ' Question about resource content';
+ ' Question about resource content';
}
if ($ENV{'course.'.$ENV{'request.course.id'}.'.comment.email'}) {
$options.=
@@ -155,12 +159,11 @@ sub screen_header {
}
sub get_previous_attempt {
- my ($feedurl)=@_;
- my $symb=&Apache::lonnet::symbread($feedurl);
+ my ($symb)=@_;
my $prevattempts='';
if ($symb) {
my $answer=&Apache::lonnet::reply(
- "restore:".$ENV{'user.domain'}.':'.$ENV{'user.name'}.':'.
+ "restore:".$ENV{'user.domain'}.':'.$ENV{'user.name'}.':'.
$ENV{'request.course.id'}.':'.
&Apache::lonnet::escape($symb),
$ENV{'user.home'});
@@ -170,28 +173,34 @@ sub get_previous_attempt {
$returnhash{&Apache::lonnet::unescape($name)}=
&Apache::lonnet::unescape($value);
} split(/\&/,$answer);
- my %lasthash=();
- my $version;
- for ($version=1;$version<=$returnhash{'version'};$version++) {
+ if ($returnhash{'version'}) {
+ my %lasthash=();
+ my $version;
+ for ($version=1;$version<=$returnhash{'version'};$version++) {
+ map {
+ $lasthash{$_}=$returnhash{$version.':'.$_};
+ } split(/\:/,$returnhash{$version.':keys'});
+ }
+ $prevattempts='