--- loncom/interface/lonfeedback.pm 2001/02/10 14:10:13 1.8 +++ loncom/interface/lonfeedback.pm 2001/02/13 18:18:40 1.9 @@ -12,12 +12,14 @@ # 3/1,2/3,2/5,2/6,2/8 Gerd Kortemeyer # 2/9 Guy Albertelli # 2/10 Gerd Kortemeyer +# 2/13 Guy Albertelli package Apache::lonfeedback; use strict; use Apache::Constants qw(:common); use Apache::lonmsg(); +use Apache::loncommon(); sub mail_screen { my ($r,$feedurl,$options) = @_; @@ -158,52 +160,6 @@ sub screen_header { return $options; } -sub get_previous_attempt { - my ($symb)=@_; - my $prevattempts=''; - if ($symb) { - my $answer=&Apache::lonnet::reply( - "restore:".$ENV{'user.domain'}.':'.$ENV{'user.name'}.':'. - $ENV{'request.course.id'}.':'. - &Apache::lonnet::escape($symb), - $ENV{'user.home'}); - my %returnhash=(); - map { - my ($name,$value)=split(/\=/,$_); - $returnhash{&Apache::lonnet::unescape($name)}= - &Apache::lonnet::unescape($value); - } split(/\&/,$answer); - if ($returnhash{'version'}) { - my %lasthash=(); - my $version; - for ($version=1;$version<=$returnhash{'version'};$version++) { - map { - $lasthash{$_}=$returnhash{$version.':'.$_}; - } split(/\:/,$returnhash{$version.':keys'}); - } - $prevattempts='
History | '; - map { - $prevattempts.=''.$_.' | '; - } keys %lasthash; - for ($version=1;$version<=$returnhash{'version'};$version++) { - $prevattempts.='
---|---|
Attempt '.$version.' | '; - map { - $prevattempts.=''.$returnhash{$version.':'.$_}.' | '; - } keys %lasthash; - } - $prevattempts.='
Current | '; - map { - $prevattempts.=''.$lasthash{$_}.' | '; - } keys %lasthash; - $prevattempts.='