version 1.11, 2003/04/15 19:01:14
|
version 1.14, 2004/11/11 22:47:55
|
Line 38
|
Line 38
|
package Apache::lonevaluate; |
package Apache::lonevaluate; |
|
|
use strict; |
use strict; |
use Apache::lonnet; |
use Apache::lonnet(); |
use Apache::Constants qw(:common); |
use Apache::Constants qw(:common); |
use Apache::loncommon; |
use Apache::loncommon(); |
|
use Apache::lonenc(); |
|
|
sub handler { |
sub handler { |
my $r = shift; |
my $r = shift; |
Line 49 sub handler {
|
Line 50 sub handler {
|
return OK if $r->header_only; |
return OK if $r->header_only; |
|
|
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['postdata']); |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['postdata']); |
my $feedurl=$ENV{'form.postdata'}; |
my $feedurl=$ENV{'form.postdata'}; |
$feedurl=~s/^http\:\/\///; |
$feedurl=~s/^http\:\/\///; |
$feedurl=~s/^$ENV{'SERVER_NAME'}//; |
$feedurl=~s/^$ENV{'SERVER_NAME'}//; |
$feedurl=~s/^$ENV{'HTTP_HOST'}//; |
$feedurl=~s/^$ENV{'HTTP_HOST'}//; |
|
|
$feedurl=&Apache::lonnet::declutter($feedurl); |
$feedurl=&Apache::lonnet::declutter($feedurl); |
my $symb=&Apache::lonnet::symbread($feedurl); |
|
|
my $title=&Apache::lonnet::gettitle($feedurl); |
|
my $showurl=&Apache::lonenc::check_encrypt($feedurl); |
|
|
my ($rdomain,$rauth)=($feedurl=~/^(\w+)\/(\w+)\//); |
my ($rdomain,$rauth)=($feedurl=~/^(\w+)\/(\w+)\//); |
|
|
Line 89 sub handler {
|
Line 92 sub handler {
|
} |
} |
} |
} |
if ($complete) { |
if ($complete) { |
|
my $showurl=&Apache::lonenc::check_encrypt(&Apache::lonnet::clutter($feedurl)); |
$r->print(<<ENDHEADER); |
$r->print(<<ENDHEADER); |
<html> |
<html> |
<head> |
<head> |
<title>Evaluation submitted</title> |
<title>Evaluation submitted</title> |
<script> |
<script> |
function go() { |
function goback() { |
if (window.name!='LONcatInfo') { |
if ((window.name=='loncapaclient')) { |
window.location='/res/$feedurl'; |
window.location='$showurl'; |
|
} else { |
|
self.close(); |
} |
} |
} |
} |
</script> |
</script> |
Line 111 ENDHEADER
|
Line 117 ENDHEADER
|
$r->print('<br>Logging first evaluation'); |
$r->print('<br>Logging first evaluation'); |
} |
} |
$r->print( |
$r->print( |
'<script>setTimeout("go()",2000);</script></body></html>'); |
'<script>setTimeout("goback()",2000);</script></body></html>'); |
return OK; |
return OK; |
} else { |
} else { |
$warning='Please fill out all fields below'; |
$warning='Please fill out all fields below'; |
Line 135 ENDHEADER
|
Line 141 ENDHEADER
|
$oldcomments=$currenteval{$prefix.$item}; |
$oldcomments=$currenteval{$prefix.$item}; |
} |
} |
} |
} |
|
|
# ------------------------------------------------------- Print out eval screen |
# ------------------------------------------------------- Print out eval screen |
my $standardoptions=(<<ENDOPTIONS); |
my $standardoptions=(<<ENDOPTIONS); |
<option value=0>-</option> |
<option value=0>-</option> |
Line 152 ENDOPTIONS
|
Line 157 ENDOPTIONS
|
<title>The LearningOnline Network with CAPA</title> |
<title>The LearningOnline Network with CAPA</title> |
</head> |
</head> |
$bodytag |
$bodytag |
<tt>$feedurl</tt><p> |
<tt>$title</tt><p> |
<h3><font color="red">$warning</font></h3> |
<h3><font color="red">$warning</font></h3> |
Please rank the following criteria: |
Please rank the following criteria: |
<form method=post name=evaluation> |
<form method=post name=evaluation> |
<input type=hidden name=submiteval value=true> |
<input type=hidden name=submiteval value=true> |
<input type=hidden name=postdata value="$feedurl"> |
<input type=hidden name=postdata value="$showurl"> |
The material appears to be correct |
The material appears to be correct |
<br><select name=correct> |
<br><select name=correct> |
$standardoptions |
$standardoptions |