version 1.27, 2008/11/26 10:51:36
|
version 1.30, 2014/01/17 17:10:12
|
Line 48 sub handler {
|
Line 48 sub handler {
|
|
|
&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/^https?\:\/\///; |
$feedurl=~s/^$ENV{'SERVER_NAME'}//; |
$feedurl=~s/^$ENV{'SERVER_NAME'}//; |
$feedurl=~s/^$ENV{'HTTP_HOST'}//; |
$feedurl=~s/^$ENV{'HTTP_HOST'}//; |
|
|
Line 88 sub handler {
|
Line 88 sub handler {
|
} |
} |
if ($complete) { |
if ($complete) { |
my $showurl=&Apache::lonenc::check_encrypt(&Apache::lonnet::clutter($feedurl)); |
my $showurl=&Apache::lonenc::check_encrypt(&Apache::lonnet::clutter($feedurl)); |
my $js =<<ENDJS; |
my $js = &Apache::lonhtmlcommon::scripttag(<<ENDJS); |
<script type="text/javascript"> |
|
function goback() { |
function goback() { |
if ((window.name=='loncapaclient')) { |
if ((window.name=='loncapaclient')) { |
window.location='$showurl'; |
window.location='$showurl'; |
} else { |
} else { |
self.close(); |
self.close(); |
} |
} |
} |
} |
</script> |
|
ENDJS |
ENDJS |
|
|
my $start_page = &Apache::loncommon::start_page('Evaluate Resource',$js); |
# Breadcrumbs |
$r->print($start_page |
my $brcrum = [{'href' => '/adm/evaluate', |
.'<h1>'.&mt('Thank you for your input!').'</h1>'); |
'text' => 'Evaluate Resource'}, |
$r->print('<div class="LC_success">' |
{'href' => '', |
|
'text' => 'Done'}]; |
|
|
|
my $start_page = &Apache::loncommon::start_page('Evaluate Resource', |
|
$js, |
|
{'bread_crumbs' => $brcrum,}); |
|
|
|
$r->print($start_page |
|
.'<p class="LC_success">' |
.&mt('Saving feedback: [_1]' |
.&mt('Saving feedback: [_1]' |
,&Apache::lonnet::put('nohist_resevaldata',\%currenteval,$rdomain,$rauth)) |
,&Apache::lonnet::put( |
.'</div>'); |
'nohist_resevaldata',\%currenteval,$rdomain,$rauth)) |
|
.'</p>' |
|
); |
unless ($already) { |
unless ($already) { |
$r->print('<br />'.&mt('Logging first evaluation')); |
$r->print('<p>'.&mt('Logging first evaluation').'</p>'); |
} |
} |
$r->print( |
$r->print('<p><b>'.&mt('Thank you for your input!').'</b></p>' |
'<script type="text/javascript">setTimeout("goback()",2000);</script>'.&Apache::loncommon::end_page()); |
.&Apache::lonhtmlcommon::scripttag( |
|
'setTimeout("goback()",2000);') |
|
.&Apache::loncommon::end_page() |
|
); |
return OK; |
return OK; |
} else { |
} else { |
$warning=&mt('Please fill out all fields below.'); |
$warning=&mt('Please fill out all required fields below!'); |
} |
} |
|
|
} |
} |
Line 151 ENDJS
|
Line 162 ENDJS
|
<option value="5">$lt{'e'}</option> |
<option value="5">$lt{'e'}</option> |
ENDOPTIONS |
ENDOPTIONS |
|
|
my $start_page = &Apache::loncommon::start_page('Evaluate Resource'); |
# Breadcrumbs |
|
my $brcrum = [{'href' => '/adm/evaluate', |
|
'text' => 'Evaluate Resource'}]; |
|
|
|
my $start_page = &Apache::loncommon::start_page('Evaluate Resource', |
|
undef, |
|
{'bread_crumbs' => $brcrum,}); |
my $end_page = &Apache::loncommon::end_page(); |
my $end_page = &Apache::loncommon::end_page(); |
|
|
%lt=&Apache::lonlocal::texthash( |
%lt=&Apache::lonlocal::texthash( |
'pleaserank' => 'Please rank the following criteria:', |
'pleaserank' => 'Please rank the following criteria:', |
|
'required' => '(All fields marked with * are required.)', |
'correct' => 'The material appears to be correct', |
'correct' => 'The material appears to be correct', |
'helpful' => 'The material is helpful', |
'helpful' => 'The material is helpful', |
'depth' => 'The material is covered with sufficient depth', |
'depth' => 'The material is covered with sufficient depth', |
'clear' => 'The material is presented in a clear way', |
'clear' => 'The material is presented in a clear way', |
'technical' => 'The resource is technically correct (loads fast enough, does not produce errors, links work, etc)', |
'technical' => 'The resource is technically correct (loads fast enough, does not produce errors, links work, etc)', |
'comments' => 'Any comments?', |
'comments' => 'Comments', |
'submit' => 'Submit Evaluation', |
'submit' => 'Submit Evaluation', |
); |
); |
$r->print(<<ENDDOCUMENT); |
$r->print( |
$start_page |
$start_page |
<h2>$title</h2> |
.'<h2>'.$title.'</h2>'); |
<p class="LC_warning">$warning</p> |
|
$lt{'pleaserank'}<br /> |
if ($warning) { |
<form method="post" name="evaluation" action="/adm/evaluate"> |
$r->print( |
<input type="hidden" name="submiteval" value="true" /> |
&Apache::loncommon::confirmwrapper( |
<input type="hidden" name="postdata" value="$showurl" /> |
&Apache::lonhtmlcommon::confirm_success( |
<hr /> |
$warning,1))); |
$lt{'correct'} |
} |
<br /><select name="correct"> |
$r->print( |
$standardoptions |
'<form method="post" name="evaluation" action="/adm/evaluate">' |
</select> |
.'<input type="hidden" name="submiteval" value="true" />' |
<hr /> |
.'<input type="hidden" name="postdata" value="'.$showurl.'" />' |
$lt{'helpful'} |
); |
<br /><select name="helpful"> |
$r->print( |
$standardoptions |
&Apache::lonhtmlcommon::start_pick_box() |
</select> |
.&Apache::lonhtmlcommon::row_headline() |
<hr /> |
.$lt{'pleaserank'}.'<br />' |
$lt{'depth'} |
.'<span class="LC_info">'.$lt{'required'}.'</span>' |
<br /><select name="depth"> |
.&Apache::lonhtmlcommon::row_closure() |
$standardoptions |
); |
</select> |
|
<hr /> |
foreach my $key ('correct', 'helpful', 'depth', 'clear', 'technical') { |
$lt{'clear'} |
$r->print( |
<br /><select name="clear"> |
&Apache::lonhtmlcommon::row_title( |
$standardoptions |
'<span title="'.&mt('required').'">'.$lt{$key} |
</select> |
.' <span class="LC_info">*</span></span>') |
<hr /> |
.'<select name="'.$key.'">' |
$lt{'technical'} |
.$standardoptions |
<br /><select name="technical"> |
.'</select>' |
$standardoptions |
.&Apache::lonhtmlcommon::row_closure() |
</select> |
); |
<hr /> |
} |
$lt{'comments'} |
|
<br /><textarea name="comments" cols="40" rows="5">$oldcomments</textarea> |
$r->print( |
<script type="text/javascript">$dialold</script> |
&Apache::lonhtmlcommon::row_title($lt{'comments'}) |
<br /><input type="submit" value="$lt{'submit'}" /> |
.'<textarea name="comments" cols="40" rows="5">' |
</form> |
.$oldcomments |
$end_page |
.'</textarea>' |
ENDDOCUMENT |
.&Apache::lonhtmlcommon::row_closure(1) |
|
.&Apache::lonhtmlcommon::end_pick_box() |
|
.'<p>' |
|
.'<input type="submit" value="'.$lt{'submit'}.'" />' |
|
.'</p>' |
|
); |
|
|
|
$r->print( |
|
&Apache::lonhtmlcommon::scripttag($dialold) |
|
.'</form>' |
|
.$end_page |
|
); |
|
|
return OK; |
return OK; |
} |
} |
|
|