From c565e735d491ce2547a56cfb83473a98ee97ef69 Mon Sep 17 00:00:00 2001 From: Jason Aubrey Date: Sun, 27 Jan 2013 21:02:40 -0600 Subject: [PATCH 1/5] update VERSION copyright years --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 56c7c41..6f441ac 100644 --- a/VERSION +++ b/VERSION @@ -1,3 +1,3 @@ $PG_VERSION ='2.5.1'; -$PG_COPYRIGHT_YEARS = '1996-2012'; +$PG_COPYRIGHT_YEARS = '1996-2013'; 1; From 35d6cfdbd50ff0383dc36df60e83911e78d53eca Mon Sep 17 00:00:00 2001 From: Jason Aubrey Date: Sun, 27 Jan 2013 21:03:34 -0600 Subject: [PATCH 2/5] Update copyrigth years --- README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README b/README index fa1d409..0fd707d 100644 --- a/README +++ b/README @@ -6,6 +6,6 @@ http://webwork.maa.org/wiki/Category:Release_Notes - Copyright 2000-2012, The WeBWorK Project + Copyright 2000-2013, The WeBWorK Project http://webwork.maa.org All rights reserved. From b400da9615ba9cddbb98fc21786135ce8bd974b5 Mon Sep 17 00:00:00 2001 From: Jason Aubrey Date: Sun, 27 Jan 2013 21:04:21 -0600 Subject: [PATCH 3/5] Update copyrigth years --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 22146f6..6ab34f8 100644 --- a/LICENSE +++ b/LICENSE @@ -2,7 +2,7 @@ Online Homework Delivery System Version 2.5.* - Copyright 2000-2012, The WeBWorK Project + Copyright 2000-2013, The WeBWorK Project All rights reserved. This program is free software; you can redistribute it and/or modify From f8558033608f96dc9dac1c1f806fe46a47904e68 Mon Sep 17 00:00:00 2001 From: Geoff Goehle Date: Mon, 11 Mar 2013 09:17:16 -0500 Subject: [PATCH 4/5] Backticks are picky about variables so they shouldn't be advertised to students in textovers. --- macros/PGessaymacros.pl | 35 ++++++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/macros/PGessaymacros.pl b/macros/PGessaymacros.pl index 2abf3bc..15d65e7 100644 --- a/macros/PGessaymacros.pl +++ b/macros/PGessaymacros.pl @@ -98,19 +98,20 @@ sub essay_cmp { sub NAMED_ESSAY_BOX { my($name,$row,$col) = @_; - $row = 10 unless defined($row); - $col = 80 unless defined($col); + $row = 8 unless defined($row); + $col = 75 unless defined($col); my $height = .07*$row; my $answer_value = ''; $answer_value = $inputs_ref->{$name} if defined( $inputs_ref->{$name} ); $name = RECORD_ANS_NAME($name, $answer_value); - $answer_value =~ tr/$@`//d; #`## make sure student answers can not be interpolated by e.g. EV3 + $answer_value =~ tr/$@//d; #`## make sure student answers can not be interpolated by e.g. EV3 - #### Answer Value needs to be sanitized, it could contain badness! + #### Answer Value needs to have special characters replaced by the html codes $answer_value =~ s/\\/\&\#92;/g; $answer_value =~ s//\>/g; + $answer_value =~ s/`/`/g; # Get rid of tabs since they mess up the past answer db $answer_value =~ s/\t/\ \ \ \ \ /; @@ -121,7 +122,7 @@ sub essay_cmp { Latex2HTML => qq!\\begin{rawhtml}\\end{rawhtml}!, HTML => qq! + WRAP="VIRTUAL" title="Enclose LaTeX expressions with \[ and \].">$answer_value ! ); @@ -129,11 +130,31 @@ sub essay_cmp { $out; } +sub essay_help { + + my $out = MODES( + TeX => '', + Latex2HTML => '', + HTML => qq! +

This is an essay answer text box. You can type your answer in here and, after you hit submit, + it will be saved so that your instructor can grade it at a later date. If your instructor makes + any comments on your answer those comments will appear on this page after the question has been + graded. You can use LaTeX to make your math equations look pretty. + LaTeX expressions should be enclosed with \[ + and \] like so, \[\frac{1}{x+2}\]. +

+ ! + ); + + $out; +} + + sub essay_box { my $row = shift; my $col =shift; - $row = 12 unless $row; - $col = 120 unless $col; + $row = 8 unless $row; + $col = 75 unless $col; my $name = NEW_ANS_NAME(); NAMED_ESSAY_BOX($name ,$row,$col); From 3bf742ccca5f19c63cadc8ddaee5180528579b2d Mon Sep 17 00:00:00 2001 From: Geoff Goehle Date: Mon, 11 Mar 2013 09:30:43 -0500 Subject: [PATCH 5/5] Fixed poor formatting for essay_help --- macros/PGessaymacros.pl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/macros/PGessaymacros.pl b/macros/PGessaymacros.pl index 15d65e7..5cfac62 100644 --- a/macros/PGessaymacros.pl +++ b/macros/PGessaymacros.pl @@ -122,7 +122,7 @@ sub essay_cmp { Latex2HTML => qq!\\begin{rawhtml}\\end{rawhtml}!, HTML => qq! + WRAP="VIRTUAL" title="Enclose LaTeX expressions with \( and \).">$answer_value ! ); @@ -140,8 +140,7 @@ sub essay_cmp { it will be saved so that your instructor can grade it at a later date. If your instructor makes any comments on your answer those comments will appear on this page after the question has been graded. You can use LaTeX to make your math equations look pretty. - LaTeX expressions should be enclosed with \[ - and \] like so, \[\frac{1}{x+2}\]. + LaTeX expressions should be enclosed using the parenthesis notation and not dollar signs.

! );