version 1.28, 2008/12/24 07:56:50
|
version 1.29, 2009/09/04 16:12:09
|
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 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:', |
'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> |
.'<p class="LC_warning">'.$warning.'</p>' |
$lt{'pleaserank'}<br /> |
.'<form method="post" name="evaluation" action="/adm/evaluate">' |
<form method="post" name="evaluation" action="/adm/evaluate"> |
.'<input type="hidden" name="submiteval" value="true" />' |
<input type="hidden" name="submiteval" value="true" /> |
.'<input type="hidden" name="postdata" value="'.$showurl.'" />' |
<input type="hidden" name="postdata" value="$showurl" /> |
); |
<hr /> |
$r->print( |
$lt{'correct'} |
&Apache::lonhtmlcommon::start_pick_box() |
<br /><select name="correct"> |
.&Apache::lonhtmlcommon::row_headline() |
$standardoptions |
.$lt{'pleaserank'} |
</select> |
.&Apache::lonhtmlcommon::row_closure() |
<hr /> |
); |
$lt{'helpful'} |
|
<br /><select name="helpful"> |
foreach my $key ('correct', 'helpful', 'depth', 'clear', 'technical') { |
$standardoptions |
$r->print( |
</select> |
&Apache::lonhtmlcommon::row_title($lt{$key}) |
<hr /> |
.'<select name="'.$key.'">' |
$lt{'depth'} |
.$standardoptions |
<br /><select name="depth"> |
.'</select>' |
$standardoptions |
.&Apache::lonhtmlcommon::row_closure() |
</select> |
); |
<hr /> |
} |
$lt{'clear'} |
|
<br /><select name="clear"> |
$r->print( |
$standardoptions |
&Apache::lonhtmlcommon::row_title($lt{'comments'}) |
</select> |
.'<textarea name="comments" cols="40" rows="5">' |
<hr /> |
.$oldcomments |
$lt{'technical'} |
.'</textarea>' |
<br /><select name="technical"> |
.&Apache::lonhtmlcommon::row_closure(1) |
$standardoptions |
.&Apache::lonhtmlcommon::end_pick_box() |
</select> |
.'<p>' |
<hr /> |
.'<input type="submit" value="'.$lt{'submit'}.'" />' |
$lt{'comments'} |
.'</p>' |
<br /><textarea name="comments" cols="40" rows="5">$oldcomments</textarea> |
); |
<script type="text/javascript">$dialold</script> |
|
<br /><input type="submit" value="$lt{'submit'}" /> |
$r->print( |
</form> |
&Apache::lonhtmlcommon::scripttag($dialold) |
$end_page |
.'</form>' |
ENDDOCUMENT |
.$end_page |
|
); |
|
|
return OK; |
return OK; |
} |
} |
|
|