Index: openacs-4/packages/evaluation/www/admin/evaluations/grades-sheet-parse.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/evaluations/grades-sheet-parse.adp,v diff -u -r1.8 -r1.8.2.1 --- openacs-4/packages/evaluation/www/admin/evaluations/grades-sheet-parse.adp 3 Jul 2015 10:47:36 -0000 1.8 +++ openacs-4/packages/evaluation/www/admin/evaluations/grades-sheet-parse.adp 1 Dec 2016 13:01:22 -0000 1.8.2.1 @@ -1,28 +1,33 @@ <master> -<property name="doc(title)">@page_title;literal@</property> -<property name="context">@context;literal@</property> + <property name="doc(title)">@page_title;literal@</property> + <property name="context">@context;literal@</property> -<h2>#evaluation.lt_Confirm_your_evaluati#</h2> + <h2>#evaluation.lt_Confirm_your_evaluati#</h2> -<if @evaluations_gs:rowcount@ gt 0> - <form enctype="multipart/form-data" action="evaluate-students-2" method="post"> - @export_vars;noquote@ - - <table> - <multiple name="evaluations_gs"> - <if @evaluations_gs.rownum@ odd><table bgcolor="#EAF2FF"></if><else><table bgcolor="white"></else> - <tr><th align="right">#evaluation.Name#</th><td>@evaluations_gs.party_name@</td></tr> - <tr><th align="right">#evaluation.Grade#</th><td>@evaluations_gs.grade@ / @max_grade@</td></tr> - <tr><th align="right">#evaluation.CommentsEdit_reason#</th><td>@evaluations_gs.comment@</td></tr> - <tr><th align="right">#evaluation.Will_the_studens_be#<br> #evaluation.lt_able_to_see_the_grade#</th><td>@evaluations_gs.show_student@</td></tr> - </tr> - </table> - </multiple> - </table> - <div> - <input type="submit" value="#evaluation.Grade_1#"> <input type="button" value="#evaluation.Go_Back#" onClick="history.go(-1)"> - </div> - </form> -</if><else> -#evaluation.lt_There_is_no_info_# -</else> + <if @evaluations_gs:rowcount@ gt 0> + <form enctype="multipart/form-data" action="evaluate-students-2" method="post"> + @export_vars;noquote@ + + <table> + <multiple name="evaluations_gs"> + <if @evaluations_gs.rownum@ odd> + <table style="background-color: #EAF2FF;"> + </if> + <else> + <table style="background-color: white;"> + </else> + <tr><th style="text-align:right">#evaluation.Name#</th><td>@evaluations_gs.party_name@</td></tr> + <tr><th style="text-align:right">#evaluation.Grade#</th><td>@evaluations_gs.grade@ / @max_grade@</td></tr> + <tr><th style="text-align:right">#evaluation.CommentsEdit_reason#</th><td>@evaluations_gs.comment@</td></tr> + <tr><th style="text-align:right">#evaluation.Will_the_studens_be#<br> #evaluation.lt_able_to_see_the_grade#</th><td>@evaluations_gs.show_student@</td></tr> + </table> + </multiple> + </table> + <div> + <input type="submit" value="#evaluation.Grade_1#"> <input id="backbutton" type="button" value="#evaluation.Go_Back#"> + </div> + </form> + </if> + <else> + #evaluation.lt_There_is_no_info_# + </else> Index: openacs-4/packages/evaluation/www/admin/evaluations/grades-sheet-parse.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/evaluations/grades-sheet-parse.tcl,v diff -u -r1.16.2.1 -r1.16.2.2 --- openacs-4/packages/evaluation/www/admin/evaluations/grades-sheet-parse.tcl 12 Sep 2015 11:06:04 -0000 1.16.2.1 +++ openacs-4/packages/evaluation/www/admin/evaluations/grades-sheet-parse.tcl 1 Dec 2016 13:01:22 -0000 1.16.2.2 @@ -204,13 +204,18 @@ } } set evaluations_gs:rowcount $counter + + if {$counter > 0} { + template::add_event_listener -id "backbutton" -script {history.go(-1);} + } + set export_vars [export_vars -form { task_id max_grade grades_gs comments_gs show_student_gs item_ids new_p_gs grades_sheet_item_id tmp_filename upload_file }] # writing the file in the file system so we can work with it later flush $file_handler close $file_handler - if {[catch {exec mv $tmp_filename "${tmp_filename}_grades_sheet"} errmsg]} { + if {[catch {file rename -force -- $tmp_filename "${tmp_filename}_grades_sheet"} errmsg]} { ad_return_error "[_ evaluation.lt_Error_while_storing_f]" "[_ evaluation.lt_There_was_a_problem_s]" ad_script_abort }