[LON-CAPA-cvs] cvs: loncom /interface lonevaluate.pm /localize/localize de.pm
bisitz
bisitz@source.lon-capa.org
Fri, 04 Sep 2009 16:12:09 -0000
bisitz Fri Sep 4 16:12:09 2009 EDT
Modified files:
/loncom/localize/localize de.pm
/loncom/interface lonevaluate.pm
Log:
- Added missing breadcrumbs
- Replaced special styles by standard pick_box
- Simplified evaluation field creation
- Use Javascript start/end function
- First print log entries then Thank You message
- Added missing/updated translations to de.pm
Index: loncom/localize/localize/de.pm
diff -u loncom/localize/localize/de.pm:1.322 loncom/localize/localize/de.pm:1.323
--- loncom/localize/localize/de.pm:1.322 Tue Aug 11 15:15:09 2009
+++ loncom/localize/localize/de.pm Fri Sep 4 16:12:03 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# German Localization Lexicon
#
-# $Id: de.pm,v 1.322 2009/08/11 15:15:09 bisitz Exp $
+# $Id: de.pm,v 1.323 2009/09/04 16:12:03 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -5279,9 +5279,6 @@
'Agree'
=> 'Trifft eher zu',
- 'Any comments?'
-=> 'Kommentare:',
-
'Copy this column'
=> 'Kopiere diese Spalte',
@@ -7652,6 +7649,15 @@
'Submit Evaluation'
=> 'Evaluierung absenden',
+ 'Thank you for your input!'
+=> 'Danke für Ihre Angaben!',
+
+ 'Saving feedback: [_1]'
+=> 'Speichere Feedback: [_1]',
+
+ 'Logging first evaluation'
+=> 'Protokolliere erste Evaluation',
+
'Standard Problem'
=> 'Standard-Aufgabe',
Index: loncom/interface/lonevaluate.pm
diff -u loncom/interface/lonevaluate.pm:1.28 loncom/interface/lonevaluate.pm:1.29
--- loncom/interface/lonevaluate.pm:1.28 Wed Dec 24 07:56:50 2008
+++ loncom/interface/lonevaluate.pm Fri Sep 4 16:12:09 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Evaluate
#
-# $Id: lonevaluate.pm,v 1.28 2008/12/24 07:56:50 raeburn Exp $
+# $Id: lonevaluate.pm,v 1.29 2009/09/04 16:12:09 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -88,33 +88,44 @@
}
if ($complete) {
my $showurl=&Apache::lonenc::check_encrypt(&Apache::lonnet::clutter($feedurl));
- my $js =<<ENDJS;
-<script type="text/javascript">
+ my $js = &Apache::lonhtmlcommon::scripttag(<<ENDJS);
function goback() {
- if ((window.name=='loncapaclient')) {
+ if ((window.name=='loncapaclient')) {
window.location='$showurl';
} else {
self.close();
}
}
-</script>
ENDJS
- my $start_page = &Apache::loncommon::start_page('Evaluate Resource',$js);
- $r->print($start_page
- .'<h1>'.&mt('Thank you for your input!').'</h1>');
- $r->print('<div class="LC_success">'
+ # Breadcrumbs
+ my $brcrum = [{'href' => '/adm/evaluate',
+ 'text' => 'Evaluate Resource'},
+ {'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]'
- ,&Apache::lonnet::put('nohist_resevaldata',\%currenteval,$rdomain,$rauth))
- .'</div>');
+ ,&Apache::lonnet::put(
+ 'nohist_resevaldata',\%currenteval,$rdomain,$rauth))
+ .'</p>'
+ );
unless ($already) {
- $r->print('<br />'.&mt('Logging first evaluation'));
+ $r->print('<p>'.&mt('Logging first evaluation').'</p>');
}
- $r->print(
- '<script type="text/javascript">setTimeout("goback()",2000);</script>'.&Apache::loncommon::end_page());
+ $r->print('<p><b>'.&mt('Thank you for your input!').'</b></p>'
+ .&Apache::lonhtmlcommon::scripttag(
+ 'setTimeout("goback()",2000);')
+ .&Apache::loncommon::end_page()
+ );
return OK;
} else {
- $warning=&mt('Please fill out all fields below.');
+ $warning=&mt('Please fill out all fields below.');
}
}
@@ -151,60 +162,68 @@
<option value="5">$lt{'e'}</option>
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();
- %lt=&Apache::lonlocal::texthash(
+ %lt=&Apache::lonlocal::texthash(
'pleaserank' => 'Please rank the following criteria:',
'correct' => 'The material appears to be correct',
'helpful' => 'The material is helpful',
'depth' => 'The material is covered with sufficient depth',
'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)',
- 'comments' => 'Any comments?',
+ 'comments' => 'Comments',
'submit' => 'Submit Evaluation',
);
- $r->print(<<ENDDOCUMENT);
-$start_page
-<h2>$title</h2>
-<p class="LC_warning">$warning</p>
-$lt{'pleaserank'}<br />
-<form method="post" name="evaluation" action="/adm/evaluate">
-<input type="hidden" name="submiteval" value="true" />
-<input type="hidden" name="postdata" value="$showurl" />
-<hr />
-$lt{'correct'}
-<br /><select name="correct">
-$standardoptions
-</select>
-<hr />
-$lt{'helpful'}
-<br /><select name="helpful">
-$standardoptions
-</select>
-<hr />
-$lt{'depth'}
-<br /><select name="depth">
-$standardoptions
-</select>
-<hr />
-$lt{'clear'}
-<br /><select name="clear">
-$standardoptions
-</select>
-<hr />
-$lt{'technical'}
-<br /><select name="technical">
-$standardoptions
-</select>
-<hr />
-$lt{'comments'}
-<br /><textarea name="comments" cols="40" rows="5">$oldcomments</textarea>
-<script type="text/javascript">$dialold</script>
-<br /><input type="submit" value="$lt{'submit'}" />
-</form>
-$end_page
-ENDDOCUMENT
+ $r->print(
+ $start_page
+ .'<h2>'.$title.'</h2>'
+ .'<p class="LC_warning">'.$warning.'</p>'
+ .'<form method="post" name="evaluation" action="/adm/evaluate">'
+ .'<input type="hidden" name="submiteval" value="true" />'
+ .'<input type="hidden" name="postdata" value="'.$showurl.'" />'
+ );
+ $r->print(
+ &Apache::lonhtmlcommon::start_pick_box()
+ .&Apache::lonhtmlcommon::row_headline()
+ .$lt{'pleaserank'}
+ .&Apache::lonhtmlcommon::row_closure()
+ );
+
+ foreach my $key ('correct', 'helpful', 'depth', 'clear', 'technical') {
+ $r->print(
+ &Apache::lonhtmlcommon::row_title($lt{$key})
+ .'<select name="'.$key.'">'
+ .$standardoptions
+ .'</select>'
+ .&Apache::lonhtmlcommon::row_closure()
+ );
+ }
+
+ $r->print(
+ &Apache::lonhtmlcommon::row_title($lt{'comments'})
+ .'<textarea name="comments" cols="40" rows="5">'
+ .$oldcomments
+ .'</textarea>'
+ .&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;
}