You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(58) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(53) |
Feb
(56) |
Mar
|
Apr
|
May
(30) |
Jun
(78) |
Jul
(121) |
Aug
(155) |
Sep
(77) |
Oct
(61) |
Nov
(45) |
Dec
(94) |
2006 |
Jan
(116) |
Feb
(33) |
Mar
(11) |
Apr
(23) |
May
(60) |
Jun
(89) |
Jul
(130) |
Aug
(109) |
Sep
(124) |
Oct
(63) |
Nov
(82) |
Dec
(45) |
2007 |
Jan
(31) |
Feb
(35) |
Mar
(123) |
Apr
(36) |
May
(18) |
Jun
(134) |
Jul
(133) |
Aug
(241) |
Sep
(126) |
Oct
(31) |
Nov
(15) |
Dec
(5) |
2008 |
Jan
(11) |
Feb
(6) |
Mar
(16) |
Apr
(29) |
May
(43) |
Jun
(149) |
Jul
(27) |
Aug
(29) |
Sep
(37) |
Oct
(20) |
Nov
(4) |
Dec
(6) |
2009 |
Jan
(34) |
Feb
(30) |
Mar
(16) |
Apr
(6) |
May
(1) |
Jun
(32) |
Jul
(22) |
Aug
(7) |
Sep
(18) |
Oct
(50) |
Nov
(22) |
Dec
(8) |
2010 |
Jan
(17) |
Feb
(15) |
Mar
(10) |
Apr
(9) |
May
(67) |
Jun
(30) |
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
(1) |
Dec
|
From: dpvc v. a. <we...@ma...> - 2008-06-28 19:44:58
|
Log Message: ----------- Fixed problem with Union answer checker where incorrect error messages could be given when intervals needed to be checked for syntax errors. Also fixed some comments. Modified Files: -------------- pg/lib/Value: AnswerChecker.pm Revision Data ------------- Index: AnswerChecker.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/Value/AnswerChecker.pm,v retrieving revision 1.117 retrieving revision 1.118 diff -Llib/Value/AnswerChecker.pm -Llib/Value/AnswerChecker.pm -u -r1.117 -r1.118 --- lib/Value/AnswerChecker.pm +++ lib/Value/AnswerChecker.pm @@ -3,7 +3,7 @@ ############################################################# # - # Implements the ->cmp method for Value objects. + # Implements the ->cmp method for Value objects. # Otherwise known as MathObjects. This produces # an answer checker appropriate for the type of object. # Additional options can be passed to the cmp method to @@ -30,12 +30,12 @@ # Internal use. # Set default flags for the answer checker in this object -# showTypeWarnings => 1 -# showEqualErrors => 1 +# showTypeWarnings => 1 +# showEqualErrors => 1 # ignoreStrings => 1 # studentsMustReduceUnions => 1 -# show UnionReduceWarnings => 1 -# +# showUnionReduceWarnings => 1 +# =cut @@ -1172,9 +1172,10 @@ # partial credit. Set the various types for error # messages. # +my $typeMatchInterval = Value::Interval->make(0,1); sub cmp_defaults {( Value::List::cmp_defaults(@_), - typeMatch => 'Value::Interval', + typeMatch => $typeMatchInterval, list_type => 'an interval, set or union', short_type => 'a union', entry_type => 'an interval or set', @@ -1431,7 +1432,7 @@ $entry = $self->Package("Formula")->new($entry) if !Value::isValue($entry); # - # Some words differ if ther eis only one entry in the student's list + # Some words differ if there is only one entry in the student's list # my $nth = ''; my $answer = 'answer'; my $class = $ans->{list_type} || $ans->{cmp_class}; |
From: Arnie P. v. a. <we...@ma...> - 2008-06-27 15:53:19
|
Log Message: ----------- backport fix If WeBWorK is to be on the web server root, use "/". to patches release Tags: ---- rel-2-4-patches Modified Files: -------------- webwork2/conf: global.conf.dist Revision Data ------------- Index: global.conf.dist =================================================================== RCS file: /webwork/cvs/system/webwork2/conf/global.conf.dist,v retrieving revision 1.189.2.7.2.5 retrieving revision 1.189.2.7.2.6 diff -Lconf/global.conf.dist -Lconf/global.conf.dist -u -r1.189.2.7.2.5 -r1.189.2.7.2.6 --- conf/global.conf.dist +++ conf/global.conf.dist @@ -30,7 +30,7 @@ # Set these variables to correspond to your configuration and preferences. You # will need to restart the webserver to reset the variables in this section. -# URL of WeBWorK handler. If WeBWorK is to be on the web server root, use "". +# URL of WeBWorK handler. If WeBWorK is to be on the web server root, use "/". $webwork_url = "/webwork2"; # Root directory of PG. |
From: Arnie P. v. a. <we...@ma...> - 2008-06-27 15:42:38
|
Log Message: ----------- Fixed bug reported by Andrew Doe-stien: If WeBWorK is to be on the web server root, use "/". Modified Files: -------------- webwork2/conf: global.conf.dist Revision Data ------------- Index: global.conf.dist =================================================================== RCS file: /webwork/cvs/system/webwork2/conf/global.conf.dist,v retrieving revision 1.207 retrieving revision 1.208 diff -Lconf/global.conf.dist -Lconf/global.conf.dist -u -r1.207 -r1.208 --- conf/global.conf.dist +++ conf/global.conf.dist @@ -30,7 +30,7 @@ # Set these variables to correspond to your configuration and preferences. You # will need to restart the webserver to reset the variables in this section. -# URL of WeBWorK handler. If WeBWorK is to be on the web server root, use "". +# URL of WeBWorK handler. If WeBWorK is to be on the web server root, use "/". $webwork_url = "/webwork2"; # Root directory of PG. |
From: Mike G. v. a. <we...@ma...> - 2008-06-27 01:51:12
|
Log Message: ----------- adding welcome.msg to email Tags: ---- rel-2-4-patches Added Files: ----------- webwork2/courses.dist/modelCourse/templates/email: welcome.msg Revision Data ------------- --- /dev/null +++ courses.dist/modelCourse/templates/email/welcome.msg @@ -0,0 +1,25 @@ +From: ga...@ma... (MIKE GAGE) +Reply-To: ga...@ma... +Subject: maa101 notice +Message: + Hi $FN, + +Your course is at + +http://hosted.webwork.rochester.edu/webwork2/Floyd_math1111 + +Your login name is $LOGIN and your initial password is $LOGIN. + +You should change your password, once you have logged in, by clicking on the password/email link in the upper left + +Helpful urls are: http://webwork.math.rochester.edu/ (click on the logo) and the discussion group there. + +Also http://webwork.math.rochester.edu/docs/docs/courseadmin/usingwebwork.html + +although that is not completely up to date. Ask questions in the discussion group -- there is usually pretty quick response. + +Have fun. + +Take care, + +Mike |
From: Mike G. v. a. <we...@ma...> - 2008-06-27 01:49:27
|
Log Message: ----------- adding welcome.msg to email Added Files: ----------- webwork2/courses.dist/modelCourse/templates/email: welcome.msg Revision Data ------------- --- /dev/null +++ courses.dist/modelCourse/templates/email/welcome.msg @@ -0,0 +1,25 @@ +From: ga...@ma... (MIKE GAGE) +Reply-To: ga...@ma... +Subject: maa101 notice +Message: + Hi $FN, + +Your course is at + +http://hosted.webwork.rochester.edu/webwork2/Floyd_math1111 + +Your login name is $LOGIN and your initial password is $LOGIN. + +You should change your password, once you have logged in, by clicking on the password/email link in the upper left + +Helpful urls are: http://webwork.math.rochester.edu/ (click on the logo) and the discussion group there. + +Also http://webwork.math.rochester.edu/docs/docs/courseadmin/usingwebwork.html + +although that is not completely up to date. Ask questions in the discussion group -- there is usually pretty quick response. + +Have fun. + +Take care, + +Mike |
From: Mike G. v. a. <we...@ma...> - 2008-06-27 01:41:37
|
Log Message: ----------- moved from pg/macros Tags: ---- rel-2-4-patches Added Files: ----------- webwork2/courses.dist/modelCourse/templates/setOrientation: parserOrientation.pl Revision Data ------------- --- /dev/null +++ courses.dist/modelCourse/templates/setOrientation/parserOrientation.pl @@ -0,0 +1,229 @@ +#!/usr/local/bin/perl + +###################################################################### +# +# Macros used by the orientation problem set +# +###################################################################### + + +#loadMacros("PGcourse.pl"); + +# +# Special use of CARET to have it work in non-math mode +# +$CARET = MODES( + TeX => '\hbox{\texttt{\char`\^}}', + Latex2HTML => '^', + HTML => '^' +); + +# +# Functions to display student input and computer output +# (written as functions so that we change the style without +# recoding the problems themselves). +# +sub student { + my $message = shift; + MODES( + TeX => '\leavevmode\hbox{\texttt{'.$message.'}}', + Latex2HTML => + $bHTML.'<NOBR><TT>'.$eHTML.$message.$bHTML.'</TT></NOBR>'.$eHTML, + HTML => '<NOBR><TT>'.$message.'</TT></NOBR>' + ); +} + +sub computer { + my $message = shift; + MODES( + TeX => '\hbox{\texttt{'.$message.'}}', + Latex2HTML => + $bHTML.'<NOBR><TT>'.$eHTML.$message.$bHTML.'</TT></NOBR>'.$eHTML, + HTML => '<NOBR><TT>'.$message.'</TT></NOBR>' + ); +} + +# +# This prints things we need to fill in yet in red +# +sub moreWork { + my $message = shift; + MODES( + TeX => '{\sl ' . $message . '}', + Latex2HTML => $bHTML . '<FONT COLOR="#A00000">' . $eHTML . + $message . $bHTML . '</FONT>' . $eHTML, + HTML => '<FONT COLOR="#A00000">' . $message . '</FONT>' + ); +} + +# +# Temporary macros to mark comments in areas that we are +# working on. +# +$BCOMMENT = MODES( + TeX => '{\footnotesize\it', + Latex2HTML => $bHTML.'<BLOCKQUOTE><SMALL><I><FONT COLOR="#A00000">'.$eHTML, + HTML => '<BLOCKQUOTE><SMALL><I><FONT COLOR="#A00000">' +); + +$ECOMMENT = MODES( + TeX => '}', + Latex2HTML => $bHTML.'</FONT></I></SMALL></BLOCKQUOTE>'.$eHTML, + HTML => '</FONT></I></SMALL></BLOCKQUOTE>' +); + +# $BCOMMENT = MODES( +# TeX => '\iffalse', +# Latex2HTML => $bHTML.'<!-- '.$eHTML, +# HTML => '<!-- ' +# ); +# +# $ECOMMENT = MODES( +# TeX => '\fi', +# Latex2HTML => $bHTML.' -->'.$eHTML, +# HTML => ' -->' +# ); + + +# +# Hack to get better spacing in HTML_tth math mode but without +# messing up the spacing in other modes. +# +$SP = MODES( + TeX => ' ', Latex2HTML => ' ', + HTML => ' ', HTML_tth => '\ ', + HTML_jsMath => ' ', HTML_dpng => ' ', +); + + +# +# Special table macros for questions that have +# displayed math expressions equal to an answer rule, +# with an accompanying explanation on a separate line. +# + +sub BeginExamples { + return "" if ($displayMode eq "TeX"); + BeginTable(@_); +} + +sub EndExamples { + return "" if ($displayMode eq "TeX"); + EndTable(); +} + +@ExampleDefaults = (ans_rule_len => 40, ans_rule_height => 1); + +sub BeginExample { + my $math = shift; + my $ans = shift; + my %options = (@ExampleDefaults, @_); + my ($cols,$rows) = ($options{ans_rule_len},$options{ans_rule_height}); + my $rule; + + if ($rows == 1) {$rule = ans_rule($cols)} + else {$rule = ans_box($rows,$cols)} + ANS($ans); + + # + # HTML_tth puts an unwanted <BR> at the beginning, + # and uses a centered table. Remove the <BR> and + # align the table to the right. + # + if ($displayMode eq "HTML_tth") { + $math = trimString(EV2('\['.$math.'\]')); + $math =~ s!<br clear="all" />!!; + $math =~ s!table align="center"!table align="right"!; + } elsif ($displayMode eq "HTML") { + $math = '\('.$math.'\)' + } elsif ($displayMode =~ m/^HTML/) { + $math = '\(\displaystyle '.$math.'\)' + } + + MODES( + TeX => "\n".'\['.$math.'=\hbox to 8em{'.$rule.'}\]', + Latex2HTML => $bHTML.'<TR><TD ALIGN="RIGHT">'.$eHTML. + '\(\displaystyle '.$math.'\)'.$bHTML.'</TD><TD> = </TD>'. + '<TD>'.$eHTML.$rule.$bHTML.'</TD></TR>'. + '<TR><TD></TD><TD></TD><TD>'.$eHTML, + HTML => + '<TR><TD ALIGN="RIGHT">'.$math.'</TD><TD> = </TD>'. + '<TD>'.$rule.'</TD></TR><TR><TD COLSPAN="2"></TD><TD>' + ); +} + +sub EndExample { + MODES( + TeX => "\n", + Latex2HTML => $bHTML.'<BR><BR></TD></TR>'.$eHTML, + HTML => '<BR><BR></TD></TR>' + ); +} + +sub ExampleRule { + MODES( + TeX => '\par', + Latex2HTML => $bHTML.'<TR><TD COLSPAN="3"><HR></TD></TR>'.$eHTML, + HTML => '<TR><TD COLSPAN="3"><HR></TD></TR>' + ); +} + +# +# Produce a TeX version and an answer checker for the formula +# +sub DisplayQA {my $f = shift; return (DMATH($f->TeX),$f->cmp)} +sub QA {my $f = shift; return ($f->TeX,$f->cmp)} + +################################################## +# +# Insert an image of an equation (but use the equation +# in TeX mode). +# + +sub MathIMG { + my ($img,$text,$tex) = @_; + my $useTeX = MODES(TeX => 1, Latex2HTML => 0, HTML => 0, HTML_tth => 0, HTML_dpng => 1); + return '\('.$tex.'\)' if $useTeX; + $img = alias($img); + return qq{<IMG SRC="$img" BORDER="0" ALIGN="MIDDLE" ALT="$text">}; +} + + +################################################## +# +# A simple grader that always returns a score of 1. +# This is used in the tutorial to give students +# credit for reading a problem (even if it doesn't +# ask any questions). +# +sub forgiving_grader { + my $rh_evaluated_answers = shift; + my $rh_problem_state = shift; + my %form_options = @_; + my %evaluated_answers = %{$rh_evaluated_answers}; + my %problem_state = %{$rh_problem_state}; + + my %problem_result = ( + score => 1, # always return 1 + errors => '', + type => 'forgiving_grader', + msg => '', + ); + + return(\%problem_result,\%problem_state) + if (!$form_options{answers_submitted}); + + $problem_state{recorded_score} = $problem_result{score}; + $problem_state{num_of_correct_ans}++; + + (\%problem_result, \%problem_state); +} + +################################################## +# +# Syntactic sugar to avoid ugly ~~& construct in PG. +# +sub install_forgiving_grader {install_problem_grader(\&forgiving_grader)} + + +1; |
From: Mike G. v. a. <we...@ma...> - 2008-06-27 01:40:24
|
Log Message: ----------- moved from pg/macros Added Files: ----------- webwork2/courses.dist/modelCourse/templates/setOrientation: parserOrientation.pl Revision Data ------------- --- /dev/null +++ courses.dist/modelCourse/templates/setOrientation/parserOrientation.pl @@ -0,0 +1,229 @@ +#!/usr/local/bin/perl + +###################################################################### +# +# Macros used by the orientation problem set +# +###################################################################### + + +#loadMacros("PGcourse.pl"); + +# +# Special use of CARET to have it work in non-math mode +# +$CARET = MODES( + TeX => '\hbox{\texttt{\char`\^}}', + Latex2HTML => '^', + HTML => '^' +); + +# +# Functions to display student input and computer output +# (written as functions so that we change the style without +# recoding the problems themselves). +# +sub student { + my $message = shift; + MODES( + TeX => '\leavevmode\hbox{\texttt{'.$message.'}}', + Latex2HTML => + $bHTML.'<NOBR><TT>'.$eHTML.$message.$bHTML.'</TT></NOBR>'.$eHTML, + HTML => '<NOBR><TT>'.$message.'</TT></NOBR>' + ); +} + +sub computer { + my $message = shift; + MODES( + TeX => '\hbox{\texttt{'.$message.'}}', + Latex2HTML => + $bHTML.'<NOBR><TT>'.$eHTML.$message.$bHTML.'</TT></NOBR>'.$eHTML, + HTML => '<NOBR><TT>'.$message.'</TT></NOBR>' + ); +} + +# +# This prints things we need to fill in yet in red +# +sub moreWork { + my $message = shift; + MODES( + TeX => '{\sl ' . $message . '}', + Latex2HTML => $bHTML . '<FONT COLOR="#A00000">' . $eHTML . + $message . $bHTML . '</FONT>' . $eHTML, + HTML => '<FONT COLOR="#A00000">' . $message . '</FONT>' + ); +} + +# +# Temporary macros to mark comments in areas that we are +# working on. +# +$BCOMMENT = MODES( + TeX => '{\footnotesize\it', + Latex2HTML => $bHTML.'<BLOCKQUOTE><SMALL><I><FONT COLOR="#A00000">'.$eHTML, + HTML => '<BLOCKQUOTE><SMALL><I><FONT COLOR="#A00000">' +); + +$ECOMMENT = MODES( + TeX => '}', + Latex2HTML => $bHTML.'</FONT></I></SMALL></BLOCKQUOTE>'.$eHTML, + HTML => '</FONT></I></SMALL></BLOCKQUOTE>' +); + +# $BCOMMENT = MODES( +# TeX => '\iffalse', +# Latex2HTML => $bHTML.'<!-- '.$eHTML, +# HTML => '<!-- ' +# ); +# +# $ECOMMENT = MODES( +# TeX => '\fi', +# Latex2HTML => $bHTML.' -->'.$eHTML, +# HTML => ' -->' +# ); + + +# +# Hack to get better spacing in HTML_tth math mode but without +# messing up the spacing in other modes. +# +$SP = MODES( + TeX => ' ', Latex2HTML => ' ', + HTML => ' ', HTML_tth => '\ ', + HTML_jsMath => ' ', HTML_dpng => ' ', +); + + +# +# Special table macros for questions that have +# displayed math expressions equal to an answer rule, +# with an accompanying explanation on a separate line. +# + +sub BeginExamples { + return "" if ($displayMode eq "TeX"); + BeginTable(@_); +} + +sub EndExamples { + return "" if ($displayMode eq "TeX"); + EndTable(); +} + +@ExampleDefaults = (ans_rule_len => 40, ans_rule_height => 1); + +sub BeginExample { + my $math = shift; + my $ans = shift; + my %options = (@ExampleDefaults, @_); + my ($cols,$rows) = ($options{ans_rule_len},$options{ans_rule_height}); + my $rule; + + if ($rows == 1) {$rule = ans_rule($cols)} + else {$rule = ans_box($rows,$cols)} + ANS($ans); + + # + # HTML_tth puts an unwanted <BR> at the beginning, + # and uses a centered table. Remove the <BR> and + # align the table to the right. + # + if ($displayMode eq "HTML_tth") { + $math = trimString(EV2('\['.$math.'\]')); + $math =~ s!<br clear="all" />!!; + $math =~ s!table align="center"!table align="right"!; + } elsif ($displayMode eq "HTML") { + $math = '\('.$math.'\)' + } elsif ($displayMode =~ m/^HTML/) { + $math = '\(\displaystyle '.$math.'\)' + } + + MODES( + TeX => "\n".'\['.$math.'=\hbox to 8em{'.$rule.'}\]', + Latex2HTML => $bHTML.'<TR><TD ALIGN="RIGHT">'.$eHTML. + '\(\displaystyle '.$math.'\)'.$bHTML.'</TD><TD> = </TD>'. + '<TD>'.$eHTML.$rule.$bHTML.'</TD></TR>'. + '<TR><TD></TD><TD></TD><TD>'.$eHTML, + HTML => + '<TR><TD ALIGN="RIGHT">'.$math.'</TD><TD> = </TD>'. + '<TD>'.$rule.'</TD></TR><TR><TD COLSPAN="2"></TD><TD>' + ); +} + +sub EndExample { + MODES( + TeX => "\n", + Latex2HTML => $bHTML.'<BR><BR></TD></TR>'.$eHTML, + HTML => '<BR><BR></TD></TR>' + ); +} + +sub ExampleRule { + MODES( + TeX => '\par', + Latex2HTML => $bHTML.'<TR><TD COLSPAN="3"><HR></TD></TR>'.$eHTML, + HTML => '<TR><TD COLSPAN="3"><HR></TD></TR>' + ); +} + +# +# Produce a TeX version and an answer checker for the formula +# +sub DisplayQA {my $f = shift; return (DMATH($f->TeX),$f->cmp)} +sub QA {my $f = shift; return ($f->TeX,$f->cmp)} + +################################################## +# +# Insert an image of an equation (but use the equation +# in TeX mode). +# + +sub MathIMG { + my ($img,$text,$tex) = @_; + my $useTeX = MODES(TeX => 1, Latex2HTML => 0, HTML => 0, HTML_tth => 0, HTML_dpng => 1); + return '\('.$tex.'\)' if $useTeX; + $img = alias($img); + return qq{<IMG SRC="$img" BORDER="0" ALIGN="MIDDLE" ALT="$text">}; +} + + +################################################## +# +# A simple grader that always returns a score of 1. +# This is used in the tutorial to give students +# credit for reading a problem (even if it doesn't +# ask any questions). +# +sub forgiving_grader { + my $rh_evaluated_answers = shift; + my $rh_problem_state = shift; + my %form_options = @_; + my %evaluated_answers = %{$rh_evaluated_answers}; + my %problem_state = %{$rh_problem_state}; + + my %problem_result = ( + score => 1, # always return 1 + errors => '', + type => 'forgiving_grader', + msg => '', + ); + + return(\%problem_result,\%problem_state) + if (!$form_options{answers_submitted}); + + $problem_state{recorded_score} = $problem_result{score}; + $problem_state{num_of_correct_ans}++; + + (\%problem_result, \%problem_state); +} + +################################################## +# +# Syntactic sugar to avoid ugly ~~& construct in PG. +# +sub install_forgiving_grader {install_problem_grader(\&forgiving_grader)} + + +1; |
From: Mike G. v. a. <we...@ma...> - 2008-06-27 01:39:33
|
Log Message: ----------- Moved to modelCourse/templates/setOrientation Tags: ---- rel-2-4-patches Removed Files: ------------- pg/macros: parserOrientation.pl Revision Data ------------- --- macros/parserOrientation.pl +++ /dev/null @@ -1,229 +0,0 @@ -#!/usr/local/bin/perl - -###################################################################### -# -# Macros used by the orientation problem set -# -###################################################################### - - -#loadMacros("PGcourse.pl"); - -# -# Special use of CARET to have it work in non-math mode -# -$CARET = MODES( - TeX => '\hbox{\texttt{\char`\^}}', - Latex2HTML => '^', - HTML => '^' -); - -# -# Functions to display student input and computer output -# (written as functions so that we change the style without -# recoding the problems themselves). -# -sub student { - my $message = shift; - MODES( - TeX => '\leavevmode\hbox{\texttt{'.$message.'}}', - Latex2HTML => - $bHTML.'<NOBR><TT>'.$eHTML.$message.$bHTML.'</TT></NOBR>'.$eHTML, - HTML => '<NOBR><TT>'.$message.'</TT></NOBR>' - ); -} - -sub computer { - my $message = shift; - MODES( - TeX => '\hbox{\texttt{'.$message.'}}', - Latex2HTML => - $bHTML.'<NOBR><TT>'.$eHTML.$message.$bHTML.'</TT></NOBR>'.$eHTML, - HTML => '<NOBR><TT>'.$message.'</TT></NOBR>' - ); -} - -# -# This prints things we need to fill in yet in red -# -sub moreWork { - my $message = shift; - MODES( - TeX => '{\sl ' . $message . '}', - Latex2HTML => $bHTML . '<FONT COLOR="#A00000">' . $eHTML . - $message . $bHTML . '</FONT>' . $eHTML, - HTML => '<FONT COLOR="#A00000">' . $message . '</FONT>' - ); -} - -# -# Temporary macros to mark comments in areas that we are -# working on. -# -$BCOMMENT = MODES( - TeX => '{\footnotesize\it', - Latex2HTML => $bHTML.'<BLOCKQUOTE><SMALL><I><FONT COLOR="#A00000">'.$eHTML, - HTML => '<BLOCKQUOTE><SMALL><I><FONT COLOR="#A00000">' -); - -$ECOMMENT = MODES( - TeX => '}', - Latex2HTML => $bHTML.'</FONT></I></SMALL></BLOCKQUOTE>'.$eHTML, - HTML => '</FONT></I></SMALL></BLOCKQUOTE>' -); - -# $BCOMMENT = MODES( -# TeX => '\iffalse', -# Latex2HTML => $bHTML.'<!-- '.$eHTML, -# HTML => '<!-- ' -# ); -# -# $ECOMMENT = MODES( -# TeX => '\fi', -# Latex2HTML => $bHTML.' -->'.$eHTML, -# HTML => ' -->' -# ); - - -# -# Hack to get better spacing in HTML_tth math mode but without -# messing up the spacing in other modes. -# -$SP = MODES( - TeX => ' ', Latex2HTML => ' ', - HTML => ' ', HTML_tth => '\ ', - HTML_jsMath => ' ', HTML_dpng => ' ', -); - - -# -# Special table macros for questions that have -# displayed math expressions equal to an answer rule, -# with an accompanying explanation on a separate line. -# - -sub BeginExamples { - return "" if ($displayMode eq "TeX"); - BeginTable(@_); -} - -sub EndExamples { - return "" if ($displayMode eq "TeX"); - EndTable(); -} - -@ExampleDefaults = (ans_rule_len => 40, ans_rule_height => 1); - -sub BeginExample { - my $math = shift; - my $ans = shift; - my %options = (@ExampleDefaults, @_); - my ($cols,$rows) = ($options{ans_rule_len},$options{ans_rule_height}); - my $rule; - - if ($rows == 1) {$rule = ans_rule($cols)} - else {$rule = ans_box($rows,$cols)} - ANS($ans); - - # - # HTML_tth puts an unwanted <BR> at the beginning, - # and uses a centered table. Remove the <BR> and - # align the table to the right. - # - if ($displayMode eq "HTML_tth") { - $math = trimString(EV2('\['.$math.'\]')); - $math =~ s!<br clear="all" />!!; - $math =~ s!table align="center"!table align="right"!; - } elsif ($displayMode eq "HTML") { - $math = '\('.$math.'\)' - } elsif ($displayMode =~ m/^HTML/) { - $math = '\(\displaystyle '.$math.'\)' - } - - MODES( - TeX => "\n".'\['.$math.'=\hbox to 8em{'.$rule.'}\]', - Latex2HTML => $bHTML.'<TR><TD ALIGN="RIGHT">'.$eHTML. - '\(\displaystyle '.$math.'\)'.$bHTML.'</TD><TD> = </TD>'. - '<TD>'.$eHTML.$rule.$bHTML.'</TD></TR>'. - '<TR><TD></TD><TD></TD><TD>'.$eHTML, - HTML => - '<TR><TD ALIGN="RIGHT">'.$math.'</TD><TD> = </TD>'. - '<TD>'.$rule.'</TD></TR><TR><TD COLSPAN="2"></TD><TD>' - ); -} - -sub EndExample { - MODES( - TeX => "\n", - Latex2HTML => $bHTML.'<BR><BR></TD></TR>'.$eHTML, - HTML => '<BR><BR></TD></TR>' - ); -} - -sub ExampleRule { - MODES( - TeX => '\par', - Latex2HTML => $bHTML.'<TR><TD COLSPAN="3"><HR></TD></TR>'.$eHTML, - HTML => '<TR><TD COLSPAN="3"><HR></TD></TR>' - ); -} - -# -# Produce a TeX version and an answer checker for the formula -# -sub DisplayQA {my $f = shift; return (DMATH($f->TeX),$f->cmp)} -sub QA {my $f = shift; return ($f->TeX,$f->cmp)} - -################################################## -# -# Insert an image of an equation (but use the equation -# in TeX mode). -# - -sub MathIMG { - my ($img,$text,$tex) = @_; - my $useTeX = MODES(TeX => 1, Latex2HTML => 0, HTML => 0, HTML_tth => 0, HTML_dpng => 1); - return '\('.$tex.'\)' if $useTeX; - $img = alias($img); - return qq{<IMG SRC="$img" BORDER="0" ALIGN="MIDDLE" ALT="$text">}; -} - - -################################################## -# -# A simple grader that always returns a score of 1. -# This is used in the tutorial to give students -# credit for reading a problem (even if it doesn't -# ask any questions). -# -sub forgiving_grader { - my $rh_evaluated_answers = shift; - my $rh_problem_state = shift; - my %form_options = @_; - my %evaluated_answers = %{$rh_evaluated_answers}; - my %problem_state = %{$rh_problem_state}; - - my %problem_result = ( - score => 1, # always return 1 - errors => '', - type => 'forgiving_grader', - msg => '', - ); - - return(\%problem_result,\%problem_state) - if (!$form_options{answers_submitted}); - - $problem_state{recorded_score} = $problem_result{score}; - $problem_state{num_of_correct_ans}++; - - (\%problem_result, \%problem_state); -} - -################################################## -# -# Syntactic sugar to avoid ugly ~~& construct in PG. -# -sub install_forgiving_grader {install_problem_grader(\&forgiving_grader)} - - -1; |
From: Mike G. v. a. <we...@ma...> - 2008-06-27 01:38:44
|
Log Message: ----------- Moved to modelCourse/templates/setOrientation Removed Files: ------------- pg/macros: parserOrientation.pl Revision Data ------------- --- macros/parserOrientation.pl +++ /dev/null @@ -1,229 +0,0 @@ -#!/usr/local/bin/perl - -###################################################################### -# -# Macros used by the orientation problem set -# -###################################################################### - - -#loadMacros("PGcourse.pl"); - -# -# Special use of CARET to have it work in non-math mode -# -$CARET = MODES( - TeX => '\hbox{\texttt{\char`\^}}', - Latex2HTML => '^', - HTML => '^' -); - -# -# Functions to display student input and computer output -# (written as functions so that we change the style without -# recoding the problems themselves). -# -sub student { - my $message = shift; - MODES( - TeX => '\leavevmode\hbox{\texttt{'.$message.'}}', - Latex2HTML => - $bHTML.'<NOBR><TT>'.$eHTML.$message.$bHTML.'</TT></NOBR>'.$eHTML, - HTML => '<NOBR><TT>'.$message.'</TT></NOBR>' - ); -} - -sub computer { - my $message = shift; - MODES( - TeX => '\hbox{\texttt{'.$message.'}}', - Latex2HTML => - $bHTML.'<NOBR><TT>'.$eHTML.$message.$bHTML.'</TT></NOBR>'.$eHTML, - HTML => '<NOBR><TT>'.$message.'</TT></NOBR>' - ); -} - -# -# This prints things we need to fill in yet in red -# -sub moreWork { - my $message = shift; - MODES( - TeX => '{\sl ' . $message . '}', - Latex2HTML => $bHTML . '<FONT COLOR="#A00000">' . $eHTML . - $message . $bHTML . '</FONT>' . $eHTML, - HTML => '<FONT COLOR="#A00000">' . $message . '</FONT>' - ); -} - -# -# Temporary macros to mark comments in areas that we are -# working on. -# -$BCOMMENT = MODES( - TeX => '{\footnotesize\it', - Latex2HTML => $bHTML.'<BLOCKQUOTE><SMALL><I><FONT COLOR="#A00000">'.$eHTML, - HTML => '<BLOCKQUOTE><SMALL><I><FONT COLOR="#A00000">' -); - -$ECOMMENT = MODES( - TeX => '}', - Latex2HTML => $bHTML.'</FONT></I></SMALL></BLOCKQUOTE>'.$eHTML, - HTML => '</FONT></I></SMALL></BLOCKQUOTE>' -); - -# $BCOMMENT = MODES( -# TeX => '\iffalse', -# Latex2HTML => $bHTML.'<!-- '.$eHTML, -# HTML => '<!-- ' -# ); -# -# $ECOMMENT = MODES( -# TeX => '\fi', -# Latex2HTML => $bHTML.' -->'.$eHTML, -# HTML => ' -->' -# ); - - -# -# Hack to get better spacing in HTML_tth math mode but without -# messing up the spacing in other modes. -# -$SP = MODES( - TeX => ' ', Latex2HTML => ' ', - HTML => ' ', HTML_tth => '\ ', - HTML_jsMath => ' ', HTML_dpng => ' ', -); - - -# -# Special table macros for questions that have -# displayed math expressions equal to an answer rule, -# with an accompanying explanation on a separate line. -# - -sub BeginExamples { - return "" if ($displayMode eq "TeX"); - BeginTable(@_); -} - -sub EndExamples { - return "" if ($displayMode eq "TeX"); - EndTable(); -} - -@ExampleDefaults = (ans_rule_len => 40, ans_rule_height => 1); - -sub BeginExample { - my $math = shift; - my $ans = shift; - my %options = (@ExampleDefaults, @_); - my ($cols,$rows) = ($options{ans_rule_len},$options{ans_rule_height}); - my $rule; - - if ($rows == 1) {$rule = ans_rule($cols)} - else {$rule = ans_box($rows,$cols)} - ANS($ans); - - # - # HTML_tth puts an unwanted <BR> at the beginning, - # and uses a centered table. Remove the <BR> and - # align the table to the right. - # - if ($displayMode eq "HTML_tth") { - $math = trimString(EV2('\['.$math.'\]')); - $math =~ s!<br clear="all" />!!; - $math =~ s!table align="center"!table align="right"!; - } elsif ($displayMode eq "HTML") { - $math = '\('.$math.'\)' - } elsif ($displayMode =~ m/^HTML/) { - $math = '\(\displaystyle '.$math.'\)' - } - - MODES( - TeX => "\n".'\['.$math.'=\hbox to 8em{'.$rule.'}\]', - Latex2HTML => $bHTML.'<TR><TD ALIGN="RIGHT">'.$eHTML. - '\(\displaystyle '.$math.'\)'.$bHTML.'</TD><TD> = </TD>'. - '<TD>'.$eHTML.$rule.$bHTML.'</TD></TR>'. - '<TR><TD></TD><TD></TD><TD>'.$eHTML, - HTML => - '<TR><TD ALIGN="RIGHT">'.$math.'</TD><TD> = </TD>'. - '<TD>'.$rule.'</TD></TR><TR><TD COLSPAN="2"></TD><TD>' - ); -} - -sub EndExample { - MODES( - TeX => "\n", - Latex2HTML => $bHTML.'<BR><BR></TD></TR>'.$eHTML, - HTML => '<BR><BR></TD></TR>' - ); -} - -sub ExampleRule { - MODES( - TeX => '\par', - Latex2HTML => $bHTML.'<TR><TD COLSPAN="3"><HR></TD></TR>'.$eHTML, - HTML => '<TR><TD COLSPAN="3"><HR></TD></TR>' - ); -} - -# -# Produce a TeX version and an answer checker for the formula -# -sub DisplayQA {my $f = shift; return (DMATH($f->TeX),$f->cmp)} -sub QA {my $f = shift; return ($f->TeX,$f->cmp)} - -################################################## -# -# Insert an image of an equation (but use the equation -# in TeX mode). -# - -sub MathIMG { - my ($img,$text,$tex) = @_; - my $useTeX = MODES(TeX => 1, Latex2HTML => 0, HTML => 0, HTML_tth => 0, HTML_dpng => 1); - return '\('.$tex.'\)' if $useTeX; - $img = alias($img); - return qq{<IMG SRC="$img" BORDER="0" ALIGN="MIDDLE" ALT="$text">}; -} - - -################################################## -# -# A simple grader that always returns a score of 1. -# This is used in the tutorial to give students -# credit for reading a problem (even if it doesn't -# ask any questions). -# -sub forgiving_grader { - my $rh_evaluated_answers = shift; - my $rh_problem_state = shift; - my %form_options = @_; - my %evaluated_answers = %{$rh_evaluated_answers}; - my %problem_state = %{$rh_problem_state}; - - my %problem_result = ( - score => 1, # always return 1 - errors => '', - type => 'forgiving_grader', - msg => '', - ); - - return(\%problem_result,\%problem_state) - if (!$form_options{answers_submitted}); - - $problem_state{recorded_score} = $problem_result{score}; - $problem_state{num_of_correct_ans}++; - - (\%problem_result, \%problem_state); -} - -################################################## -# -# Syntactic sugar to avoid ugly ~~& construct in PG. -# -sub install_forgiving_grader {install_problem_grader(\&forgiving_grader)} - - -1; |
From: Mike G. v. a. <we...@ma...> - 2008-06-27 01:12:29
|
Log Message: ----------- forward port file path printing from rel-2-4-5 Modified Files: -------------- pg/macros: PGbasicmacros.pl Revision Data ------------- Index: PGbasicmacros.pl =================================================================== RCS file: /webwork/cvs/system/pg/macros/PGbasicmacros.pl,v retrieving revision 1.52 retrieving revision 1.53 diff -Lmacros/PGbasicmacros.pl -Lmacros/PGbasicmacros.pl -u -r1.52 -r1.53 --- macros/PGbasicmacros.pl +++ macros/PGbasicmacros.pl @@ -380,7 +380,7 @@ my $height = .07*$row; my $answer_value = ''; $answer_value = $inputs_ref->{$name} if defined( $inputs_ref->{$name} ); - $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 my $out = M3( qq!\\vskip $height in \\hrulefill\\quad !, qq!\\begin{rawhtml}<TEXTAREA NAME="$name" ROWS="$row" COLS="$col" @@ -1230,10 +1230,10 @@ # The order of arguments is TeX, Latex2HTML, HTML # Adopted Davide Cervone's improvements to PAR, LTS, GTS, LTE, GTE, LBRACE, RBRACE, LB, RB. 7-14-03 AKP sub PAR { MODES( TeX => '\\par ', Latex2HTML => '\\begin{rawhtml}<P>\\end{rawhtml}', HTML => '<P>'); }; -sub BR { MODES( TeX => '\\par\\noindent ', Latex2HTML => '\\begin{rawhtml}<BR>\\end{rawhtml}', HTML => '<BR>'); }; +#sub BR { MODES( TeX => '\\par\\noindent ', Latex2HTML => '\\begin{rawhtml}<BR>\\end{rawhtml}', HTML => '<BR>'); }; # Alternate definition of BR which is slightly more flexible and gives more white space in printed output # which looks better but kills more trees. -#sub BR { MODES( TeX => '\\leavevmode\\\\', Latex2HTML => '\\begin{rawhtml}<BR>\\end{rawhtml}', HTML => '<BR>'); }; +sub BR { MODES( TeX => '\\leavevmode\\\\\\relax ', Latex2HTML => '\\begin{rawhtml}<BR>\\end{rawhtml}', HTML => '<BR>'); }; sub LQ { MODES( TeX => "``", Latex2HTML => '"', HTML => '"' ); }; sub RQ { MODES( TeX => "''", Latex2HTML => '"', HTML => '"' ); }; sub BM { MODES(TeX => '\\(', Latex2HTML => '\\(', HTML => ''); }; # begin math mode @@ -1677,7 +1677,7 @@ $string = ev_substring($string,"\\\\{","\\\\}",\&safe_ev) if $options{processCommands}; if ($options{processVariables}) { my $eval_string = $string; - $eval_string =~ s/\$(?![a-z])/\${DOLLAR}/gi if $options{fixDollars}; + $eval_string =~ s/\$(?![a-z\{])/\${DOLLAR}/gi if $options{fixDollars}; my ($evaluated_string,$PG_eval_errors,$PG_full_errors) = PG_restricted_eval("<<END_OF_EVALUATION_STRING\n$eval_string\nEND_OF_EVALUATION_STRING\n"); if ($PG_eval_errors) { @@ -1791,7 +1791,14 @@ $points = 'pt' if $problemValue == 1; ## Prepare header for the problem grep($inlist{$_}++,@{ $envir->{'PRINT_FILE_NAMES_FOR'} }); - if ( defined($inlist{$envir->{studentLogin}}) and ($inlist{$envir->{studentLogin}} > 0) ) { + my $permissionLevel = $envir->{permissionLevel}; + my $PRINT_FILE_NAMES_PERMISSION_LEVEL = $envir->{'PRINT_FILE_NAMES_PERMISSION_LEVEL'}; + my $studentLogin = $envir->{studentLogin}; + my $print_path_name_flag = + (defined($permissionLevel) && defined($PRINT_FILE_NAMES_PERMISSION_LEVEL) && $permissionLevel >= $PRINT_FILE_NAMES_PERMISSION_LEVEL) + || ( defined($inlist{ $studentLogin }) and ( $inlist{ $studentLogin }>0 ) ) ; + + if ( $print_path_name_flag ) { $out = &M3("{\\bf ${probNum}. {\\footnotesize ($problemValue $points) $TeXFileName}}\\newline ", " \\begin{rawhtml} ($problemValue $points) <B>$l2hFileName</B><BR>\\end{rawhtml}", "($problemValue $points) <B>$fileName</B><BR>" |
From: Mike G. v. a. <we...@ma...> - 2008-06-27 01:02:59
|
Log Message: ----------- Allow file paths to be shown if user has high enough permissionLeve Tags: ---- rel-2-4-patches Modified Files: -------------- pg/macros: PGbasicmacros.pl Revision Data ------------- Index: PGbasicmacros.pl =================================================================== RCS file: /webwork/cvs/system/pg/macros/PGbasicmacros.pl,v retrieving revision 1.47.2.2.2.2 retrieving revision 1.47.2.2.2.3 diff -Lmacros/PGbasicmacros.pl -Lmacros/PGbasicmacros.pl -u -r1.47.2.2.2.2 -r1.47.2.2.2.3 --- macros/PGbasicmacros.pl +++ macros/PGbasicmacros.pl @@ -1791,7 +1791,14 @@ $points = 'pt' if $problemValue == 1; ## Prepare header for the problem grep($inlist{$_}++,@{ $envir->{'PRINT_FILE_NAMES_FOR'} }); - if ( defined($inlist{$envir->{studentLogin}}) and ($inlist{$envir->{studentLogin}} > 0) ) { + my $permissionLevel = $envir->{permissionLevel}; + my $PRINT_FILE_NAMES_PERMISSION_LEVEL = $envir->{'PRINT_FILE_NAMES_PERMISSION_LEVEL'}; + my $studentLogin = $envir->{studentLogin}; + my $print_path_name_flag = + (defined($permissionLevel) && defined($PRINT_FILE_NAMES_PERMISSION_LEVEL) && $permissionLevel >= $PRINT_FILE_NAMES_PERMISSION_LEVEL) + || ( defined($inlist{ $studentLogin }) and ( $inlist{ $studentLogin }>0 ) ) ; + + if ( $print_path_name_flag ) { $out = &M3("{\\bf ${probNum}. {\\footnotesize ($problemValue $points) $TeXFileName}}\\newline ", " \\begin{rawhtml} ($problemValue $points) <B>$l2hFileName</B><BR>\\end{rawhtml}", "($problemValue $points) <B>$fileName</B><BR>" |
From: Mike G. v. a. <we...@ma...> - 2008-06-27 01:02:04
|
Log Message: ----------- File path names are printed for any professor by default. The permission level for this can be set in global. Individual permission to see path names can also be given. File path names are printed for any professor. Tags: ---- rel-2-4-patches Modified Files: -------------- webwork2/conf: global.conf.dist Revision Data ------------- Index: global.conf.dist =================================================================== RCS file: /webwork/cvs/system/webwork2/conf/global.conf.dist,v retrieving revision 1.189.2.7.2.4 retrieving revision 1.189.2.7.2.5 diff -Lconf/global.conf.dist -Lconf/global.conf.dist -u -r1.189.2.7.2.4 -r1.189.2.7.2.5 --- conf/global.conf.dist +++ conf/global.conf.dist @@ -682,6 +682,7 @@ check_answers_after_due_date => "guest", check_answers_after_answer_date => "guest", create_new_set_version_when_acting_as_student => undef, + print_path_to_problem => "professor", # see "Special" PG environment variables record_set_version_answers_when_acting_as_student => undef, record_answers_when_acting_as_student => undef, # "record_answers_when_acting_as_student" takes precedence @@ -848,7 +849,10 @@ ##### "Special" PG environment variables. (Stuff that doesn't fit in anywhere else.) # Users for whom to print the file name of the PG file being processed. -$pg{specialPGEnvironmentVars}{PRINT_FILE_NAMES_FOR} = [ "professor", ]; +$pg{specialPGEnvironmentVars}{PRINT_FILE_NAMES_FOR} = [ "professor", ]; + # ie file paths are printed for 'gage' +$pg{specialPGEnvironmentVars}{PRINT_FILE_NAMES_PERMISSION_LEVEL} = $userRoles{ $permissionLevels{print_path_to_problem} }; + # (file paths are also printed for anyone with this permission or higher) # Locations of CAPA resources. (Only necessary if you need to use converted CAPA # problems.) |
From: dpvc v. a. <we...@ma...> - 2008-06-27 00:56:43
|
Log Message: ----------- Fix EV3P to handle ${...} variable names. Tags: ---- rel-2-4-patches Modified Files: -------------- pg/macros: PGbasicmacros.pl Revision Data ------------- Index: PGbasicmacros.pl =================================================================== RCS file: /webwork/cvs/system/pg/macros/PGbasicmacros.pl,v retrieving revision 1.47.2.2.2.1 retrieving revision 1.47.2.2.2.2 diff -Lmacros/PGbasicmacros.pl -Lmacros/PGbasicmacros.pl -u -r1.47.2.2.2.1 -r1.47.2.2.2.2 --- macros/PGbasicmacros.pl +++ macros/PGbasicmacros.pl @@ -380,7 +380,7 @@ my $height = .07*$row; my $answer_value = ''; $answer_value = $inputs_ref->{$name} if defined( $inputs_ref->{$name} ); - $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 my $out = M3( qq!\\vskip $height in \\hrulefill\\quad !, qq!\\begin{rawhtml}<TEXTAREA NAME="$name" ROWS="$row" COLS="$col" @@ -1230,10 +1230,10 @@ # The order of arguments is TeX, Latex2HTML, HTML # Adopted Davide Cervone's improvements to PAR, LTS, GTS, LTE, GTE, LBRACE, RBRACE, LB, RB. 7-14-03 AKP sub PAR { MODES( TeX => '\\par ', Latex2HTML => '\\begin{rawhtml}<P>\\end{rawhtml}', HTML => '<P>'); }; -sub BR { MODES( TeX => '\\par\\noindent ', Latex2HTML => '\\begin{rawhtml}<BR>\\end{rawhtml}', HTML => '<BR>'); }; +#sub BR { MODES( TeX => '\\par\\noindent ', Latex2HTML => '\\begin{rawhtml}<BR>\\end{rawhtml}', HTML => '<BR>'); }; # Alternate definition of BR which is slightly more flexible and gives more white space in printed output # which looks better but kills more trees. -#sub BR { MODES( TeX => '\\leavevmode\\\\', Latex2HTML => '\\begin{rawhtml}<BR>\\end{rawhtml}', HTML => '<BR>'); }; +sub BR { MODES( TeX => '\\leavevmode\\\\\\relax ', Latex2HTML => '\\begin{rawhtml}<BR>\\end{rawhtml}', HTML => '<BR>'); }; sub LQ { MODES( TeX => "``", Latex2HTML => '"', HTML => '"' ); }; sub RQ { MODES( TeX => "''", Latex2HTML => '"', HTML => '"' ); }; sub BM { MODES(TeX => '\\(', Latex2HTML => '\\(', HTML => ''); }; # begin math mode @@ -1677,7 +1677,7 @@ $string = ev_substring($string,"\\\\{","\\\\}",\&safe_ev) if $options{processCommands}; if ($options{processVariables}) { my $eval_string = $string; - $eval_string =~ s/\$(?![a-z])/\${DOLLAR}/gi if $options{fixDollars}; + $eval_string =~ s/\$(?![a-z\{])/\${DOLLAR}/gi if $options{fixDollars}; my ($evaluated_string,$PG_eval_errors,$PG_full_errors) = PG_restricted_eval("<<END_OF_EVALUATION_STRING\n$eval_string\nEND_OF_EVALUATION_STRING\n"); if ($PG_eval_errors) { |
From: Mike G. v. a. <we...@ma...> - 2008-06-26 20:13:11
|
Log Message: ----------- adding .css file for theme math2.css Tags: ---- rel-2-4-patches Added Files: ----------- webwork2/htdocs/css: math2.css Revision Data ------------- --- /dev/null +++ htdocs/css/math2.css @@ -0,0 +1,507 @@ +/* WeBWorK Online Homework Delivery System + * Copyright © 2000-2007 The WeBWorK Project, http://openwebwork.sf.net/ + * $CVSHeader: webwork2/htdocs/css/math2.css,v 1.1.2.1 2008/06/26 19:55:51 gage Exp $ + * + * This program is free software; you can redistribute it and/or modify it under + * the terms of either: (a) the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any later + * version, or (b) the "Artistic License" which comes with this package. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See either the GNU General Public License or the + * Artistic License for more details. + */ + +/* --- Standard elements ---------------------------------------------------- */ + +body { + background: white; + color: black; + margin: .5em .5em 0 .5em; /* MSIE ignores bottom margin; Gecko doesn't */ + padding: 0; + font-family: Times, serif; + min-width: 25em; +} + +h1, h2, h3, h4, h5, h6 { + font-family: "Trebuchet MS", "Arial", "Helvetica", sans-serif; + /* FIXME "You have no background-color with your color" */ + color: #225; + background: transparent; +} +h1 { font-size: 170%; } +h2 { font-size: 140%; padding-bottom: 0; margin-bottom: .5ex } +h3 { font-size: 120%; } +h4 { font-size: 110%; } +h5 { font-size: 105%; } +h6 { font-size: 105%; } + +a:link { color: #00e; background-color: inherit; } +a:visited { color: #808; background-color: inherit; } + +/* --- Miscellaneous classes ---------------------------------------------- */ + +/* show only to CSS-ignorant browsers */ +.for-broken-browsers { display: none } + +/* for hiding floats from Netscape 4.x */ +.float-left { float: left; } +.float-right { float: right; } + +/* --- Compound titles (class) ---------------------------------------------- */ + +/* WeBWorK is not using this, but it might be nice to have it around later */ + +/* "Split" title, with main heading left-aligned above a horizontal line, + * and subheading right-aligned below the line. Usage: + * + * <h1 class="compound">Alumni Newsletter</h1> + * <h2 class="compound">Spring '00</h2> + */ + +/*h1.compound { + border-bottom: 1px solid #559; + text-align: left; + padding: .5ex 0 0 0; + margin: 0; +} +h2.compound { float: right; margin: 0; padding: 0 }*/ + +/* --- Info box (class) ----------------------------------------------------- */ + +/* FIXME as a quick hack, the info() escape outputs a DIV with this class. + * don't let the placement of these styles fool you -- <div style="info-box"> + * is output by WeBWorK! */ + +/* Common style for a small box to hold supplemental info; typically this + * box will appear in a sidebar. Sample usage: + * + * <div class="info-box"> + * <h2>Announcements</h2> + * <ul> + * <li>foo</li> + * </ul> + * <a class="more" href="bar">Older announcements...</a> + * </div> + */ + +.info-box { + border: 1px solid #559; + /* FIXME: these aren't valid CSS, but they sure look nice :-P */ + border-radius-topright: 1.5ex; border-radius-topleft: 1.5ex; + -moz-border-radius-topright: 1.5ex; -moz-border-radius-topleft: 1.5ex; + margin-bottom: 1ex; + margin-top: 0; + overflow: hidden; +} +.info-box h2, +.info-box h3, +.info-box h4, +.info-box h5, +.info-box h6 { + /* FIXME: these aren't valid CSS, but they sure look nice :-P */ + border-radius-topright: 1.5ex; border-radius-topleft: 1.5ex; + -moz-border-radius-topright: 1.5ex; -moz-border-radius-topleft: 1.5ex; + border-bottom: 1px solid #559; + font-size: 100%; + text-align: center; + background: #88d; + color: white; + margin: 0; + padding: 0 .5em 0 .5em; +} +.info-box h2 a, +.info-box h3 a, +.info-box h4 a, +.info-box h5 a, +.info-box h6 a { + color: #fff; + background: inherit; +} +.info-box ul, +.info-box ol { + margin: 1ex .5em 1ex 0; + padding-left: 3.5em; + font-size: 80%; +} +.info-box dl { + margin: 1ex .5em 1ex 1ex; + padding: 0; + font-size: 80%; +} +.info-box li, +.info-box dt { + margin: 0 0 .5ex 0; + padding: 0; + line-height: 2.2ex; +} +.info-box dt { font-weight: bold } +.info-box dd { + margin: 0 0 .5ex 1em; + padding: 0; + line-height: 2.2ex; +} +.info-box dd p { + margin-top: 0; +} +.info-box a.more { + float: right; + font-size: 80%; + font-style: italic; + margin-bottom: 1ex; + margin-right: .5em; +} + +.Message { +background-color:#ddd; +} +/* --- Fisheye view (id) ---------------------------------------------------- */ + +/* The "fisheye" view: a hierarchical view of the website to show the + * user where they are in the document hierarchy. Provides more "lateral" + * information than breadcrumbs, but not as much as a full sitemap. To + * appear within the #site-navigation div. Inherits many of its attributes + * from class info-box, and overrides some. + */ + +#mini-sitemap, +#fisheye { + font-family: "Trebuchet MS", "Arial", "Helvetica", sans-serif; + padding: 0 0 1ex 0; +} +#mini-sitemap a, +#fisheye a { + text-decoration: none; +} +#mini-sitemap a:hover, +#fisheye a:hover { + text-decoration: underline; +} +#mini-sitemap li, +#fisheye li { + line-height: 2.5ex; + margin: 0; +} +#mini-sitemap ul, +#fisheye ul { + font-size: 90%; + list-style-type: none; + margin: 0 .1em .3ex .3em; + padding: 0; +} +#mini-sitemap ul ul, +#fisheye ul ul { + font-size: 90%; + margin-left: 0; +} +#mini-sitemap ul li, +#fisheye ul li { + font-weight: bold; +} +#mini-sitemap ul ul ul, +#fisheye ul ul ul { + font-size: 95%; + margin-left: .3em; + padding-left: .5em; + border-left: 1px dotted gray; +} +#mini-sitemap ul ul li a.active, +#fisheye ul ul li a.active { + font-weight: bold; + color: black; + background-color: inherit; +} +#mini-sitemap ul ul ul li, +#fisheye ul ul ul li { + font-weight: normal; +} +#mini-sitemap ul ul ul ul, +#fisheye ul ul ul ul { + font-size: 90%; +} +#mini-sitemap ul ul ul ul ul, +#fisheye ul ul ul ul ul { + font-size: 90%; +} + +/* --- Common layout elements for documents using templates ----------------- */ + +/* The "masthead" of our document that tells users what site they're on. + * It contains a logo-ish title and some basic site navigation. The + * masthead should appear at the top of the page, but we're not positioning + * it absolutely because we can't know its height in advance. Therefore this + * element should be placed at the very top of the <body> of our HTML document. + */ +#masthead { + font-family: "Trebuchet MS", "Arial", "Helvetica", sans-serif; + font-size: 100%; + margin: 0; + padding: 0; + color: #fff; + border: 1px solid #000; + background-color: #038; + /* [ww] we could have some sort of spider web image here. */ + /*background-image: url("/images/mandel-wide.jpg");*/ + background-repeat: repeat-x; + background-position: top left; +} +#masthead a { + /* FIXME "You have no background-color with your color" */ + color: #fff; + background: transparent; +} +/* [ww] since this is a logo and not text, we need borders that are the same + * width all the way around. after we find a nice background image, we can + * turn these back on. */ +/*#masthead #logo { padding: .5ex .2em .1ex .5em }*/ +#masthead #logo { padding: 1ex } +/* [ww] don't need these -- logo itself an image */ +/*#masthead #logo h1 { + background-image: none; + background-color: transparent; + font-size: 100%; + font-weight: normal; + padding: 0; + margin: 0; + white-space: nowrap; + line-height: 1.9ex; +}*/ +/*#masthead #logo h2 { + background-color: transparent; + background-image: none; + font-weight: bold; + font-size: 210%; + line-height: 1.9ex; + margin: 0; + padding: 0; +}*/ +/* [ww] instead of a search form, we want the loginstatus there */ +/*#masthead form {*/ +#masthead #loginstatus { + float: right; + padding: 0; + margin: 1ex .5em .1ex .1em; + font-size: smaller; +} +#masthead #loginstatus #Nav { + padding: 1ex; +} + +/* "big-wrapper" contains everything other than the masthead. It's merely + * a relatively positioned div that allows us to use absolute positioning + * on elements within it -- and because it's relatively positioned, + * absolutely positioned objects *stay* within it. + */ +#big-wrapper { + position: relative; + top: 1ex; + width: 100%; + min-width: 18em; + margin: 0; + border: 0; +} + +/* + * A simple list of "breadcrumbs" showing a path of links from the root of + * the site's hierarchy to our present location. We are not positioning + * this element absolutely, because we don't know in advance how tall it + * will be, and we might want to place content under it. So when coding + * our HTML document, we'll probably want to include this element right + * before the main content. + */ + +#breadcrumbs { + margin-left: 10.4em; + margin-right: 0; + padding: 0 .4em; + border: 1px solid #559; + background: #88d; + color: #fff; + text-align: left; + font-size: 100%; + font-family: "Trebuchet MS", "Arial", sans-serif; +} +#breadcrumbs a { + font-size: 100%; + white-space: nowrap; + background-color: inherit; + color: #fff; + text-decoration: none; +} +#breadcrumbs a.active { font-weight: bold; } +#breadcrumbs a:hover { text-decoration: underline; } + + +/* For the more CSS-compliant browsers, we'd like to provide site-wide + * navigation links (e.g., a mini site map) to appear in a column along + * the left side of the page, just below the masthead. This column is + * absolutely positioned, so that ideally we should be able to include its + * contents anywhere within the body of our HTML documents. However, we + * probably want to include this data at the END of our documents -- after + * the main content -- so that it doesn't interfere with document flow in + * browsers that don't understand CSS (e.g., lynx) -- or in browsers for + * which we've disabled CSS via some hack (e.g. Netscape Navigator 4.x). + * + * We consider this meta-information to be non-essential; it is NOT part of + * the content, and may not be displayed in some circumstances. + */ +#site-navigation { + position: absolute; + left: 0; + top: 0; + margin: 0; + padding: 0; + width: 9.8em; +} + +/* The primary information content of the document, excluding masthead and + * site navigation. We want to leave a wide left margin to prevent overlap + * with our site map, which will be displayed on the left-hand side of the + * screen. + */ +#content { + margin: .5em 0 0 10.4em; + padding: 0 0 0 0; + font-family: "Times", serif; + /* border-left: 1px dotted #bbf; */ +} +#content h1 { margin: .4ex 0; } /* for crappy MSIE */ + + +#footer { + /* white-space: nowrap; */ + clear: both; + /* border-top: 1px solid #559; */ + margin: 0 .5em .2ex 10.4em; + padding: 0; + font-family: "Trebuchet MS", "Arial", "Helvetica", sans-serif; +} +#copyright { font-size: 75%; margin: 0;} +#last-modified { + clear: both; + font-family: "Trebuchet MS", "Arial", "Helvetica", sans-serif; + font-size: 75%; + background-color: inherit; + color: #444; + margin: 1ex 0 0 0; + padding: 0; + border-bottom: 1px solid #559; +} + +/* --- WeBWorK classes ------------------------------------------------------ */ + +/* These classes are emitted by WeBWorK code and should appear in ANY WeBWorK + * template. they need not be implemented the same way in each template though. + * (These are mostly copied from ur.css right atm.) + */ + +/* the info escape emits a DIV with this id. (note that the same DIV has class + * "info-box" which is given above in the "template styles" section. Regardless, + * it is emitted by WW code in ProblemSet.pl (not in system.template) ! */ +#InfoPanel { + font-size:100%; + float: right; + width: 40%; + overflow: auto; + margin-right: -1px; + background-color: #fff; +} +#InfoPanel ol { + font-size:100%; +} + +/* tables used for laying out form fields shouldn't have a border */ +table.FormLayout { border: 0; } +table.FormLayout tr { vertical-align: top; } +table.FormLayout th.LeftHeader { text-align: right; white-space: nowrap; } +table.FormLayout tr.ButtonRow { text-align: left; } +table.FormLayout tr.ButtonRowCenter { text-align: center; } + +/* for problems which are rendered by themselves, e.g., by Set Maker */ +div.RenderSolo { background-color: #E0E0E0; color: black; } +div.AuthorComment { background-color: #00E0E0; color: black; } + +/* minimal style for lists of links (generated by the links escape) */ +/*ul.LinksMenu { list-style: none; margin-left: 0; padding-left: 0; }*/ +/*ul.LinksMenu ul { list-style: none; margin-left: 0.5em; padding-left: 0; }*/ + +/* background styles for success and failure messages */ +div.WarningMessage { background-color: #ffcccc; padding: 3px 3px 3px 3px; } +div.ResultsWithoutError { color: inherit; background-color: #8F8; } /* green */ +div.ResultsWithError { color: #C33; background-color: inherit; } /* red */ +div.ResultsAlert { color: #F60; background-color: inherit; } /* orange */ + +/* styles used by WeBWorK::HTML::ScrollingRecordList */ +div.ScrollingRecordList { padding: 1em; white-space: nowrap; border: thin solid gray; } +div.ScrollingRecordList select.ScrollingRecordList { width: 99%; } + +/* wraps the View Options form (generated by &optionsMacro) */ +/* FIXME: can't this style information just go in div.Options above? */ +div.viewOptions { font-size: small } + +/* messages, attempt results, answer previews, etc. go in this DIV */ +/* this used to be "float:left", but that was suspected of causing MSIE peekaboo bug */ +div.problemHeader {} + +/* styles for the attemptResults table */ +table.attemptResults { + border-style: outset; + border-width: 1px; + margin: 0px 10pt; + border-spacing: 1px; +} +table.attemptResults td, +table.attemptResults th { + border-style: inset; + border-width: 1px; + text-align: center; + /*width: 15ex;*/ /* this was erroniously commented out with "#" */ + padding: 2px 5px 2px 5px; + color: inherit; + background-color: #DDDDDD; +} +/* override above settings in tables used to display ans_array results */ +table.attemptResults td td, +table.attemptResults td th, +table.ArrayLayout td { + border-style: none; + border-width: 0px; + padding: 0px; +} +table.attemptResults td.Message { + text-align: left; + padding: 2px 5px 2px 5px; + width: auto; +} +.attemptResultsSummary { font-style: italic; } +.parsehilight { color: inherit; background-color: yellow; } + +/* the problem TEXT itself does in this box */ +/* we used to make this a grey box, but surprise, MSIE is bug-ridden. */ +div.problem { } + +/* jsMath emits this class when appropriate math fonts aren't available */ +div.NoFontMessage { + padding: 10px; + border-style: solid; + border-width: 3px; + border-color: #DD0000; + color: inherit; + background-color: #FFF8F8; + width: 75%; + text-align: left; + margin: 10px auto 10px 12%; +} + +/* text colors for published and unpublished sets */ +font.Published { font-style: normal; font-weight: normal; color: #000000; background-color: inherit; } /* black */ +font.Unpublished { font-style: italic; font-weight: normal; color: #aaaaaa; background-color: inherit; } /* light grey */ + +/* styles used when editing a temporary file */ +.temporaryFile { font-style: italic; color: #F60; background-color: inherit; } + +/* text colors for Auditing, Current, and Dropped students */ +.Audit { font-style: normal; color: purple; background-color: inherit; } +.Enrolled { font-weight: normal; color: black; background-color: inherit; } +.Drop { font-style: italic; color: gray; background-color: inherit; } |
From: Mike G. v. a. <we...@ma...> - 2008-06-26 20:12:33
|
Log Message: ----------- adding .css file for theme math2 Added Files: ----------- webwork2/htdocs/css: math2.css Revision Data ------------- --- /dev/null +++ htdocs/css/math2.css @@ -0,0 +1,507 @@ +/* WeBWorK Online Homework Delivery System + * Copyright © 2000-2007 The WeBWorK Project, http://openwebwork.sf.net/ + * $CVSHeader: webwork2/htdocs/css/math2.css,v 1.1 2008/06/26 19:55:13 gage Exp $ + * + * This program is free software; you can redistribute it and/or modify it under + * the terms of either: (a) the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any later + * version, or (b) the "Artistic License" which comes with this package. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See either the GNU General Public License or the + * Artistic License for more details. + */ + +/* --- Standard elements ---------------------------------------------------- */ + +body { + background: white; + color: black; + margin: .5em .5em 0 .5em; /* MSIE ignores bottom margin; Gecko doesn't */ + padding: 0; + font-family: Times, serif; + min-width: 25em; +} + +h1, h2, h3, h4, h5, h6 { + font-family: "Trebuchet MS", "Arial", "Helvetica", sans-serif; + /* FIXME "You have no background-color with your color" */ + color: #225; + background: transparent; +} +h1 { font-size: 170%; } +h2 { font-size: 140%; padding-bottom: 0; margin-bottom: .5ex } +h3 { font-size: 120%; } +h4 { font-size: 110%; } +h5 { font-size: 105%; } +h6 { font-size: 105%; } + +a:link { color: #00e; background-color: inherit; } +a:visited { color: #808; background-color: inherit; } + +/* --- Miscellaneous classes ---------------------------------------------- */ + +/* show only to CSS-ignorant browsers */ +.for-broken-browsers { display: none } + +/* for hiding floats from Netscape 4.x */ +.float-left { float: left; } +.float-right { float: right; } + +/* --- Compound titles (class) ---------------------------------------------- */ + +/* WeBWorK is not using this, but it might be nice to have it around later */ + +/* "Split" title, with main heading left-aligned above a horizontal line, + * and subheading right-aligned below the line. Usage: + * + * <h1 class="compound">Alumni Newsletter</h1> + * <h2 class="compound">Spring '00</h2> + */ + +/*h1.compound { + border-bottom: 1px solid #559; + text-align: left; + padding: .5ex 0 0 0; + margin: 0; +} +h2.compound { float: right; margin: 0; padding: 0 }*/ + +/* --- Info box (class) ----------------------------------------------------- */ + +/* FIXME as a quick hack, the info() escape outputs a DIV with this class. + * don't let the placement of these styles fool you -- <div style="info-box"> + * is output by WeBWorK! */ + +/* Common style for a small box to hold supplemental info; typically this + * box will appear in a sidebar. Sample usage: + * + * <div class="info-box"> + * <h2>Announcements</h2> + * <ul> + * <li>foo</li> + * </ul> + * <a class="more" href="bar">Older announcements...</a> + * </div> + */ + +.info-box { + border: 1px solid #559; + /* FIXME: these aren't valid CSS, but they sure look nice :-P */ + border-radius-topright: 1.5ex; border-radius-topleft: 1.5ex; + -moz-border-radius-topright: 1.5ex; -moz-border-radius-topleft: 1.5ex; + margin-bottom: 1ex; + margin-top: 0; + overflow: hidden; +} +.info-box h2, +.info-box h3, +.info-box h4, +.info-box h5, +.info-box h6 { + /* FIXME: these aren't valid CSS, but they sure look nice :-P */ + border-radius-topright: 1.5ex; border-radius-topleft: 1.5ex; + -moz-border-radius-topright: 1.5ex; -moz-border-radius-topleft: 1.5ex; + border-bottom: 1px solid #559; + font-size: 100%; + text-align: center; + background: #88d; + color: white; + margin: 0; + padding: 0 .5em 0 .5em; +} +.info-box h2 a, +.info-box h3 a, +.info-box h4 a, +.info-box h5 a, +.info-box h6 a { + color: #fff; + background: inherit; +} +.info-box ul, +.info-box ol { + margin: 1ex .5em 1ex 0; + padding-left: 3.5em; + font-size: 80%; +} +.info-box dl { + margin: 1ex .5em 1ex 1ex; + padding: 0; + font-size: 80%; +} +.info-box li, +.info-box dt { + margin: 0 0 .5ex 0; + padding: 0; + line-height: 2.2ex; +} +.info-box dt { font-weight: bold } +.info-box dd { + margin: 0 0 .5ex 1em; + padding: 0; + line-height: 2.2ex; +} +.info-box dd p { + margin-top: 0; +} +.info-box a.more { + float: right; + font-size: 80%; + font-style: italic; + margin-bottom: 1ex; + margin-right: .5em; +} + +.Message { +background-color:#ddd; +} +/* --- Fisheye view (id) ---------------------------------------------------- */ + +/* The "fisheye" view: a hierarchical view of the website to show the + * user where they are in the document hierarchy. Provides more "lateral" + * information than breadcrumbs, but not as much as a full sitemap. To + * appear within the #site-navigation div. Inherits many of its attributes + * from class info-box, and overrides some. + */ + +#mini-sitemap, +#fisheye { + font-family: "Trebuchet MS", "Arial", "Helvetica", sans-serif; + padding: 0 0 1ex 0; +} +#mini-sitemap a, +#fisheye a { + text-decoration: none; +} +#mini-sitemap a:hover, +#fisheye a:hover { + text-decoration: underline; +} +#mini-sitemap li, +#fisheye li { + line-height: 2.5ex; + margin: 0; +} +#mini-sitemap ul, +#fisheye ul { + font-size: 90%; + list-style-type: none; + margin: 0 .1em .3ex .3em; + padding: 0; +} +#mini-sitemap ul ul, +#fisheye ul ul { + font-size: 90%; + margin-left: 0; +} +#mini-sitemap ul li, +#fisheye ul li { + font-weight: bold; +} +#mini-sitemap ul ul ul, +#fisheye ul ul ul { + font-size: 95%; + margin-left: .3em; + padding-left: .5em; + border-left: 1px dotted gray; +} +#mini-sitemap ul ul li a.active, +#fisheye ul ul li a.active { + font-weight: bold; + color: black; + background-color: inherit; +} +#mini-sitemap ul ul ul li, +#fisheye ul ul ul li { + font-weight: normal; +} +#mini-sitemap ul ul ul ul, +#fisheye ul ul ul ul { + font-size: 90%; +} +#mini-sitemap ul ul ul ul ul, +#fisheye ul ul ul ul ul { + font-size: 90%; +} + +/* --- Common layout elements for documents using templates ----------------- */ + +/* The "masthead" of our document that tells users what site they're on. + * It contains a logo-ish title and some basic site navigation. The + * masthead should appear at the top of the page, but we're not positioning + * it absolutely because we can't know its height in advance. Therefore this + * element should be placed at the very top of the <body> of our HTML document. + */ +#masthead { + font-family: "Trebuchet MS", "Arial", "Helvetica", sans-serif; + font-size: 100%; + margin: 0; + padding: 0; + color: #fff; + border: 1px solid #000; + background-color: #038; + /* [ww] we could have some sort of spider web image here. */ + /*background-image: url("/images/mandel-wide.jpg");*/ + background-repeat: repeat-x; + background-position: top left; +} +#masthead a { + /* FIXME "You have no background-color with your color" */ + color: #fff; + background: transparent; +} +/* [ww] since this is a logo and not text, we need borders that are the same + * width all the way around. after we find a nice background image, we can + * turn these back on. */ +/*#masthead #logo { padding: .5ex .2em .1ex .5em }*/ +#masthead #logo { padding: 1ex } +/* [ww] don't need these -- logo itself an image */ +/*#masthead #logo h1 { + background-image: none; + background-color: transparent; + font-size: 100%; + font-weight: normal; + padding: 0; + margin: 0; + white-space: nowrap; + line-height: 1.9ex; +}*/ +/*#masthead #logo h2 { + background-color: transparent; + background-image: none; + font-weight: bold; + font-size: 210%; + line-height: 1.9ex; + margin: 0; + padding: 0; +}*/ +/* [ww] instead of a search form, we want the loginstatus there */ +/*#masthead form {*/ +#masthead #loginstatus { + float: right; + padding: 0; + margin: 1ex .5em .1ex .1em; + font-size: smaller; +} +#masthead #loginstatus #Nav { + padding: 1ex; +} + +/* "big-wrapper" contains everything other than the masthead. It's merely + * a relatively positioned div that allows us to use absolute positioning + * on elements within it -- and because it's relatively positioned, + * absolutely positioned objects *stay* within it. + */ +#big-wrapper { + position: relative; + top: 1ex; + width: 100%; + min-width: 18em; + margin: 0; + border: 0; +} + +/* + * A simple list of "breadcrumbs" showing a path of links from the root of + * the site's hierarchy to our present location. We are not positioning + * this element absolutely, because we don't know in advance how tall it + * will be, and we might want to place content under it. So when coding + * our HTML document, we'll probably want to include this element right + * before the main content. + */ + +#breadcrumbs { + margin-left: 10.4em; + margin-right: 0; + padding: 0 .4em; + border: 1px solid #559; + background: #88d; + color: #fff; + text-align: left; + font-size: 100%; + font-family: "Trebuchet MS", "Arial", sans-serif; +} +#breadcrumbs a { + font-size: 100%; + white-space: nowrap; + background-color: inherit; + color: #fff; + text-decoration: none; +} +#breadcrumbs a.active { font-weight: bold; } +#breadcrumbs a:hover { text-decoration: underline; } + + +/* For the more CSS-compliant browsers, we'd like to provide site-wide + * navigation links (e.g., a mini site map) to appear in a column along + * the left side of the page, just below the masthead. This column is + * absolutely positioned, so that ideally we should be able to include its + * contents anywhere within the body of our HTML documents. However, we + * probably want to include this data at the END of our documents -- after + * the main content -- so that it doesn't interfere with document flow in + * browsers that don't understand CSS (e.g., lynx) -- or in browsers for + * which we've disabled CSS via some hack (e.g. Netscape Navigator 4.x). + * + * We consider this meta-information to be non-essential; it is NOT part of + * the content, and may not be displayed in some circumstances. + */ +#site-navigation { + position: absolute; + left: 0; + top: 0; + margin: 0; + padding: 0; + width: 9.8em; +} + +/* The primary information content of the document, excluding masthead and + * site navigation. We want to leave a wide left margin to prevent overlap + * with our site map, which will be displayed on the left-hand side of the + * screen. + */ +#content { + margin: .5em 0 0 10.4em; + padding: 0 0 0 0; + font-family: "Times", serif; + /* border-left: 1px dotted #bbf; */ +} +#content h1 { margin: .4ex 0; } /* for crappy MSIE */ + + +#footer { + /* white-space: nowrap; */ + clear: both; + /* border-top: 1px solid #559; */ + margin: 0 .5em .2ex 10.4em; + padding: 0; + font-family: "Trebuchet MS", "Arial", "Helvetica", sans-serif; +} +#copyright { font-size: 75%; margin: 0;} +#last-modified { + clear: both; + font-family: "Trebuchet MS", "Arial", "Helvetica", sans-serif; + font-size: 75%; + background-color: inherit; + color: #444; + margin: 1ex 0 0 0; + padding: 0; + border-bottom: 1px solid #559; +} + +/* --- WeBWorK classes ------------------------------------------------------ */ + +/* These classes are emitted by WeBWorK code and should appear in ANY WeBWorK + * template. they need not be implemented the same way in each template though. + * (These are mostly copied from ur.css right atm.) + */ + +/* the info escape emits a DIV with this id. (note that the same DIV has class + * "info-box" which is given above in the "template styles" section. Regardless, + * it is emitted by WW code in ProblemSet.pl (not in system.template) ! */ +#InfoPanel { + font-size:100%; + float: right; + width: 40%; + overflow: auto; + margin-right: -1px; + background-color: #fff; +} +#InfoPanel ol { + font-size:100%; +} + +/* tables used for laying out form fields shouldn't have a border */ +table.FormLayout { border: 0; } +table.FormLayout tr { vertical-align: top; } +table.FormLayout th.LeftHeader { text-align: right; white-space: nowrap; } +table.FormLayout tr.ButtonRow { text-align: left; } +table.FormLayout tr.ButtonRowCenter { text-align: center; } + +/* for problems which are rendered by themselves, e.g., by Set Maker */ +div.RenderSolo { background-color: #E0E0E0; color: black; } +div.AuthorComment { background-color: #00E0E0; color: black; } + +/* minimal style for lists of links (generated by the links escape) */ +/*ul.LinksMenu { list-style: none; margin-left: 0; padding-left: 0; }*/ +/*ul.LinksMenu ul { list-style: none; margin-left: 0.5em; padding-left: 0; }*/ + +/* background styles for success and failure messages */ +div.WarningMessage { background-color: #ffcccc; padding: 3px 3px 3px 3px; } +div.ResultsWithoutError { color: inherit; background-color: #8F8; } /* green */ +div.ResultsWithError { color: #C33; background-color: inherit; } /* red */ +div.ResultsAlert { color: #F60; background-color: inherit; } /* orange */ + +/* styles used by WeBWorK::HTML::ScrollingRecordList */ +div.ScrollingRecordList { padding: 1em; white-space: nowrap; border: thin solid gray; } +div.ScrollingRecordList select.ScrollingRecordList { width: 99%; } + +/* wraps the View Options form (generated by &optionsMacro) */ +/* FIXME: can't this style information just go in div.Options above? */ +div.viewOptions { font-size: small } + +/* messages, attempt results, answer previews, etc. go in this DIV */ +/* this used to be "float:left", but that was suspected of causing MSIE peekaboo bug */ +div.problemHeader {} + +/* styles for the attemptResults table */ +table.attemptResults { + border-style: outset; + border-width: 1px; + margin: 0px 10pt; + border-spacing: 1px; +} +table.attemptResults td, +table.attemptResults th { + border-style: inset; + border-width: 1px; + text-align: center; + /*width: 15ex;*/ /* this was erroniously commented out with "#" */ + padding: 2px 5px 2px 5px; + color: inherit; + background-color: #DDDDDD; +} +/* override above settings in tables used to display ans_array results */ +table.attemptResults td td, +table.attemptResults td th, +table.ArrayLayout td { + border-style: none; + border-width: 0px; + padding: 0px; +} +table.attemptResults td.Message { + text-align: left; + padding: 2px 5px 2px 5px; + width: auto; +} +.attemptResultsSummary { font-style: italic; } +.parsehilight { color: inherit; background-color: yellow; } + +/* the problem TEXT itself does in this box */ +/* we used to make this a grey box, but surprise, MSIE is bug-ridden. */ +div.problem { } + +/* jsMath emits this class when appropriate math fonts aren't available */ +div.NoFontMessage { + padding: 10px; + border-style: solid; + border-width: 3px; + border-color: #DD0000; + color: inherit; + background-color: #FFF8F8; + width: 75%; + text-align: left; + margin: 10px auto 10px 12%; +} + +/* text colors for published and unpublished sets */ +font.Published { font-style: normal; font-weight: normal; color: #000000; background-color: inherit; } /* black */ +font.Unpublished { font-style: italic; font-weight: normal; color: #aaaaaa; background-color: inherit; } /* light grey */ + +/* styles used when editing a temporary file */ +.temporaryFile { font-style: italic; color: #F60; background-color: inherit; } + +/* text colors for Auditing, Current, and Dropped students */ +.Audit { font-style: normal; color: purple; background-color: inherit; } +.Enrolled { font-weight: normal; color: black; background-color: inherit; } +.Drop { font-style: italic; color: gray; background-color: inherit; } |
From: Mike G. v. a. <we...@ma...> - 2008-06-26 20:03:22
|
Log Message: ----------- forward porting from rel-2-4-5 Added Files: ----------- webwork2/conf/templates/math2: gateway.template math2.css system.template Revision Data ------------- |
From: Mike G. v. a. <we...@ma...> - 2008-06-26 19:57:31
|
Log Message: ----------- backporting from HEAD VS: ---------------------------------------------------------------------- Tags: ---- rel-2-4-patches Added Files: ----------- webwork2/courses.dist/modelCourse/templates/setOrientation/prob05: prob05-a.gif prob05-b.gif prob05-c.gif prob05.pg Revision Data ------------- --- /dev/null +++ courses.dist/modelCourse/templates/setOrientation/prob05/prob05.pg @@ -0,0 +1,131 @@ +DOCUMENT(); # This should be the first executable line in the problem. + +loadMacros( + "PGstandard.pl", + "PGchoicemacros.pl", + "MathObjects.pl", + "PGunion.pl", + "alignedChoice.pl", + "../parserOrientation.pl", + "PGcourse.pl", +); + +$showPartialCorrectAnswers = 1; + +TEXT(beginproblem); + +Title("Common Errors to Avoid"); + +############################################## + +BEGIN_TEXT + +Many of the answers you enter into $WW will be expressions +that involve variables. Here are some important things to know. + +$PAR + +\{BeginParList("UL")\} + +$ITEM +It matters what letter you use. For example, if you are asked for a +function using the variable \(x\), then it won't work to enter the +function with the variable \(t\). Also, $WW considers upper- and +lower-case letters to be different, so don't use the capital letter +\{student "X"\} in place of the lower-case letter \{student "x"\}. +The following blank is expecting the +function \(x^3\), which you would enter as \{student "x${CARET}3"\} or +\{student "x**3"\}. Instead, try entering \{student "t${CARET}3"\} and +submitting your answer. + +$PAR +$BBLOCKQUOTE +\{ans_rule(10)\} +$EBLOCKQUOTE +$PAR + +You should get an error message informing you that \{computer "t"\} +is not defined in this context. This tells you that $WW did not receive the +correct variable and doesn't know how to check your answer. Now enter +\{student "x${CARET}3"\} and resubmit to get credit for this part of +the problem. + +END_TEXT + +ANS(Formula("x^3")->cmp); + +################################################## + +$IMGA = MathIMG("prob05-a.gif","1/x+1","1/x+1"); +$IMGB = MathIMG("prob05-b.gif","1/(x+1)","\frac{1}{x+1}"); +$IMGC = MathIMG("prob05-c.gif","(1/x)+1","\frac{1}{x} + 1"); + +BEGIN_TEXT + +$ITEM +$WW requires that you be precise in how you think about and present +your answer. We have just seen that you need to be careful about the +variables that you use. You must be equally careful about how the +rules of precedence apply to your answers. Often, this involves using +parentheses appropriately. + +$PAR + +For example, you might write $IMGA on your paper when you meant $IMGB, +but that is actually incorrect. The expression $IMGA means $IMGC, +according to the rules of precedence. $WW will force you to be exact +in what you are thinking and in what you are writing, because it must +interpret your answers according to the standard rules. If you want +to enter something that means $IMGB, you must write \{student +"1/(x+1)"\}. This also is true in written work, so making a habit of +being precise about this will improve your written mathematics as well +as your ability to enter answers quickly and correctly in $WW. + +$PAR +END_TEXT + +################################################## + +BEGIN_TEXT + +\{EndParList("UL")\} + +$PAR +$HR +$PAR + +Now enter the following functions: +$PAR +END_TEXT + +$al = new_aligned_list( + equals => 1, ans_rule_len => 30, + tex_spacing => "5pt", spacing => 10 +); + +Context("Numeric")->variables->are(t=>'Real'); $t = Formula("t"); +Context("Numeric")->variables->are(y=>'Real'); $y = Formula("y"); +Context("Numeric")->variables->are(x=>'Real'); $x = Formula("x"); + +$al->qa( + DisplayQA($t/(2*$t+6)), +# DisplayQA(2*$y*($y**2-$y+1)), +# DisplayQA(1/$x**2 - 3*(1/$x)), + DisplayQA(1/(2*($x-5))), + DisplayQA((2*$x-3)**4), +); + +BEGIN_TEXT + +$BBLOCKQUOTE +\{$al->print_q\} +$EBLOCKQUOTE + +END_TEXT + +ANS($al->correct_ans); + + +############################################## + +ENDDOCUMENT(); # This should be the last executable line in the problem. |
From: Mike G. v. a. <we...@ma...> - 2008-06-26 19:56:27
|
Log Message: ----------- backporting setOrientation from head Tags: ---- rel-2-4-patches Added Files: ----------- webwork2/courses.dist/modelCourse/templates/setOrientation: course_info.txt login_info.txt options_info.txt prob01.pg prob02.pg prob03.pg prob04.pg prob06.pg prob07.pg prob08.pg prob09.pg prob10.pg prob11.pg prob12.pg prob13.pg prob15.pg setHeader.pg webwork2/courses.dist/modelCourse/templates/setOrientation/prob14: prob14-hint.html prob14.gif prob14.pg Revision Data ------------- --- /dev/null +++ courses.dist/modelCourse/templates/setOrientation/prob08.pg @@ -0,0 +1,159 @@ +DOCUMENT(); # This should be the first executable line in the problem. + +loadMacros( + "PGstandard.pl", + "MathObjects.pl", + "PGunion.pl", + "parserOrientation.pl", + "PGcourse.pl", +); + + +Context("Numeric")->variables->are(y=>'Real'); $y = Formula('y'); +Context("Numeric")->variables->are(x=>'Real'); $x = Formula('x'); + +$showPartialCorrectAnswers = 1; + +TEXT(beginproblem); + +Title("Rules of Precedence (Again)"); + +############################################## + +$Explanation = "${BITALIC}Explanation${EITALIC}"; +$Moral = "${BITALIC}Moral${EITALIC}"; + +BEGIN_TEXT + +At this point, we can give the complete rules of precedence for +how $WW computes the value of a mathematical formula. The operations +are handled in the following order: +$PAR + +\{BeginList\} +$ITEM Evaluate expressions within parentheses. +$ITEM Evaluate functions such as \{student "sin(x)"\}, +\{student "cos(x)"\}, \{student "log(x)"\}, \{student "sqrt(x)"\}. +$ITEM Perform exponentiation (from right to left). +$ITEM Perform multiplication and division, (from left to right). +$ITEM Perform addition and subtraction, (from left to right). +\{EndList\} +$PAR + +This can get a little subtle, so be careful. The following are some +typical traps for $WW users. +$PAR + +\{BeginParList("UL")\} + +$ITEM +$WW interprets \{student "sin 2x"\} to mean \((\sin${SP}2)*x\) +$PAR + +$Explanation: Rule 2 tells you that $WW does evaluation of functions +(like \{student "sin"\}) before multiplication. Thus $WW first +computes \(\sin${SP}2\), and then multiplies the result by \(x\). +$PAR + +$Moral: You must type \{student "sin(2x)"\} for the sine of \(2x\), +even though we often write it as \(\sin${SP}2x\). +Get in the habit of using parentheses for all your trigonometric +functions. +$PAR + +Now enter the following function: +$PAR +$BBLOCKQUOTE +The cosine of \(5x\) is entered as \{ans_rule(15)\}. +$EBLOCKQUOTE +$PAR + +END_TEXT + +ANS(cos(5*$x)->cmp); + +BEGIN_TEXT + +$ITEM +$WW interprets \{student "cos t${CARET}3"\} to mean \((\cos${SP}t)^3\) +$PAR + +$Explanation: Rule 2 tells you that $WW does evaluation of functions +(like \{student "cos"\}) before exponentiation. Thus $WW first +computes \(\cos${SP}t\) and then raises the result to the power 3. +$PAR + +$Moral: You must type in \{student "cos(t${CARET}3)"\} if you mean the +cosine of \(t^3\), even though we sometimes write it as \(\cos${SP}t^3\). +$PAR + +Now enter the following function: +$PAR +$BBLOCKQUOTE +The tangent of \(y^4\) is entered as \{ans_rule(15)\}. +$EBLOCKQUOTE +$PAR + +END_TEXT + +ANS(tan($y**4)->cmp); + +BEGIN_TEXT + +$ITEM +In mathematics, we often write \(\sin^2${SP}x\) to mean \((\sin x)^2\). +$WW will let you write \{student "sin${CARET}2(x)"\} for this, though +it is probably better to type \{student "(sin(x))${CARET}2"\} instead, +as this makes your intention clearer. Note that a power of \(-1\), as +in \{student "sin${CARET}(-1)(x)"\}, is a special case; it indicates the +${BITALIC}inverse${EITALIC} function \{student "arcsin(x)"\} rather +than a power. +$PAR + +Now enter the following function: +$PAR +$BBLOCKQUOTE +\(\sin^2${SP}x + \cos^3${SP}x\) = \{ans_rule(30)\} +$EBLOCKQUOTE +$PAR + +END_TEXT + +ANS((sin($x)**2 + cos($x)**3)->cmp); + +BEGIN_TEXT + +$ITEM +\{student "e${CARET}3x"\} means \((e^3) x\) and not \(e^{(3x)}\) $PAR +$PAR + +$Explanation: Rule 3 says that $WW does exponentiation before multiplication. +Thus $WW first computes \{student "e${CARET}3"\}, with the result +\(e^3\), and then multiplies the result by \(x\). +$PAR + +$Moral: Always put parentheses around an exponent. +Type \{student "e${CARET}(3x)"\} if you want \(e^{3x}\). +$PAR + +Now enter the following function: +$PAR +$BBLOCKQUOTE +\(2^{4x^3}\) = \{ans_rule(30)\} +$EBLOCKQUOTE +$PAR + +END_TEXT + +ANS((2**(4*($x**3)))->cmp); + +BEGIN_TEXT + +\{EndParList("UL")\} + + +END_TEXT + +############################################## + +ENDDOCUMENT(); # This should be the last executable line in the problem. --- /dev/null +++ courses.dist/modelCourse/templates/setOrientation/prob09.pg @@ -0,0 +1,114 @@ +DOCUMENT(); # This should be the first executable line in the problem. + +loadMacros( + "PGstandard.pl", + "MathObjects.pl", + "PGunion.pl", + "parserOrientation.pl", + "PGcourse.pl", +); + +$showPartialCorrectAnswers = 1; + +TEXT(beginproblem); + +Title("Non-Numeric Answers"); + +############################################## + +BEGIN_TEXT + +Sometimes you will be asked to enter answers that are not numbers. +For example, if you are asked to determine a limit, the answer may be +that the limit does not exist, so you might have to type \{student +"DNE"\} to indicate this (the problem should tell you what word to +use). Note that upper- and lower-case letters are not the same to +$WW, so you will need to enter the answer exactly as indicated in the +problem. (Well written problems will allow the answer to be +entered either way.) +$PAR + +$BBLOCKQUOTE +Please enter ${LQ}\{student "DNE"\}${RQ} here: \{ans_rule(10)\}. +$EBLOCKQUOTE + +END_TEXT + +ANS(String('DNE')->cmp); + +################################################## + +BEGIN_TEXT + +Other problems may require you to enter \(\infty\), which you do using +the word ${LQ}\{student "INFINITY"\}${RQ} (in upper- or lower-case) or +${LQ}\{student "INF"\}${RQ} for short. The problem should remind you +of how to do this. Note that most operations are not defined on +infinity, so you can't add or multiply something by infinity. You +can, however, indicate \(-\infty\) by ${LQ}\{student "-INFINITY"\}${RQ}, +or ${LQ}\{student "-INF"\}${RQ}. +$PAR + +$BBLOCKQUOTE +Try entering \(-\infty\) here: \{ans_rule(10)\}. +$EBLOCKQUOTE + +END_TEXT + +ANS((-(Infinity))->cmp); + +################################################## + +Context("Interval"); + +$a = random(-5,5,1); +$I = Compute("(-infinity,$a)"); + +BEGIN_TEXT + +One common place where you use \(\infty\) is as an endpoint of +an interval. $WW allows you to enter intervals using standard +interval notation, including infinite endpoints. For example, +\{student "[-2,5)"\} represents an interval that is closed on the +left and open on the right, while \{student "[2,inf)"\} is an interval +that extends infinitely to the right. +$PAR + +$BBLOCKQUOTE +Write the interval of points that are less than \($a\): \{ans_rule(20)\}. +$EBLOCKQUOTE + +END_TEXT + +ANS($I->cmp); + +################################################## + +Context("Interval"); + +$a = random(-8,-2,1); +$b = random($a+1,$a+5,1); +$c = random($b+1,$b+5,1); +$I = Compute("[$a,$b) U ($b,$c)"); + +BEGIN_TEXT + +Several intervals can be combined into one region using the ${LQ}set +union${RQ} operation, \(\cup\), which is represented as ${LQ}\{student +"U"\}${RQ} in $WW. For example, \{student "[-2,0] U (8,inf)"\} +represents the points from \(-2\) to \(0\) together with everything +bigger than 8. +$PAR + +$BBLOCKQUOTE +Write the set of points from \($a\) to \($c\) but excluding \($b\) and \($c\) +as a union of intervals: \{ans_rule(20)\}. +$EBLOCKQUOTE + +END_TEXT + +ANS($I->cmp); + +################################################## + +ENDDOCUMENT(); # This should be the last executable line in the problem. --- /dev/null +++ courses.dist/modelCourse/templates/setOrientation/login_info.txt @@ -0,0 +1,20 @@ +<FONT SIZE="+1"><B>Welcome to WeBWorK!</B></FONT> + +<P ALIGN="JUSTIFY"> + +Your username is the same as the one used for your Union College +email, and your initial password is your Union College Student ID +number (you will change that after you log in). + +<P ALIGN="JUSTIFY"> + +Log in and follow the instructions that will appear in this panel once +you have done so. For the first assignment, <I>do not</I> log in as a +guest user or using a friend's account. If you do, you will not +receive credit for doing the asignment! + +<P ALIGN="JUSTIFY"> + +On future assignments, you can use the guest accounts to get +additional practice problems that are similar to the ones in your +homework set, but with different numbers. --- /dev/null +++ courses.dist/modelCourse/templates/setOrientation/prob01.pg @@ -0,0 +1,82 @@ +DOCUMENT(); # This should be the first executable line in the problem. + +loadMacros( + "PGstandard.pl", + "PGunion.pl", + "parserOrientation.pl", + "PGcourse.pl", +); + + +TEXT(beginproblem); + +Title("Understanding $WW Problem Pages"); + +############################################## +BEGIN_TEXT + +The $WW screen is divided into several areas, each used for a +different purpose. You will need to understand these +in order to use $WW effectively. +$PAR + +At the upper left are the navigation buttons that allow you to move +from problem to problem. The ${LQ}Next$RQ and ${LQ}Previous$RQ +buttons, naturally, send you to the next and previous problems. The +${LQ}Prob. List$RQ button takes you back to the opening +page for the homework set (the one that lists all the problems and +gives the instructions for the homework set). +$PAR + +The area below the navigation buttons is where $WW tells you about +your score for the current problem. When you have submitted your +answers, this is where you will be given information about what +answers you got right and wrong. (It will be shown on a grey +backgound to help make it stand out; you will see this later.) This +area also shows you how many points a problem is worth. +$PAR + +The main part of the page is the text of the problem you are trying to +answer, including blank boxes for you to enter your answers. (There +aren't any such boxes on this page, because you are not being asked +any questions here, but usually there will be one or more answer blanks +on a page.) +$PAR + +Below the problem text is a message area where you may be informed +about how partial credit is handled in multi-part problems. Other +information also may appear there, such as a message indicating that +the due date is passed, or that answers are available. +$PAR + +In the red panel at the left, instead of the list of homework sets, you +now have a list of the problems within this assignment. You can go to +any problem just by clicking on it. The checkboxes at the bottom of +the panel are discussed in the next problem. +$PAR + +In the center of the top red panel is an indication of how much time +you have left to work on the problems for this set. Note that this is +computed at the moment you downloaded the problem page; if you use the +${LQ}Back$RQ and ${LQ}Forward$RQ buttons on your browser, this does +not reload the page, so the times will not be updated. Reload the +page using your browser's Reload or Refresh buttons to get the current +time. +$PAR + +The buttons at the bottom of the screen, including the ${LQ}Submit +Answers$RQ button, are discussed in the next problem. At this point, +you can get credit for Problem 1 by pressing the ${LQ}Submit +Answers$RQ button at the bottom of the page (even though there was no +answer to submit), and then pressing the ${LQ}Next$RQ button at the +top of the screen to go on to the next problem. + +END_TEXT + + +install_forgiving_grader(); +$showPartialCorrectAnswers = 1; + +############################################## + +ENDDOCUMENT(); # This should be the last executable line in the problem. --- /dev/null +++ courses.dist/modelCourse/templates/setOrientation/prob04.pg @@ -0,0 +1,96 @@ +DOCUMENT(); # This should be the first executable line in the problem. + +loadMacros( + "PGstandard.pl", + "PGchoicemacros.pl", + "MathObjects.pl", + "PGunion.pl", + "alignedChoice.pl", + "contextLimitedNumeric.pl", + "parserOrientation.pl", + "PGcourse.pl", +); + +$showPartialCorrectAnswers = 1; + +TEXT(beginproblem); + +Title("Rules of Precedence"); + +############################################## + +BEGIN_TEXT + +The rules of precedence determine the order in which the mathematical +operations are performed by $WW. It is essential for you to understand +these so that you know how $WW interprets what you type in. If there +are no parentheses and no functions (such as \{computer "sin"\} or +\{computer "log"\}), then $WW computes the value of your answer by +performing exponentiation first, followed by multiplication and division +(from left to right), and finally addition and subtraction +(from left to right). +$PAR + +If there are expressions within parentheses, those expressions are +simplified first. We'll talk about functions (and give a more +complete list of rules) in a later problem. + +$PAR +Examples: +\{BeginList("UL")\} +$ITEM +\{student "4*3/6 = 12/6 = 2"\} (multiplications and divisions are done +from left to right), and \{student "2*7 = 14"\}, so +\{student "4*3/6-2*7+10 = 2 - 14 + 10 = -2"\}. +$ITEM +\{student "12/3/2 = 4/2 = 2"\} (multiplications and divisions are done +from left to right). +$ITEM +\{student "12/(3/2) = 12/1.5 = 8"\} +(expressions inside parentheses are calculated before anything else). +$ITEM +\{student "2*4${CARET}2 = 2*16 = 32"\} (exponentiation is done before multiplication), +so \{student "2*4${CARET}2 - 3*4 = 2*16 - 3*4 = 32 - 12 = 20"\}. +\{EndList("UL")\} +$PAR + +To practice these rules, completely simplify the following +expressions. Because the point of this problem is for you to do the +numerical calculations correctly, $WW will only accept sufficiently +accurate decimal numbers as the answers to these problems. +It will not simplify any expressions, including fractions. +$PAR + +END_TEXT + +$a = random(1,6,1); +$b = random(2,6,1); +$c = random(3,6,1); +$d = random(2,25,1); +$al = new_aligned_list(equals => 1); + +$al->qa( + computer("$a+$b*$c"), Real($a+($b*$c))->cmp, +# computer("($a+$b)*$c"), Real(($a+$b)*$c)->cmp, +# computer("($a+$b)/$c"), Real(($a+$b)/$c)->cmp, +# computer("$a+$b/$c"), Real($a+($b/$c))->cmp, + computer("$a/$b*$c"), Real(($a/$b)*$c)->cmp, +# computer("$a/($b*$c)"), Real($a/($b*$c))->cmp, +# computer("$a/$b/$c"), Real(($a/$b)/$c)->cmp, + computer("3*$b-$a/5*$c+$d"), Real((3*$b)-(($a/5)*$c)+$d)->cmp, + computer("2${CARET}$b+1"), Real((2**$b)+1)->cmp, + computer("2${CARET}($b+1)"), Real(2**($b+1))->cmp, +); + +BEGIN_TEXT +$BBLOCKQUOTE +\{$al->print_q\} +$EBLOCKQUOTE + +END_TEXT + +ANS($al->correct_ans); + +############################################## + +ENDDOCUMENT(); # This should be the last executable line in the problem. --- /dev/null +++ courses.dist/modelCourse/templates/setOrientation/prob06.pg @@ -0,0 +1,130 @@ +DOCUMENT(); # This should be the first executable line in the problem. + +loadMacros( + "PGstandard.pl", + "MathObjects.pl", + "PGunion.pl", + "parserOrientation.pl", + "PGcourse.pl", +); + + +$showPartialCorrectAnswers = 1; + +Context("Numeric")->variables->are(y=>'Real'); $y = Formula('y'); +Context("Numeric")->variables->are(x=>'Real'); $x = Formula('x'); +Context()->flags->set(limits=>[0,2]); + +TEXT(beginproblem); + +Title("Using Parentheses Effectively"); + +############################################## + +BEGIN_TEXT + +One of the hardest parts about using parentheses is making sure that +they match up correctly. Here are a couple of hints to help you with +this: + +$PAR +END_TEXT + +$BRACES = HTML('{}','\char`\{\char`\}'); + +BEGIN_TEXT + +\{BeginParList("UL")\} + +$ITEM +Several types of parentheses are allowed: \{student "()"\}, +\{student "[]"\}, and \{student $BRACES\}. When you need to nest +parentheses inside other parentheses, try using a different type for +each so that you can see more easily which ones match up. +$ITEMSEP + +$ITEM +When you type a left parenthesis, type the corresponding right +parenthesis at the same time, then position your cursor between them and +type the expression that goes inside. This can save you a +lot of time hunting for mismatched parentheses. +$ITEMSEP + +$ITEM +When you have a complicated answer, type a template for +the structure of your result first. For example, suppose that you are +planning to enter the fraction +\[\frac{2x^2-5}{(x+1)(3x^{3x} - 22)}.\] +A good way to start would be to type in \{student "()/[()*()]"\}. +This shows a template of one number divided by the product of two +other numbers. (Note that \{student "()/()*()"\} would not be a good +way to start; do you see why?) Now when you fill in the expressions, you +will be sure your parentheses balance correctly. +$PAR + +Although $WW understands that numbers written next to each other are +meant to be multiplied (so you do not have to use \{student "*"\} to +indicate multiplication if you don't want to), it is often useful for +you to include the \{student "*"\} anyway, as it helps you keep track +of the structure of your answer. +$PAR + +$ITEM +To see how $WW is interpreting what you type, enter your answer and +then click the ${LQ}Preview Answers$RQ button, which is next to the +${LQ}Submit Answers$RQ button below. $WW will show you what it thinks +you entered (the preview appears in your answer area at the top of the +page). Previewing your answer does not submit it for credit; that only +happens when you press the ${LQ}Submit Answers$RQ button. +$ITEMSEP + +$ITEM +When division or exponentiation are involved, it is a good idea to +use parentheses even in simple situations, rather than relying on the +order of operations. For example, 1/2x and (1/2)x both mean the same +thing (first divide 1 by 2, then multiply the result by x), but the +second makes it easier to see what is going on. Likewise, use +parentheses to clarify expressions involving exponentiation. Type +\{student "(e${CARET}x)${CARET}2"\} if you mean \((e^x)^2\), and type +\{student "e${CARET}(x${CARET}2)"\} if you mean \(e^{(x^2)}\). + +\{EndParList("UL")\} + +$PAR +$HR +$PAR + +Now enter the following functions: + +$BBLOCKQUOTE + +\{@ExampleDefaults = (ans_rule_len => 50, ans_rule_height => 1); + BeginExamples\} + +\{BeginExample(QA(($x**(2*$x-1))/(($x**2-$x)*(3*$x+5))))\} +Start with the template \{student "[x${CARET}()]/[()*()]"\}. +\{EndExample\} +\{ExampleRule\} + +\{BeginExample(QA((($y+3)*($y**3+$y+1))/((2*$y**2-2)*(5*$y+4))))\} +Start by putting in an appropriate template. This means that you +should begin by looking at the function and thinking about how many +pieces are used to construct it and how those pieces are related. +Once you have entered your answer, try using the ${LQ}Preview$RQ button +to see how $WW is interpreting your answer. +\{EndExample\} +\{ExampleRule\} + +\{BeginExample(QA((($x+1)/($x-2))**4))\} +Start by putting in an appropriate template. +\{EndExample\} + +\{EndExamples\} + +$EBLOCKQUOTE + +END_TEXT + +############################################## + +ENDDOCUMENT(); # This should be the last executable line in the problem. --- /dev/null +++ courses.dist/modelCourse/templates/setOrientation/prob11.pg @@ -0,0 +1,71 @@ +DOCUMENT(); # This should be the first executable line in the problem. + +loadMacros( + "PGstandard.pl", + "MathObjects.pl", + "PGunion.pl", + "parserOrientation.pl", + "PGcourse.pl", +); + +$showPartialCorrectAnswers = 1; + +TEXT(beginproblem); + +Title("Multiple Answers in One Blank"); + +############################################## + +Context("Numeric"); + +$a = random(1,5,1); +$f = Formula("1/(x^2-$a^2)")->reduce; + +Context()->texStrings; +BEGIN_TEXT + +You may sometimes be asked to provide more than one answer in a single +answer blank. For example, you may need to enter all the values where +a function is not defined. In this case, you should separate your +answers by commas. Such an answer is called a +${BITALIC}list${EITALIC} in $WW. Note that you need not enter +multiple answers for a list; a single number is a legal answer (there +might only be one point where the function is undefined, for +instance). +$PAR + +$BBLOCKQUOTE +The function \(\displaystyle f(x)=$f\) is not defined at these \(x\) values: \{ans_rule(20)\}. +$EBLOCKQUOTE + +END_TEXT +Context()->normalStrings; + +ANS(List($a,-$a)->cmp); + +################################################## + +$a = random(1,5,1); +$f = Formula("1/(x^2+$a^2)")->reduce; + +Context()->texStrings; +BEGIN_TEXT + +When you are asked for a list of numbers, another possible answer is +that there are ${BITALIC}no${EITALIC} numbers that satisfy the +requirements. In that case, you should enter ${LQ}\{student +"NONE"\}${RQ} as your answer. +$PAR + +$BBLOCKQUOTE +The function \(\displaystyle f(x)=$f\) is not defined at these \(x\) values: \{ans_rule(20)\}. +$EBLOCKQUOTE + +END_TEXT +Context()->normalStrings; + +ANS(String('NONE')->cmp); + +################################################## + +ENDDOCUMENT(); # This should be the last executable line in the problem. --- /dev/null +++ courses.dist/modelCourse/templates/setOrientation/prob02.pg @@ -0,0 +1,108 @@ +DOCUMENT(); # This should be the first executable line in the problem. + +loadMacros( + "PGstandard.pl", + "PGunion.pl", + "parserOrientation.pl", + "PGcourse.pl", +); + + +TEXT(beginproblem); + +Title("Controlling $WW"); + +############################################## + +BEGIN_TEXT + +The buttons at the bottom of the screen are what cause $WW to process +your answers. Nothing that you type will have any effect until you +press one of these buttons. +$PAR + +The ${LQ}Submit Answers$RQ button causes $WW to check your answers and +report your score for the problem. You can continue to work on a +problem until you get it right, so don't be afraid to submit your +answer even if you have only finished parts of the problem or are +not sure of the correctness of your answer. If the due date is +passed and the answers are available, you can click the ${LQ}Show +Correct Answers$RQ button before pressing ${LQ}Submit$RQ. +If you do, the correct answer(s) will be displayed in the answer area +at the top of the screen along with the answers you have provided. +$PAR + +If you have typed in a complicated answer, or are being told your +answer is incorrect when you think it's right, you may want to use the +${LQ}Preview Answer$RQ button. This will ask $WW to display at the +top of the page its interpretation of what you have entered. This +can be used to help spot errors in your typing, and verify that $WW +understands your answer the way you intend it to. (This is discussed +further in a later problem.) +$PAR + +At the bottom of the red panel at the left is a box that allows you to +change how the problem is displayed. The equations within the problem +can be represented in three different ways: + +\{BeginParList("UL")\} + +$ITEM +${LQ}images${RQ} mode is the default choice (what $WW uses unless you tell +it otherwise). It produces the accurate mathematical notation, +with the disadvantages of being slightly slower, and not printing well +if you want to print out a single problem. +$ITEMSEP + +$ITEM +${LQ}formatted-text${RQ} mode produces results quickly, but more +complicated mathematics may be difficult to read in this +mode. For example, some fractions and integrals are not easy to read +in formatted-text mode. +$ITEMSEP + +$ITEM +${LQ}jsMath${RQ} mode uses a JavaScript program and Cascading Style +Sheets (CSS) to display the mathematics. This produces good results, +and is particularly nice if you need to change the size of the fonts +in your browser or wish to print out a single problem. For best +results, however, you should download and install some fonts that +jsMath uses; there is a link to the fonts on the jsMath control panel, +which you can activate using the small jsMath button that will appear +at the lower right of the screen when you activate this mode. The +first problem you view using jsMath may take a little longer to +appear, as the JavaScript program is being loaded into your browser, +but things should run faster after that. + +\{EndParList("UL")\} +$PAR + +Choose whichever mode is most comfortable for you. You can always +select a different mode if a particular problem needs it. Here is a +sample of some simple mathematics, \(x^2 + 3\), and a more complicated +expression, \(\frac{x(1-x)}{2x + 1}\). Try changing the display mode +by clicking the ${LQ}formatted-text$RQ or ${LQ}jsMath${RQ} radio +button and then pressing the ${LQ}Apply Options${RQ} button to cause +the page to be reformatted. Then change the display mode to back to +${LQ}images$RQ mode for the rest of the homework set. +$PAR + +The ${LQ}Show saved answers${RQ} checkbox tells whether you +want $WW to fill in the answer blanks with your previous answers or +not. (If you like, you can test this out on the next problem, since +there are no answer blanks in this one.) +$PAR + +You are now ready to learn how to enter answers into $WW. Press the +${LQ}Submit Answers${RQ} button to get credit for this problem, and +then press the ${LQ}Next$RQ button at the top of the page to go on to +the next one. + +END_TEXT + +install_forgiving_grader(); +$showPartialCorrectAnswers = 1; + +############################################## + +ENDDOCUMENT(); # This should be the last executable line in the problem. --- /dev/null +++ courses.dist/modelCourse/templates/setOrientation/prob07.pg @@ -0,0 +1,138 @@ +DOCUMENT(); # This should be the first executable line in the problem. + +loadMacros( + "PGstandard.pl", + "PGchoicemacros.pl", + "MathObjects.pl", + "PGunion.pl", + "alignedChoice.pl", + "parserOrientation.pl", + "PGcourse.pl", +); + + +$showPartialCorrectAnswers = 1; + +TEXT(beginproblem); + +Title("Constants and Functions in $WW"); + +############################################## + +BEGIN_TEXT + +$WW knows the value of \(\pi\), which you can enter as \{student +"pi"\}, and the value of \(e\) (the base of the natural logarithm, +\(e\approx 2.71828\)), which you can enter simply as the letter +\{student "e"\}. +$PAR + +$WW also understands many standard functions. Here +is a partial list. Notice that all the function names start with a lower-case +letter. Capitalizing the function will lead to an error message. + +\{BeginParList("UL")\} + +$ITEM +$WW knows about \{student "sin(x)"\}, \{student "cos(x)"\}, \{student +"tan(x)"\}, \{student "arcsin(x)"\}, \{student "arccos(x)"\}, +\{student "arctan(x)"\} and the other trigonometric functions and their +inverses. $WW ${BITALIC}always$EITALIC uses radian mode for these +functions. +$PAR + +$WW will evaluate trigonometric functions for you in many situations. +For example, the following blank is expecting the value \(-1\). +Remember that \(\cos(\pi) = -1\), so enter \{student "cos(pi)"\} +and submit it. + +$PAR +$BBLOCKQUOTE +\{ans_rule(10)\} \(= -1\) +$EBLOCKQUOTE +$PAR + +END_TEXT + +ANS(Real(-1)->cmp); + +################################################## + +BEGIN_TEXT + +$ITEM +The square root \(\sqrt x\) is represented by the function \{student +"sqrt(x)"\} or by \{student "x${CARET}(1/2)"\}. +$ITEMSEP + +$ITEM +The function \{student "log(x)"\} means the ${BITALIC}natural$EITALIC +logarithm of \(x\) (the logarithm with base \(e\)), not the common +logarithm (the logarithm with base \(10\), sometimes written +\(\log_{10}\)). You can also write \{student "ln(x)"\} for the +natural logarithm of \(x\), so \{student "log(x)"\} and \{student "ln(x)"\} +mean the same thing. Use \{student "log10(x)"\} for the base 10 +logarithm of \(x\). +$ITEMSEP + +$ITEM +The exponential function with base \(e\) can be entered as +\{student "e${CARET}x"\} or \{student "exp(x)"\}. The second notation +is convenient if you have a long, complicated exponent. +$ITEMSEP + +$ITEM +The absolute value function, \(|x|\), should be entered as +\{student "|x|"\} or \{student "abs(x)"\}. +$ITEMSEP + +$ITEM +The inverse sine function, \(\sin${CARET}{-1}(x)\), is written +\{student "arcsin(x)"\} or \{student "asin(x)"\} or \{student "sin${CARET}(-1)(x)"\} +in $WW. Note that this is ${BITALIC}not$EITALIC the same as +\{student "(sin(x))${CARET}(-1)"\}, which means \(\frac{1}{\sin(x)}\). +The other inverse functions are handled similarly. + +\{EndParList("UL")\} + +$PAR +$HR +$PAR + +Now enter the following functions: +$PAR +END_TEXT + +$al = new_aligned_list( + equals => 1, + ans_rule_len => 40, + tex_spacing => "5pt", + spacing => 10, +); + +Context("Numeric")->variables->are(t=>'Real'); $t = Formula('t'); +Context("Numeric")->variables->are(y=>'Real'); $y = Formula('y'); +Context("Numeric")->variables->are(x=>'Real'); $x = Formula('x'); +Context()->flags->set(limits=>[-2,10]); + +$al->qa( +# DisplayQA(sqrt($y**2+1)), +# DisplayQA(sin(3*$x+1)), + DisplayQA(1/tan($x)), + DisplayQA(asin($t+1)->with(limits=>[-2,0])), + DisplayQA((sin($x)-cos($x))/sqrt(2*$x-7)) +); + +BEGIN_TEXT + +$BBLOCKQUOTE +\{$al->print_q\} +$EBLOCKQUOTE + +END_TEXT + +ANS($al->correct_ans); + +############################################## + +ENDDOCUMENT(); # This should be the last executable line in the problem. --- /dev/null +++ courses.dist/modelCourse/templates/setOrientation/prob15.pg @@ -0,0 +1,90 @@ +DOCUMENT(); # This should be the first executable line in the problem. + +loadMacros( + "PGstandard.pl", + "PGunion.pl", + "parserOrientation.pl", + "PGcourse.pl", +); + + +TEXT(beginproblem); + +Title("When You're Stuck..."); + +############################################## + +BEGIN_TEXT +The goal of the $WW software is to help you learn mathematics by giving +you immediate feedback on the correctness of your answer to a problem. +It is not designed to be a tutorial or to replace humans in +explaining the material to you. As with any learning tool, it is +up to you to make efficient and effective use of the software. + +Here are some things you can try when you are stuck on a problem. +$PAR + +\{BeginParList("UL")\} +$ITEM +Reread the problem carefully to see if there are any instructions +that you did not notice. +$ITEMSEP + +$ITEM +Check carefully for directions on the Problem List page. +You can get to this page by pressing the ${LQ}Prob. List$RQ button at the +top of any problem page. +$ITEMSEP + +$ITEM +Look in the textbook for similar problems or relevant methods. +$ITEMSEP + +$ITEM +Talk to your instructor during office hours. +$ITEMSEP + +$ITEM +Ask a fellow student for help. +$ITEMSEP + +$ITEM +Use the Calculus Help Center. (Be sure to take a printout of +the problem with you. The tutors will need the ${BITALIC}exact$EITALIC +wording of the problem.) +$ITEMSEP + +$ITEM +Use the ${LQ}Email instructor$RQ button at the bottom of the problem page +to send e-mail to your instructor. Include in your message the details of +what you have tried so far. If you are having a software problem, +include details about the error messages you are getting. + +\{EndParList("UL")\} + +$PAR + +When you are truly stuck on a $WW problem, you should turn to other +sources (humans or books) for help, because it is not in your best +interest to guess repeatedly instead of thinking about what you might +be doing wrong. +$PAR + +To get credit for this problem, you must click the ${LQ}Submit +Answers$RQ button. Then you can use the ${LQ}Prob. List$RQ button at +the top of the page to return to the problem list page. You will see +that the problems you have done have been labeled as correct or +incorrect, and you can go back and do problems you skipped or couldn't +get right the first time. Once you have done a problem correctly, it +is ${BITALIC}always$EITALIC listed as correct even if you go back and +do it incorrectly later. This means you can use WeBWorK to review +course material without any danger of changing your grade. $PAR + +END_TEXT + +install_forgiving_grader(); +$showPartialCorrectAnswers = 1; + +############################################## + +ENDDOCUMENT(); # This should be the last executable line in the problem. --- /dev/null +++ courses.dist/modelCourse/templates/setOrientation/options_info.txt @@ -0,0 +1,31 @@ +<FONT SIZE="+1"><B>Change Your Password</B></FONT> + +<p align="justify"> + +If you haven't already changed your password, you should do so now. +To do this, type your OLD password in the top box at the left and +your NEW password in the two lower boxes at the left, +then press the "Change User Options" button. + +<p align="justify"> + +Your password should be at least 6 characters long, and should include +something other than just letters. Don't make it something that is +easily guessed, and don't make it the same as the password for your +e-mail account! + +<p align="justify"> + +If you prefer to receive your e-mail at a location other than your +Union College account, you should change your e-mail address in the box +at the left. Be aware, however, that your professor (and others on +the Union campus) may still send mail to your Union College address, +so you should check that account regularly anyway. Note that you can +have your Union college e-mail forwarded to another address +automatically if you wish. + +<p align="justify"> + +Finally, when you have made the changes that you want to make, select +the "Homework Sets" link at the top of the red panel at the far left +to get back to the list of homework sets. --- /dev/null +++ courses.dist/modelCourse/templates/setOrientation/prob03.pg @@ -0,0 +1,142 @@ +DOCUMENT(); # This should be the first executable line in the problem. + +loadMacros( + "PGstandard.pl", + "MathObjects.pl", + "contextLimitedNumeric.pl", + "PGunion.pl", + "parserOrientation.pl", + "PGcourse.pl", +); + + +$showPartialCorrectAnswers = 1; + +TEXT(beginproblem); + +Title("Typing in Your Answers"); + +############################################## + +BEGIN_TEXT + +Here are the standard symbols that $WW, along with most other +computer software, uses for arithmetic operations: +$PAR + +\{ + BeginTable(). + Row([$BBOLD.'Symbol'.$EBOLD, + $BBOLD.'Meaning'.$EBOLD, + $BBOLD.'Example'.$EBOLD]). + TableLine(). + Row([computer("+"),'Addition',computer("3+4 = 7")],align=>"CENTER"). + Row([computer("-"),'Subtraction',computer("3-4 = -1")],align=>"CENTER"). + Row([computer("*"),'Multiplication',computer("3*4 = 12")],align=>"CENTER"). + Row([computer("/"),'Division',computer("3/4 = .75")],align=>"CENTER"). + Row([computer($CARET)." or ".computer("**"),'Exponentiation', + computer("3${CARET}4 = 81")." or ". + computer("3**4 = 81")],align=>"CENTER"). + TableLine(). + EndTable() +\} +$PAR + +END_TEXT + +################################################## + +$a = non_zero_random(-5,5,1); +$b = non_zero_random(-5,5,1); +$c = non_zero_random(-3,3,1) * 2; +$d = non_zero_random(-5,5,1); + +BEGIN_TEXT + +Sometimes $WW will insist that you calculate the value of an +expression as a single number before you enter it. For example, +calculate the value of \($c($a - $b) - ($c - $d)\) and enter it in +the following blank. +(Here you have to enter a single integer; the question is testing +whether you can do the operations correctly.) + +$PAR +$BBLOCKQUOTE +\($c($a - $b) - ($c - $d)\) = \{ans_rule(10)\} +$EBLOCKQUOTE +$PAR +END_TEXT + +Context("LimitedNumeric"); +$ans = $c*($a - $b) - ($c - $d); +ANS(Real($ans)->cmp); + +################################################## + +BEGIN_TEXT + +Most often you will not have to simplify your answer, but can let +$WW do this for you. The following blanks are all expecting +the value 16. Try entering it several different ways, such as +\{student "7+9"\}, \{student "18-2"\}, \{student "8*2"\}, +\{student "32/2"\}, and \{student "4${CARET}2"\}. Note: pressing +the ${LQ}Tab$RQ key on your keyboard will move you from one answer +box to the next. + +$PAR +$BBLOCKQUOTE +16 = \{ans_rule(8)\} or +\{ans_rule(8)\} or +\{ans_rule(8)\} or +\{ans_rule(8)\} or +\{ans_rule(8)\} +$EBLOCKQUOTE +$PAR + +END_TEXT + +Context("Numeric"); + +ANS( + Real(16)->cmp, + Real(16)->cmp, + Real(16)->cmp, + Real(16)->cmp, + Real(16)->cmp, +); + +################################################## + +BEGIN_TEXT + +$WW also understands that quantities written next to each other are +supposed to be multiplied. For example, you can enter \{student +"(9)(7)"\} instead of \{student "63"\}. Most often this is used when +one quantity is a number and the other a variable or function. For +instance, \{computer "2x"\} means \{computer "2*x"\}, while \{computer +"3sin(5x)"\} means \{computer "3*sin(5*x)"\}. The following blank is +expecting the value 100; try entering it as +\{student("4(30-5)")\}. + +$PAR +$BBLOCKQUOTE +100 = \{ans_rule(10)\} +$EBLOCKQUOTE +$PAR +END_TEXT + +ANS(Real(100)->cmp); + +################################################## + +BEGIN_TEXT + +${BITALIC}When you are ready, don't forget to press the ${LQ}Submit Answers${RQ} +button to ask $WW to check your work. Once you get the answers +correct, press ${LQ}Next${RQ} to go on.${EITALIC} + +END_TEXT + +################################################## + +ENDDOCUMENT(); # This should be the last executable line in the problem. --- /dev/null +++ courses.dist/modelCourse/templates/setOrientation/setHeader.pg @@ -0,0 +1,105 @@ +DOCUMENT(); # This should be the first executable line in the problem. + +loadMacros( + "PGstandard.pl", + "PGunion.pl", + "PGcourse.pl", +); + +$WW = "WeBWorK"; + +if ($displayMode eq 'TeX') { + +TEXT($BEGIN_ONE_COLUMN, + '\noindent{\large\bf '.$studentName.'}\hfill{\large\bf '.$course.'}', + '\par\noindent', +" +This set of $WW problems is designed to orient you to the +$WW system and to help you learn how to communicate with the +software. You will be learning about how to understand what +you see on the screen and about how to enter your answers when you do +the problems. You will practice entering numerical and functional +expressions and look at ways to find and correct errors in your +entries. + +", + "WeBWorK assignment $setNumber is due on $formattedDueDate.", + $END_ONE_COLUMN +); + +} else { + +BEGIN_TEXT + +${BBOLD}Orientation to WeBWorK${EBOLD} +$PAR + +This set of $WW problems is designed to orient you to the $WW system +and to help you learn how to communicate with the software. You will +be learning about how to understand what you see on the screen and +about how to enter your answers when you do the problems. You will +practice entering numerical and functional expressions and look at +ways to find and correct errors in your entries. +$PAR + +Start by examining the features of this page. The red panels at the +left and top help you to navigate to the different pages available in +WeBWorK. You have already seen the ${LQ}Homework Sets${RQ} page, +which lists all the homework assignments, and the +${LQ}Password/Email${RQ} page, which lets you change your password or +email address. The ${LQ}Grades${RQ} link takes you to a page that +shows your scores on the various assignments (but there is nothing +much to show at this point). +$PAR + +\{ +#The ${LQ}Report Bugs${RQ} button is for reporting bugs in the WeBWorK +#System itself to the developers WeBWorK. It is unlikely that +#you will need to use that yourself. If you are having difficulty with +#WeBWorK, you should contact your professor using the ${LQ}Email +#Instructor${RQ} button instead. This should be available on nearly +#every page, so you always have a quick way to reach your professor. +#$PAR +\} + +At the bottom of the red panel is the list of homework sets that have +been assigned to you. These links allow you to go to any assignment +you want to work on. Right now, only the Orientation set is listed, +but as the term progresses, the list will grow. +$PAR + +The data in the red panel at the top of the page tells you where you +are in WeBWorK's hierarchy of pages, but you can ignore that for the +most part. There is an additional logout button at the far right, +however, that you will need to use when you are done using $WW (don't +press it yet). +$PAR + +\{ +#The yellow question mark icon is a ${LQ}Help${RQ} +#button for system documentation, but there is not much of that +#available at the moment. +#$PAR +\} + +The main information on this page is located in the large white panel +to the left. It shows the status of the problems in this assignment, +and your score on the set so far. Since you haven't yet tried any of +the problems, your score is zero, but after you work on some of them, +the number of attempts and the score will reflect the work you have +done. +$PAR + +Each problem number is a link to that problem in the homework set. +You can click on one to get to any specific problem. To begin the +orientation assignment, click on the link for Problem 1. When you are +done working, be sure to dismiss your connection to the server by +clicking on ${LQ}Log Out${RQ}, so that no one else can gain access to +your account. +$PAR + +END_TEXT + +} + +ENDDOCUMENT(); # This should be the last executable line in the problem. --- /dev/null +++ courses.dist/modelCourse/templates/setOrientation/prob10.pg @@ -0,0 +1,131 @@ +DOCUMENT(); # This should be the first executable line in the problem. + +loadMacros( + "PGstandard.pl", + "MathObjects.pl", + "PGunion.pl", + "parserVectorUtils.pl", + "parserOrientation.pl", + "PGcourse.pl", +); + +$showPartialCorrectAnswers = 1; + +TEXT(beginproblem); + +Title("Points and Vectors"); + +############################################## + +Context("Vector"); + +$p0 = non_zero_point2D(); +$p1 = $p0 + 2*non_zero_point2D(2,2,1); + +Context()->texStrings; +BEGIN_TEXT + +Some problems will ask you to enter an answer that is a point rather +than a number. You enter points in $WW just as you would expect: by +separating the coordinates by commas and enclosing them all in +parentheses. So \{student "(2,-3)"\} represents the point in the +plane that has an \(x\)-coordinate of \(2\) and \(y\)-coordinate of +\(-3\). +$PAR + +$BBLOCKQUOTE +What point is halfway between \($p0\) and \($p1\)? \{ans_rule(20)\}. +$EBLOCKQUOTE + +END_TEXT +Context()->normalStrings; + +ANS((($p0+$p1)/2)->cmp); + +################################################## + +$P = non_zero_point3D(); + +$LANGLE = HTML('<',"\char`\<"); +$RANGLE = HTML('>',"\char`\>"); + +Context()->flags->set(ijk=>1); +Context()->texStrings; +BEGIN_TEXT + +Other problems require you to provide a vector as your answer. $WW +allows you to enter vectors either as a list of coordinates enclosed +in angle braces, \{student $LANGLE\} and \{student $RANGLE\}, or as a +sum of multiples of the coordinate unit vectors, \(\{i\}\), \(\{j\}\) +and \(\{k\}\), which you enter as \{student "i"\}, \{student "j"\} and +\{student "k"\}. For example, \{student "${LANGLE}1,3,-2${RANGLE}"\} +represents the same vector as \{student "i+3j-2k"\}. +$PAR + +$BBLOCKQUOTE +What vector points from the origin to the point \($P\)? \{ans_rule(20)\}. +$EBLOCKQUOTE + +END_TEXT +Context()->normalStrings; +Context()->flags->set(ijk=>0); + +ANS(Vector($P)->cmp); + +################################################## + +$v0 = non_zero_vector3D(); +$v1 = non_zero_vector3D(); + +$SPACING = HTML(' '); +$BNOBR = HTML('<NOBR>'); +$ENOBR = HTML('</NOBR>'); + +Context()->texStrings; +BEGIN_TEXT + +Just as you can enter a number by giving an equation that reduces to it, +$WW allows you to enter points and vectors by giving equations for the +individual coordinates, or by using a vector-valued equation that +reduces to your answer. For example, +$PAR +$BCENTER +$BNOBR\{student "${LANGLE}1-(-3),2-sqrt(4),6/2${RANGLE}"\}$ENOBR +${SPACING} and ${SPACING} +$BNOBR\{student "[1-(-3)]i + [2-sqrt(4)]j + (6/2)k"\}$ENOBR +$ECENTER +$PAR +both represent the vector \(\{Vector(4,0,3)\}\), while +$BNOBR\{student "${LANGLE}1,0,-1${RANGLE} + ${LANGLE}2,-2,3${RANGLE}"\}$ENOBR +could be used to answer a question that asks for the vector \(\{Vector(3,-2,2)\}\). +$PAR + +$BBLOCKQUOTE +Write \(\{$v0+$v1\}\) as a sum of two vectors: \{ans_rule(30)\}. +$EBLOCKQUOTE + +END_TEXT +Context()->normalStrings; + +# +# Check that the result actually IS a sum (or difference). +# +sub checkAdd { + my $ans = shift; + if ($ans->{score} == 1 && !$ans->{isPreview}) { + my $item = $ans->{student_formula}->{tree}; + $ans->{correct_value}->cmp_Error + ($ans,"Your answer is not a sum of vectors") + unless $item->class eq 'BOP' && + ($item->{bop} eq '+' || $item->{bop} eq '-'); + } + return $ans; +} + +my $check = ($v0+$v1)->cmp; +$check->install_post_filter(~~&checkAdd); +ANS($check); + +################################################## + +ENDDOCUMENT(); # This should be the last executable line in the problem. --- /dev/null +++ courses.dist/modelCourse/templates/setOrientation/prob13.pg @@ -0,0 +1,68 @@ +DOCUMENT(); # This should be the first executable line in the problem. + +loadMacros( + "PGstandard.pl", + "PGchoicemacros.pl", + "PGunion.pl", + "parserOrientation.pl", + "choiceUtils.pl", + "PGcourse.pl", +); + +TEXT(beginproblem); + +Title("Matching Lists in $WW"); + +############################################## + +$a = random(-10,10,1); +$b = random(1,3,1); + +$ml = new_match_list(); +$ml->rf_print_q(~~&alt_print_q); +$ml->rf_print_a(~~&alt_print_a); +$ml->{separation} = 5; + +$ml->qa( + "\(x\) is less than \($a\)", "\(x $LT $a\)", + "\(x\) is any real number", "\(-\infty $LT x $LT \infty\)", + "\(x\) is greater than \($a\)", "\($a $LT x\)", + "\(x\) is less than or equal to \($a\)", "\(x $LE $a\)", + "\(x\) is greater than or equal to \($a\)", "\(x $GE $a\)", + "The distance from \(x\) to \($a\) is at most $b", + "\(|x - $a| $LE $b\)", + "The distance from \(x\) to \($a\) is more than $b", + "\(|x - $a| $GT $b\)" +); + +$ml->choose(5); + +################################################## + +BEGIN_TEXT + +Match the statements defined below with the letters labeling their +equivalent expressions. +$PAR + +\{ColumnMatchTable($ml,indent => 30)\} +$PAR + +END_TEXT + +ANS(str_cmp($ml->ra_correct_ans)); +install_problem_grader(~~&std_problem_grader); +$showPartialCorrectAnswers = 0; + +BEGIN_TEXT + +Usually with matching problems like this, +$WW only tells you whether ${BITALIC}all$EITALIC +your answers are correct or not. If they are not all +correct, $WW will not tell you which ones are right +and which are wrong. +$PAR + +END_TEXT + +ENDDOCUMENT(); # This should be the last executable line in the problem. --- /dev/null +++ courses.dist/modelCourse/templates/setOrientation/course_info.txt @@ -0,0 +1,22 @@ +<FONT SIZE="+1"><B>You have logged into WeBWorK!</B></FONT> + +<p align="justify"> + +If you haven't already done so, you should change your password to +something other than your student ID. To do this, click on the +Password/Email link in the list at the far left, and follow the +directions on that page. + +<p align="justify"> + +Once you have changed your password, click on the "Orientation" link +in the white area at the left. This will take you to the the first +homework assignment, which will help you to learn how to use WeBWorK +effectively. + +<p align="justify"> + +If you wish to get a printed copy of one of your assignments, you can +do so from this page by pressing the "Download Hardcopy" button. You +will be taken to a page where you can select what information to +include in the set, and which set to download. --- /dev/null +++ courses.dist/modelCourse/templates/setOrientation/prob12.pg @@ -0,0 +1,70 @@ +DOCUMENT(); # This should be the first executable line in the problem. + +loadMacros( + "PGstandard.pl", + "PGchoicemacros.pl", + "PGunion.pl", + "choiceUtils.pl", + "parserOrientation.pl", + "PGcourse.pl", +); + +TEXT(beginproblem); + +Title("True/False Questions in $WW"); + +############################################## + +$a = random(1,5,1); +$b = random(6,10,1); +$c = random(-10,-1,1); +$d = random(-10,-1,1); +$e = random(1,10,1); + +$sl = new_select_list(); +$sl->{rf_print_q} = ~~&alt_print_q; +$sl->{separation} = 5; + +$sl->qa( + "\(-$a $LT -$b\)", "F", + "\($c $LE $c\)", "T", + "\($d $LT $d\)", "F", + "\(\pi $GE 3.2\)", "F", + "\($e-1 $LE $e\)", "T" +); + +$sl->choose(4); + +################################################## + +BEGIN_TEXT + +Enter a \{student "T"\} or an \{student "F"\} in each +answer space below to indicate whether the corresponding +statement is true or false. +$PAR + +$BBLOCKQUOTE +\{$sl->print_q\} +$EBLOCKQUOTE +$PAR + +END_TEXT + +ANS(str_cmp($sl->ra_correct_ans)); +install_problem_grader(~~&std_problem_grader); +$showPartialCorrectAnswers = 0; + +BEGIN_TEXT + +In most multipart problems, if one or more of your answers is wrong, +then $WW tells you which ones they are. For True/False or +multiple-choice questions, however, $WW usually only tells you whether +${BITALIC}all$EITALIC the answers are correct. It won't tell you +which ones are right or wrong. + +END_TEXT + +################################################## + +ENDDOCUMENT(); # This should be the last executable line in the problem. --- /dev/null +++ courses.dist/modelCourse/templates/setOrientation/prob14/prob14-hint.html @@ -0,0 +1,35 @@ +<HEAD> +<TITLE>WeBWork Set 0 Problem 11 Hint</TITLE> +</HEAD> +<BODY BGCOLOR="#EFEFEF"> + +<BLOCKQUOTE> +<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" BGCOLOR="#AAAAAA"> +<TR><TD><TABLE BORDER="1" CELLSPACING="1" CELLPADDING="15" BGCOLOR="#E8E8E8"> +<TR><TD> + +<CENTER><H2>Graphs in WeBWorK</H2></CENTER> + +Often in WeBWorK, the graphs are displayed as small thumbnail images. +These can be difficult to read, so in these cases, WeBWorK provides +you with a link to a larger copy of the graph. You can click on the +small version of the image to get the larger one. For example, click +on the diagram below to enlarge it. It will be displayed in a +separate window; close that window when you are done looking at the +larger graph. +<p> + +<CENTER> +<A HREF="prob14.gif" TARGET="ZOOM"><IMG SRC="prob14.gif" WIDTH="100" HEIGHT="100" BORDER="2"></A> +</CENTER> +<p> + +After you are done, press the "Back" button to go back to the problem page. + +</TD></TR> +</TABLE></TD></TR> +</TABLE> +</BLOCKQUOTE> + +</BODY> +</HTML> --- /dev/null +++ courses.dist/modelCourse/templates/setOrientation/prob14/prob14.pg @@ -0,0 +1,116 @@ +DOCUMENT(); # This should be the first executable line in the problem. + +loadMacros( + "PGstandard.pl", + "PGchoicemacros.pl", + "PGgraphmacros.pl", + "PGunion.pl", + "imageChoice.pl", + "../parserOrientation.pl", + "PGcourse.pl" +); + +# +# You need to change this to point to where you have stored the hint +# and graphic files. +# +$htmlWebworkURL = "http://omega.math.union.edu/webwork2_files/local"; +$hintURL = "${htmlWebworkURL}/parserOrientation/prob14-hint.html"; + +TEXT(beginproblem); + +Title("Matching Graphs in $WW"); + +############################################## + +$ml = new_image_match_list(link => 0, border => 0); +$ml->{separation} = 3; + +@Goptions = (-6,-6,6,6, axes => [0,0], grid => [6,6], size => [150,150]); +$G1 = init_graph(@Goptions); +$G2 = init_graph(@Goptions); +$G3 = init_graph(@Goptions); +$G4 = init_graph(@Goptions); + +$a1 = random(-6,2,.1); $b1 = random($a1+1,6,.1); $m1 = ($b1-$a1)/12; +$a2 = random(-2,6,.1); $b2 = random($a2-1,-6,.1); $m2 = ($b2-$a2)/12; +$a3 = non_zero_random(.5,5,.1)*non_zero_random(-1,1,1); +$a4 = non_zero_random(.5,5,.1)*non_zero_random(-1,1,1); + +$plotoptions = "using color:red and weight=2"; +plot_functions($G1,"$m1(x+6)+$a1 for x in <-5.8,5.8> $plotoptions"); +plot_functions($G2,"$m2(x+6)+$a2 for x in <-5.8,5.8> $plotoptions"); +plot_functions($G3,"$a3 for x in <-5.8,5.8> $plotoptions"); +plot_functions($G4,"10000(x-$a4) for x in <-5.8,5.8> $plotoptions"); + +$ml->qa( + "The line is the graph of an increasing function", $G1, + "The line is the graph of a decreasing function", $G2, + "The line is the graph of a constant function", $G3, + "The line is not the graph of a function", $G4 +); + +$ml->choose(4); + +#BEGIN_TEXT +# +#The simplest functions are the ${BITALIC}linear$EITALIC ones --- +#the functions whose graphs are straight lines. They are important +#because many functions locally look like straight lines. (Looking +#like a line ${BITALIC}locally$EITALIC means that if we zoom in on the +#function and look at it at a very powerful magnification, it will look +#like a straight line.) +#$PAR + +BEGIN_TEXT + +Enter the letter of the graph that corresponds to each statement: +$PAR + +$BCENTER +$PAR +\{$ml->print_q\} +$PAR +$ECENTER + +\{$ml->print_a\} +$PAR + +END_TEXT + +ANS(str_cmp($ml->ra_correct_ans)); +install_problem_grader(~~&std_problem_grader); +$showPartialCorrectAnswers = 0; + +################################################## + +BEGIN_TEXT + +As with the previous matching problems, you will not be told which of +your answers are correct when you submit your answers to this problem. +$WW will only tell you if ${BITALIC}all${EITALIC} your answers are +correct or not. +$PAR + +Some $WW problems display a link to additional information or a +\{htmlLink($hintURL,"hint")\}. Follow this link for a hint about +graphs in $WW. +$PAR + +END_TEXT + +#Occasionally, a problem includes a hint that will not be available +#immediately. Once you have submitted incorrect answers a certain +#number of times (determined by the problem), you will see a ${LQ}Show +#Hint$RQ button above the submit buttons at the bottom of the screen. +#Check the box and press ${LQ}Submit$RQ in order to get the hint. For +#this problem, the hint will be available after one wrong answer. +# +#END_TEXT +# +#$showHint = 1; +#HINT("$HINT Usually the hints are more helpful than this."); + +################################################## + +ENDDOCUMENT(); # This should be the last executable line in the problem. |
From: Arnie P. v. a. <we...@ma...> - 2008-06-26 19:24:45
|
Log Message: ----------- backporting to rel-2-4-patches Tags: ---- rel-2-4-patches Modified Files: -------------- webwork2/courses.dist/modelCourse/templates: setOrientation.def Revision Data ------------- Index: setOrientation.def =================================================================== RCS file: /webwork/cvs/system/webwork2/courses.dist/modelCourse/templates/setOrientation.def,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -Lcourses.dist/modelCourse/templates/setOrientation.def -Lcourses.dist/modelCourse/templates/setOrientation.def -u -r1.1.2.1 -r1.1.2.2 --- courses.dist/modelCourse/templates/setOrientation.def +++ courses.dist/modelCourse/templates/setOrientation.def @@ -1,21 +1,21 @@ setNumber=Orientation openDate = 6/26/04 at 11:30am -dueDate = 4/4/05 at 12:20pm -answerDate = 4/5/05 at 12:00pm -screenHeaderFile = unionLibrary/parserOrientation/setHeader.pg +dueDate = 4/4/15 at 12:20pm +answerDate = 4/5/15 at 12:00pm +screenHeaderFile = setOrientation/setHeader.pg problemList = -unionLibrary/parserOrientation/prob01.pg, 1 -unionLibrary/parserOrientation/prob02.pg, 1 -unionLibrary/parserOrientation/prob03.pg, 1 -unionLibrary/parserOrientation/prob04.pg, 1 -unionLibrary/parserOrientation/prob05/prob05.pg, 1 -unionLibrary/parserOrientation/prob06.pg, 1 -unionLibrary/parserOrientation/prob07.pg, 1 -unionLibrary/parserOrientation/prob08.pg, 1 -unionLibrary/parserOrientation/prob09.pg, 1 -unionLibrary/parserOrientation/prob10.pg, 1 -unionLibrary/parserOrientation/prob11.pg, 1 -unionLibrary/parserOrientation/prob12.pg, 1 -unionLibrary/parserOrientation/prob13.pg, 1 -unionLibrary/parserOrientation/prob14/prob14.pg, 1 -unionLibrary/parserOrientation/prob15.pg, 1 +setOrientation/prob01.pg, 1 +setOrientation/prob02.pg, 1 +setOrientation/prob03.pg, 1 +setOrientation/prob04.pg, 1 +setOrientation/prob05/prob05.pg, 1 +setOrientation/prob06.pg, 1 +setOrientation/prob07.pg, 1 +setOrientation/prob08.pg, 1 +setOrientation/prob09.pg, 1 +setOrientation/prob10.pg, 1 +setOrientation/prob11.pg, 1 +setOrientation/prob12.pg, 1 +setOrientation/prob13.pg, 1 +setOrientation/prob14/prob14.pg, 1 +setOrientation/prob15.pg, 1 |
From: Arnie P. v. a. <we...@ma...> - 2008-06-26 19:04:23
|
Log Message: ----------- edit to point to new locations for problems Modified Files: -------------- webwork2/courses.dist/modelCourse/templates: setOrientation.def Revision Data ------------- Index: setOrientation.def =================================================================== RCS file: /webwork/cvs/system/webwork2/courses.dist/modelCourse/templates/setOrientation.def,v retrieving revision 1.2 retrieving revision 1.3 diff -Lcourses.dist/modelCourse/templates/setOrientation.def -Lcourses.dist/modelCourse/templates/setOrientation.def -u -r1.2 -r1.3 --- courses.dist/modelCourse/templates/setOrientation.def +++ courses.dist/modelCourse/templates/setOrientation.def @@ -1,21 +1,21 @@ setNumber=Orientation openDate = 6/26/04 at 11:30am -dueDate = 4/4/05 at 12:20pm -answerDate = 4/5/05 at 12:00pm -screenHeaderFile = union/parserOrientation/setHeader.pg +dueDate = 4/4/15 at 12:20pm +answerDate = 4/5/15 at 12:00pm +screenHeaderFile = setOrientation/setHeader.pg problemList = -union/parserOrientation/prob01.pg, 1 -union/parserOrientation/prob02.pg, 1 -union/parserOrientation/prob03.pg, 1 -union/parserOrientation/prob04.pg, 1 -union/parserOrientation/prob05/prob05.pg, 1 -union/parserOrientation/prob06.pg, 1 -union/parserOrientation/prob07.pg, 1 -union/parserOrientation/prob08.pg, 1 -union/parserOrientation/prob09.pg, 1 -union/parserOrientation/prob10.pg, 1 -union/parserOrientation/prob11.pg, 1 -union/parserOrientation/prob12.pg, 1 -union/parserOrientation/prob13.pg, 1 -union/parserOrientation/prob14/prob14.pg, 1 -union/parserOrientation/prob15.pg, 1 +setOrientation/prob01.pg, 1 +setOrientation/prob02.pg, 1 +setOrientation/prob03.pg, 1 +setOrientation/prob04.pg, 1 +setOrientation/prob05/prob05.pg, 1 +setOrientation/prob06.pg, 1 +setOrientation/prob07.pg, 1 +setOrientation/prob08.pg, 1 +setOrientation/prob09.pg, 1 +setOrientation/prob10.pg, 1 +setOrientation/prob11.pg, 1 +setOrientation/prob12.pg, 1 +setOrientation/prob13.pg, 1 +setOrientation/prob14/prob14.pg, 1 +setOrientation/prob15.pg, 1 |
From: Arnie P. v. a. <we...@ma...> - 2008-06-26 19:00:30
|
Log Message: ----------- adding prob14 from setOrientation to modelCourse Added Files: ----------- webwork2/courses.dist/modelCourse/templates/setOrientation/prob14: prob14-hint.html prob14.gif prob14.pg Revision Data ------------- --- /dev/null +++ courses.dist/modelCourse/templates/setOrientation/prob14/prob14-hint.html @@ -0,0 +1,35 @@ +<HEAD> +<TITLE>WeBWork Set 0 Problem 11 Hint</TITLE> +</HEAD> +<BODY BGCOLOR="#EFEFEF"> + +<BLOCKQUOTE> +<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" BGCOLOR="#AAAAAA"> +<TR><TD><TABLE BORDER="1" CELLSPACING="1" CELLPADDING="15" BGCOLOR="#E8E8E8"> +<TR><TD> + +<CENTER><H2>Graphs in WeBWorK</H2></CENTER> + +Often in WeBWorK, the graphs are displayed as small thumbnail images. +These can be difficult to read, so in these cases, WeBWorK provides +you with a link to a larger copy of the graph. You can click on the +small version of the image to get the larger one. For example, click +on the diagram below to enlarge it. It will be displayed in a +separate window; close that window when you are done looking at the +larger graph. +<p> + +<CENTER> +<A HREF="prob14.gif" TARGET="ZOOM"><IMG SRC="prob14.gif" WIDTH="100" HEIGHT="100" BORDER="2"></A> +</CENTER> +<p> + +After you are done, press the "Back" button to go back to the problem page. + +</TD></TR> +</TABLE></TD></TR> +</TABLE> +</BLOCKQUOTE> + +</BODY> +</HTML> --- /dev/null +++ courses.dist/modelCourse/templates/setOrientation/prob14/prob14.pg @@ -0,0 +1,116 @@ +DOCUMENT(); # This should be the first executable line in the problem. + +loadMacros( + "PGstandard.pl", + "PGchoicemacros.pl", + "PGgraphmacros.pl", + "PGunion.pl", + "imageChoice.pl", + "../parserOrientation.pl", + "PGcourse.pl" +); + +# +# You need to change this to point to where you have stored the hint +# and graphic files. +# +$htmlWebworkURL = "http://omega.math.union.edu/webwork2_files/local"; +$hintURL = "${htmlWebworkURL}/parserOrientation/prob14-hint.html"; + +TEXT(beginproblem); + +Title("Matching Graphs in $WW"); + +############################################## + +$ml = new_image_match_list(link => 0, border => 0); +$ml->{separation} = 3; + +@Goptions = (-6,-6,6,6, axes => [0,0], grid => [6,6], size => [150,150]); +$G1 = init_graph(@Goptions); +$G2 = init_graph(@Goptions); +$G3 = init_graph(@Goptions); +$G4 = init_graph(@Goptions); + +$a1 = random(-6,2,.1); $b1 = random($a1+1,6,.1); $m1 = ($b1-$a1)/12; +$a2 = random(-2,6,.1); $b2 = random($a2-1,-6,.1); $m2 = ($b2-$a2)/12; +$a3 = non_zero_random(.5,5,.1)*non_zero_random(-1,1,1); +$a4 = non_zero_random(.5,5,.1)*non_zero_random(-1,1,1); + +$plotoptions = "using color:red and weight=2"; +plot_functions($G1,"$m1(x+6)+$a1 for x in <-5.8,5.8> $plotoptions"); +plot_functions($G2,"$m2(x+6)+$a2 for x in <-5.8,5.8> $plotoptions"); +plot_functions($G3,"$a3 for x in <-5.8,5.8> $plotoptions"); +plot_functions($G4,"10000(x-$a4) for x in <-5.8,5.8> $plotoptions"); + +$ml->qa( + "The line is the graph of an increasing function", $G1, + "The line is the graph of a decreasing function", $G2, + "The line is the graph of a constant function", $G3, + "The line is not the graph of a function", $G4 +); + +$ml->choose(4); + +#BEGIN_TEXT +# +#The simplest functions are the ${BITALIC}linear$EITALIC ones --- +#the functions whose graphs are straight lines. They are important +#because many functions locally look like straight lines. (Looking +#like a line ${BITALIC}locally$EITALIC means that if we zoom in on the +#function and look at it at a very powerful magnification, it will look +#like a straight line.) +#$PAR + +BEGIN_TEXT + +Enter the letter of the graph that corresponds to each statement: +$PAR + +$BCENTER +$PAR +\{$ml->print_q\} +$PAR +$ECENTER + +\{$ml->print_a\} +$PAR + +END_TEXT + +ANS(str_cmp($ml->ra_correct_ans)); +install_problem_grader(~~&std_problem_grader); +$showPartialCorrectAnswers = 0; + +################################################## + +BEGIN_TEXT + +As with the previous matching problems, you will not be told which of +your answers are correct when you submit your answers to this problem. +$WW will only tell you if ${BITALIC}all${EITALIC} your answers are +correct or not. +$PAR + +Some $WW problems display a link to additional information or a +\{htmlLink($hintURL,"hint")\}. Follow this link for a hint about +graphs in $WW. +$PAR + +END_TEXT + +#Occasionally, a problem includes a hint that will not be available +#immediately. Once you have submitted incorrect answers a certain +#number of times (determined by the problem), you will see a ${LQ}Show +#Hint$RQ button above the submit buttons at the bottom of the screen. +#Check the box and press ${LQ}Submit$RQ in order to get the hint. For +#this problem, the hint will be available after one wrong answer. +# +#END_TEXT +# +#$showHint = 1; +#HINT("$HINT Usually the hints are more helpful than this."); + +################################################## + +ENDDOCUMENT(); # This should be the last executable line in the problem. |
From: Arnie P. v. a. <we...@ma...> - 2008-06-26 18:59:28
|
Log Message: ----------- Adding prob05 of setOrientation to modelCourse Added Files: ----------- webwork2/courses.dist/modelCourse/templates/setOrientation/prob05: prob05-a.gif prob05-b.gif prob05-c.gif prob05.pg Revision Data ------------- --- /dev/null +++ courses.dist/modelCourse/templates/setOrientation/prob05/prob05.pg @@ -0,0 +1,131 @@ +DOCUMENT(); # This should be the first executable line in the problem. + +loadMacros( + "PGstandard.pl", + "PGchoicemacros.pl", + "MathObjects.pl", + "PGunion.pl", + "alignedChoice.pl", + "../parserOrientation.pl", + "PGcourse.pl", +); + +$showPartialCorrectAnswers = 1; + +TEXT(beginproblem); + +Title("Common Errors to Avoid"); + +############################################## + +BEGIN_TEXT + +Many of the answers you enter into $WW will be expressions +that involve variables. Here are some important things to know. + +$PAR + +\{BeginParList("UL")\} + +$ITEM +It matters what letter you use. For example, if you are asked for a +function using the variable \(x\), then it won't work to enter the +function with the variable \(t\). Also, $WW considers upper- and +lower-case letters to be different, so don't use the capital letter +\{student "X"\} in place of the lower-case letter \{student "x"\}. +The following blank is expecting the +function \(x^3\), which you would enter as \{student "x${CARET}3"\} or +\{student "x**3"\}. Instead, try entering \{student "t${CARET}3"\} and +submitting your answer. + +$PAR +$BBLOCKQUOTE +\{ans_rule(10)\} +$EBLOCKQUOTE +$PAR + +You should get an error message informing you that \{computer "t"\} +is not defined in this context. This tells you that $WW did not receive the +correct variable and doesn't know how to check your answer. Now enter +\{student "x${CARET}3"\} and resubmit to get credit for this part of +the problem. + +END_TEXT + +ANS(Formula("x^3")->cmp); + +################################################## + +$IMGA = MathIMG("prob05-a.gif","1/x+1","1/x+1"); +$IMGB = MathIMG("prob05-b.gif","1/(x+1)","\frac{1}{x+1}"); +$IMGC = MathIMG("prob05-c.gif","(1/x)+1","\frac{1}{x} + 1"); + +BEGIN_TEXT + +$ITEM +$WW requires that you be precise in how you think about and present +your answer. We have just seen that you need to be careful about the +variables that you use. You must be equally careful about how the +rules of precedence apply to your answers. Often, this involves using +parentheses appropriately. + +$PAR + +For example, you might write $IMGA on your paper when you meant $IMGB, +but that is actually incorrect. The expression $IMGA means $IMGC, +according to the rules of precedence. $WW will force you to be exact +in what you are thinking and in what you are writing, because it must +interpret your answers according to the standard rules. If you want +to enter something that means $IMGB, you must write \{student +"1/(x+1)"\}. This also is true in written work, so making a habit of +being precise about this will improve your written mathematics as well +as your ability to enter answers quickly and correctly in $WW. + +$PAR +END_TEXT + +################################################## + +BEGIN_TEXT + +\{EndParList("UL")\} + +$PAR +$HR +$PAR + +Now enter the following functions: +$PAR +END_TEXT + +$al = new_aligned_list( + equals => 1, ans_rule_len => 30, + tex_spacing => "5pt", spacing => 10 +); + +Context("Numeric")->variables->are(t=>'Real'); $t = Formula("t"); +Context("Numeric")->variables->are(y=>'Real'); $y = Formula("y"); +Context("Numeric")->variables->are(x=>'Real'); $x = Formula("x"); + +$al->qa( + DisplayQA($t/(2*$t+6)), +# DisplayQA(2*$y*($y**2-$y+1)), +# DisplayQA(1/$x**2 - 3*(1/$x)), + DisplayQA(1/(2*($x-5))), + DisplayQA((2*$x-3)**4), +); + +BEGIN_TEXT + +$BBLOCKQUOTE +\{$al->print_q\} +$EBLOCKQUOTE + +END_TEXT + +ANS($al->correct_ans); + + +############################################## + +ENDDOCUMENT(); # This should be the last executable line in the problem. |
From: Arnie P. v. a. <we...@ma...> - 2008-06-26 18:58:06
|
Update of /webwork/cvs/system/webwork2/courses.dist/modelCourse/templates/setOrientation/prob14 In directory devel.webwork.rochester.edu:/home/apizer/webwork/webwork2/courses.dist/modelCourse/templates/setOrientation/prob14 Log Message: Directory /webwork/cvs/system/webwork2/courses.dist/modelCourse/templates/setOrientation/prob14 added to the repository |
From: Arnie P. v. a. <we...@ma...> - 2008-06-26 18:57:57
|
Update of /webwork/cvs/system/webwork2/courses.dist/modelCourse/templates/setOrientation/prob05 In directory devel.webwork.rochester.edu:/home/apizer/webwork/webwork2/courses.dist/modelCourse/templates/setOrientation/prob05 Log Message: Directory /webwork/cvs/system/webwork2/courses.dist/modelCourse/templates/setOrientation/prob05 added to the repository |
From: Arnie P. v. a. <we...@ma...> - 2008-06-26 18:51:10
|
Log Message: ----------- Adding the Union setOrientation to the modle course Added Files: ----------- webwork2/courses.dist/modelCourse/templates: setOrientation.def webwork2/courses.dist/modelCourse/templates/setOrientation: course_info.txt login_info.txt options_info.txt prob01.pg prob02.pg prob03.pg prob04.pg prob06.pg prob07.pg prob08.pg prob09.pg prob10.pg prob11.pg prob12.pg prob13.pg prob15.pg setHeader.pg Revision Data ------------- --- /dev/null +++ courses.dist/modelCourse/templates/setOrientation/prob08.pg @@ -0,0 +1,159 @@ +DOCUMENT(); # This should be the first executable line in the problem. + +loadMacros( + "PGstandard.pl", + "MathObjects.pl", + "PGunion.pl", + "parserOrientation.pl", + "PGcourse.pl", +); + + +Context("Numeric")->variables->are(y=>'Real'); $y = Formula('y'); +Context("Numeric")->variables->are(x=>'Real'); $x = Formula('x'); + +$showPartialCorrectAnswers = 1; + +TEXT(beginproblem); + +Title("Rules of Precedence (Again)"); + +############################################## + +$Explanation = "${BITALIC}Explanation${EITALIC}"; +$Moral = "${BITALIC}Moral${EITALIC}"; + +BEGIN_TEXT + +At this point, we can give the complete rules of precedence for +how $WW computes the value of a mathematical formula. The operations +are handled in the following order: +$PAR + +\{BeginList\} +$ITEM Evaluate expressions within parentheses. +$ITEM Evaluate functions such as \{student "sin(x)"\}, +\{student "cos(x)"\}, \{student "log(x)"\}, \{student "sqrt(x)"\}. +$ITEM Perform exponentiation (from right to left). +$ITEM Perform multiplication and division, (from left to right). +$ITEM Perform addition and subtraction, (from left to right). +\{EndList\} +$PAR + +This can get a little subtle, so be careful. The following are some +typical traps for $WW users. +$PAR + +\{BeginParList("UL")\} + +$ITEM +$WW interprets \{student "sin 2x"\} to mean \((\sin${SP}2)*x\) +$PAR + +$Explanation: Rule 2 tells you that $WW does evaluation of functions +(like \{student "sin"\}) before multiplication. Thus $WW first +computes \(\sin${SP}2\), and then multiplies the result by \(x\). +$PAR + +$Moral: You must type \{student "sin(2x)"\} for the sine of \(2x\), +even though we often write it as \(\sin${SP}2x\). +Get in the habit of using parentheses for all your trigonometric +functions. +$PAR + +Now enter the following function: +$PAR +$BBLOCKQUOTE +The cosine of \(5x\) is entered as \{ans_rule(15)\}. +$EBLOCKQUOTE +$PAR + +END_TEXT + +ANS(cos(5*$x)->cmp); + +BEGIN_TEXT + +$ITEM +$WW interprets \{student "cos t${CARET}3"\} to mean \((\cos${SP}t)^3\) +$PAR + +$Explanation: Rule 2 tells you that $WW does evaluation of functions +(like \{student "cos"\}) before exponentiation. Thus $WW first +computes \(\cos${SP}t\) and then raises the result to the power 3. +$PAR + +$Moral: You must type in \{student "cos(t${CARET}3)"\} if you mean the +cosine of \(t^3\), even though we sometimes write it as \(\cos${SP}t^3\). +$PAR + +Now enter the following function: +$PAR +$BBLOCKQUOTE +The tangent of \(y^4\) is entered as \{ans_rule(15)\}. +$EBLOCKQUOTE +$PAR + +END_TEXT + +ANS(tan($y**4)->cmp); + +BEGIN_TEXT + +$ITEM +In mathematics, we often write \(\sin^2${SP}x\) to mean \((\sin x)^2\). +$WW will let you write \{student "sin${CARET}2(x)"\} for this, though +it is probably better to type \{student "(sin(x))${CARET}2"\} instead, +as this makes your intention clearer. Note that a power of \(-1\), as +in \{student "sin${CARET}(-1)(x)"\}, is a special case; it indicates the +${BITALIC}inverse${EITALIC} function \{student "arcsin(x)"\} rather +than a power. +$PAR + +Now enter the following function: +$PAR +$BBLOCKQUOTE +\(\sin^2${SP}x + \cos^3${SP}x\) = \{ans_rule(30)\} +$EBLOCKQUOTE +$PAR + +END_TEXT + +ANS((sin($x)**2 + cos($x)**3)->cmp); + +BEGIN_TEXT + +$ITEM +\{student "e${CARET}3x"\} means \((e^3) x\) and not \(e^{(3x)}\) $PAR +$PAR + +$Explanation: Rule 3 says that $WW does exponentiation before multiplication. +Thus $WW first computes \{student "e${CARET}3"\}, with the result +\(e^3\), and then multiplies the result by \(x\). +$PAR + +$Moral: Always put parentheses around an exponent. +Type \{student "e${CARET}(3x)"\} if you want \(e^{3x}\). +$PAR + +Now enter the following function: +$PAR +$BBLOCKQUOTE +\(2^{4x^3}\) = \{ans_rule(30)\} +$EBLOCKQUOTE +$PAR + +END_TEXT + +ANS((2**(4*($x**3)))->cmp); + +BEGIN_TEXT + +\{EndParList("UL")\} + + +END_TEXT + +############################################## + +ENDDOCUMENT(); # This should be the last executable line in the problem. --- /dev/null +++ courses.dist/modelCourse/templates/setOrientation/prob09.pg @@ -0,0 +1,114 @@ +DOCUMENT(); # This should be the first executable line in the problem. + +loadMacros( + "PGstandard.pl", + "MathObjects.pl", + "PGunion.pl", + "parserOrientation.pl", + "PGcourse.pl", +); + +$showPartialCorrectAnswers = 1; + +TEXT(beginproblem); + +Title("Non-Numeric Answers"); + +############################################## + +BEGIN_TEXT + +Sometimes you will be asked to enter answers that are not numbers. +For example, if you are asked to determine a limit, the answer may be +that the limit does not exist, so you might have to type \{student +"DNE"\} to indicate this (the problem should tell you what word to +use). Note that upper- and lower-case letters are not the same to +$WW, so you will need to enter the answer exactly as indicated in the +problem. (Well written problems will allow the answer to be +entered either way.) +$PAR + +$BBLOCKQUOTE +Please enter ${LQ}\{student "DNE"\}${RQ} here: \{ans_rule(10)\}. +$EBLOCKQUOTE + +END_TEXT + +ANS(String('DNE')->cmp); + +################################################## + +BEGIN_TEXT + +Other problems may require you to enter \(\infty\), which you do using +the word ${LQ}\{student "INFINITY"\}${RQ} (in upper- or lower-case) or +${LQ}\{student "INF"\}${RQ} for short. The problem should remind you +of how to do this. Note that most operations are not defined on +infinity, so you can't add or multiply something by infinity. You +can, however, indicate \(-\infty\) by ${LQ}\{student "-INFINITY"\}${RQ}, +or ${LQ}\{student "-INF"\}${RQ}. +$PAR + +$BBLOCKQUOTE +Try entering \(-\infty\) here: \{ans_rule(10)\}. +$EBLOCKQUOTE + +END_TEXT + +ANS((-(Infinity))->cmp); + +################################################## + +Context("Interval"); + +$a = random(-5,5,1); +$I = Compute("(-infinity,$a)"); + +BEGIN_TEXT + +One common place where you use \(\infty\) is as an endpoint of +an interval. $WW allows you to enter intervals using standard +interval notation, including infinite endpoints. For example, +\{student "[-2,5)"\} represents an interval that is closed on the +left and open on the right, while \{student "[2,inf)"\} is an interval +that extends infinitely to the right. +$PAR + +$BBLOCKQUOTE +Write the interval of points that are less than \($a\): \{ans_rule(20)\}. +$EBLOCKQUOTE + +END_TEXT + +ANS($I->cmp); + +################################################## + +Context("Interval"); + +$a = random(-8,-2,1); +$b = random($a+1,$a+5,1); +$c = random($b+1,$b+5,1); +$I = Compute("[$a,$b) U ($b,$c)"); + +BEGIN_TEXT + +Several intervals can be combined into one region using the ${LQ}set +union${RQ} operation, \(\cup\), which is represented as ${LQ}\{student +"U"\}${RQ} in $WW. For example, \{student "[-2,0] U (8,inf)"\} +represents the points from \(-2\) to \(0\) together with everything +bigger than 8. +$PAR + +$BBLOCKQUOTE +Write the set of points from \($a\) to \($c\) but excluding \($b\) and \($c\) +as a union of intervals: \{ans_rule(20)\}. +$EBLOCKQUOTE + +END_TEXT + +ANS($I->cmp); + +################################################## + +ENDDOCUMENT(); # This should be the last executable line in the problem. --- /dev/null +++ courses.dist/modelCourse/templates/setOrientation/login_info.txt @@ -0,0 +1,20 @@ +<FONT SIZE="+1"><B>Welcome to WeBWorK!</B></FONT> + +<P ALIGN="JUSTIFY"> + +Your username is the same as the one used for your Union College +email, and your initial password is your Union College Student ID +number (you will change that after you log in). + +<P ALIGN="JUSTIFY"> + +Log in and follow the instructions that will appear in this panel once +you have done so. For the first assignment, <I>do not</I> log in as a +guest user or using a friend's account. If you do, you will not +receive credit for doing the asignment! + +<P ALIGN="JUSTIFY"> + +On future assignments, you can use the guest accounts to get +additional practice problems that are similar to the ones in your +homework set, but with different numbers. --- /dev/null +++ courses.dist/modelCourse/templates/setOrientation/prob01.pg @@ -0,0 +1,82 @@ +DOCUMENT(); # This should be the first executable line in the problem. + +loadMacros( + "PGstandard.pl", + "PGunion.pl", + "parserOrientation.pl", + "PGcourse.pl", +); + + +TEXT(beginproblem); + +Title("Understanding $WW Problem Pages"); + +############################################## +BEGIN_TEXT + +The $WW screen is divided into several areas, each used for a +different purpose. You will need to understand these +in order to use $WW effectively. +$PAR + +At the upper left are the navigation buttons that allow you to move +from problem to problem. The ${LQ}Next$RQ and ${LQ}Previous$RQ +buttons, naturally, send you to the next and previous problems. The +${LQ}Prob. List$RQ button takes you back to the opening +page for the homework set (the one that lists all the problems and +gives the instructions for the homework set). +$PAR + +The area below the navigation buttons is where $WW tells you about +your score for the current problem. When you have submitted your +answers, this is where you will be given information about what +answers you got right and wrong. (It will be shown on a grey +backgound to help make it stand out; you will see this later.) This +area also shows you how many points a problem is worth. +$PAR + +The main part of the page is the text of the problem you are trying to +answer, including blank boxes for you to enter your answers. (There +aren't any such boxes on this page, because you are not being asked +any questions here, but usually there will be one or more answer blanks +on a page.) +$PAR + +Below the problem text is a message area where you may be informed +about how partial credit is handled in multi-part problems. Other +information also may appear there, such as a message indicating that +the due date is passed, or that answers are available. +$PAR + +In the red panel at the left, instead of the list of homework sets, you +now have a list of the problems within this assignment. You can go to +any problem just by clicking on it. The checkboxes at the bottom of +the panel are discussed in the next problem. +$PAR + +In the center of the top red panel is an indication of how much time +you have left to work on the problems for this set. Note that this is +computed at the moment you downloaded the problem page; if you use the +${LQ}Back$RQ and ${LQ}Forward$RQ buttons on your browser, this does +not reload the page, so the times will not be updated. Reload the +page using your browser's Reload or Refresh buttons to get the current +time. +$PAR + +The buttons at the bottom of the screen, including the ${LQ}Submit +Answers$RQ button, are discussed in the next problem. At this point, +you can get credit for Problem 1 by pressing the ${LQ}Submit +Answers$RQ button at the bottom of the page (even though there was no +answer to submit), and then pressing the ${LQ}Next$RQ button at the +top of the screen to go on to the next problem. + +END_TEXT + + +install_forgiving_grader(); +$showPartialCorrectAnswers = 1; + +############################################## + +ENDDOCUMENT(); # This should be the last executable line in the problem. --- /dev/null +++ courses.dist/modelCourse/templates/setOrientation/prob04.pg @@ -0,0 +1,96 @@ +DOCUMENT(); # This should be the first executable line in the problem. + +loadMacros( + "PGstandard.pl", + "PGchoicemacros.pl", + "MathObjects.pl", + "PGunion.pl", + "alignedChoice.pl", + "contextLimitedNumeric.pl", + "parserOrientation.pl", + "PGcourse.pl", +); + +$showPartialCorrectAnswers = 1; + +TEXT(beginproblem); + +Title("Rules of Precedence"); + +############################################## + +BEGIN_TEXT + +The rules of precedence determine the order in which the mathematical +operations are performed by $WW. It is essential for you to understand +these so that you know how $WW interprets what you type in. If there +are no parentheses and no functions (such as \{computer "sin"\} or +\{computer "log"\}), then $WW computes the value of your answer by +performing exponentiation first, followed by multiplication and division +(from left to right), and finally addition and subtraction +(from left to right). +$PAR + +If there are expressions within parentheses, those expressions are +simplified first. We'll talk about functions (and give a more +complete list of rules) in a later problem. + +$PAR +Examples: +\{BeginList("UL")\} +$ITEM +\{student "4*3/6 = 12/6 = 2"\} (multiplications and divisions are done +from left to right), and \{student "2*7 = 14"\}, so +\{student "4*3/6-2*7+10 = 2 - 14 + 10 = -2"\}. +$ITEM +\{student "12/3/2 = 4/2 = 2"\} (multiplications and divisions are done +from left to right). +$ITEM +\{student "12/(3/2) = 12/1.5 = 8"\} +(expressions inside parentheses are calculated before anything else). +$ITEM +\{student "2*4${CARET}2 = 2*16 = 32"\} (exponentiation is done before multiplication), +so \{student "2*4${CARET}2 - 3*4 = 2*16 - 3*4 = 32 - 12 = 20"\}. +\{EndList("UL")\} +$PAR + +To practice these rules, completely simplify the following +expressions. Because the point of this problem is for you to do the +numerical calculations correctly, $WW will only accept sufficiently +accurate decimal numbers as the answers to these problems. +It will not simplify any expressions, including fractions. +$PAR + +END_TEXT + +$a = random(1,6,1); +$b = random(2,6,1); +$c = random(3,6,1); +$d = random(2,25,1); +$al = new_aligned_list(equals => 1); + +$al->qa( + computer("$a+$b*$c"), Real($a+($b*$c))->cmp, +# computer("($a+$b)*$c"), Real(($a+$b)*$c)->cmp, +# computer("($a+$b)/$c"), Real(($a+$b)/$c)->cmp, +# computer("$a+$b/$c"), Real($a+($b/$c))->cmp, + computer("$a/$b*$c"), Real(($a/$b)*$c)->cmp, +# computer("$a/($b*$c)"), Real($a/($b*$c))->cmp, +# computer("$a/$b/$c"), Real(($a/$b)/$c)->cmp, + computer("3*$b-$a/5*$c+$d"), Real((3*$b)-(($a/5)*$c)+$d)->cmp, + computer("2${CARET}$b+1"), Real((2**$b)+1)->cmp, + computer("2${CARET}($b+1)"), Real(2**($b+1))->cmp, +); + +BEGIN_TEXT +$BBLOCKQUOTE +\{$al->print_q\} +$EBLOCKQUOTE + +END_TEXT + +ANS($al->correct_ans); + +############################################## + +ENDDOCUMENT(); # This should be the last executable line in the problem. --- /dev/null +++ courses.dist/modelCourse/templates/setOrientation/prob06.pg @@ -0,0 +1,130 @@ +DOCUMENT(); # This should be the first executable line in the problem. + +loadMacros( + "PGstandard.pl", + "MathObjects.pl", + "PGunion.pl", + "parserOrientation.pl", + "PGcourse.pl", +); + + +$showPartialCorrectAnswers = 1; + +Context("Numeric")->variables->are(y=>'Real'); $y = Formula('y'); +Context("Numeric")->variables->are(x=>'Real'); $x = Formula('x'); +Context()->flags->set(limits=>[0,2]); + +TEXT(beginproblem); + +Title("Using Parentheses Effectively"); + +############################################## + +BEGIN_TEXT + +One of the hardest parts about using parentheses is making sure that +they match up correctly. Here are a couple of hints to help you with +this: + +$PAR +END_TEXT + +$BRACES = HTML('{}','\char`\{\char`\}'); + +BEGIN_TEXT + +\{BeginParList("UL")\} + +$ITEM +Several types of parentheses are allowed: \{student "()"\}, +\{student "[]"\}, and \{student $BRACES\}. When you need to nest +parentheses inside other parentheses, try using a different type for +each so that you can see more easily which ones match up. +$ITEMSEP + +$ITEM +When you type a left parenthesis, type the corresponding right +parenthesis at the same time, then position your cursor between them and +type the expression that goes inside. This can save you a +lot of time hunting for mismatched parentheses. +$ITEMSEP + +$ITEM +When you have a complicated answer, type a template for +the structure of your result first. For example, suppose that you are +planning to enter the fraction +\[\frac{2x^2-5}{(x+1)(3x^{3x} - 22)}.\] +A good way to start would be to type in \{student "()/[()*()]"\}. +This shows a template of one number divided by the product of two +other numbers. (Note that \{student "()/()*()"\} would not be a good +way to start; do you see why?) Now when you fill in the expressions, you +will be sure your parentheses balance correctly. +$PAR + +Although $WW understands that numbers written next to each other are +meant to be multiplied (so you do not have to use \{student "*"\} to +indicate multiplication if you don't want to), it is often useful for +you to include the \{student "*"\} anyway, as it helps you keep track +of the structure of your answer. +$PAR + +$ITEM +To see how $WW is interpreting what you type, enter your answer and +then click the ${LQ}Preview Answers$RQ button, which is next to the +${LQ}Submit Answers$RQ button below. $WW will show you what it thinks +you entered (the preview appears in your answer area at the top of the +page). Previewing your answer does not submit it for credit; that only +happens when you press the ${LQ}Submit Answers$RQ button. +$ITEMSEP + +$ITEM +When division or exponentiation are involved, it is a good idea to +use parentheses even in simple situations, rather than relying on the +order of operations. For example, 1/2x and (1/2)x both mean the same +thing (first divide 1 by 2, then multiply the result by x), but the +second makes it easier to see what is going on. Likewise, use +parentheses to clarify expressions involving exponentiation. Type +\{student "(e${CARET}x)${CARET}2"\} if you mean \((e^x)^2\), and type +\{student "e${CARET}(x${CARET}2)"\} if you mean \(e^{(x^2)}\). + +\{EndParList("UL")\} + +$PAR +$HR +$PAR + +Now enter the following functions: + +$BBLOCKQUOTE + +\{@ExampleDefaults = (ans_rule_len => 50, ans_rule_height => 1); + BeginExamples\} + +\{BeginExample(QA(($x**(2*$x-1))/(($x**2-$x)*(3*$x+5))))\} +Start with the template \{student "[x${CARET}()]/[()*()]"\}. +\{EndExample\} +\{ExampleRule\} + +\{BeginExample(QA((($y+3)*($y**3+$y+1))/((2*$y**2-2)*(5*$y+4))))\} +Start by putting in an appropriate template. This means that you +should begin by looking at the function and thinking about how many +pieces are used to construct it and how those pieces are related. +Once you have entered your answer, try using the ${LQ}Preview$RQ button +to see how $WW is interpreting your answer. +\{EndExample\} +\{ExampleRule\} + +\{BeginExample(QA((($x+1)/($x-2))**4))\} +Start by putting in an appropriate template. +\{EndExample\} + +\{EndExamples\} + +$EBLOCKQUOTE + +END_TEXT + +############################################## + +ENDDOCUMENT(); # This should be the last executable line in the problem. --- /dev/null +++ courses.dist/modelCourse/templates/setOrientation/prob11.pg @@ -0,0 +1,71 @@ +DOCUMENT(); # This should be the first executable line in the problem. + +loadMacros( + "PGstandard.pl", + "MathObjects.pl", + "PGunion.pl", + "parserOrientation.pl", + "PGcourse.pl", +); + +$showPartialCorrectAnswers = 1; + +TEXT(beginproblem); + +Title("Multiple Answers in One Blank"); + +############################################## + +Context("Numeric"); + +$a = random(1,5,1); +$f = Formula("1/(x^2-$a^2)")->reduce; + +Context()->texStrings; +BEGIN_TEXT + +You may sometimes be asked to provide more than one answer in a single +answer blank. For example, you may need to enter all the values where +a function is not defined. In this case, you should separate your +answers by commas. Such an answer is called a +${BITALIC}list${EITALIC} in $WW. Note that you need not enter +multiple answers for a list; a single number is a legal answer (there +might only be one point where the function is undefined, for +instance). +$PAR + +$BBLOCKQUOTE +The function \(\displaystyle f(x)=$f\) is not defined at these \(x\) values: \{ans_rule(20)\}. +$EBLOCKQUOTE + +END_TEXT +Context()->normalStrings; + +ANS(List($a,-$a)->cmp); + +################################################## + +$a = random(1,5,1); +$f = Formula("1/(x^2+$a^2)")->reduce; + +Context()->texStrings; +BEGIN_TEXT + +When you are asked for a list of numbers, another possible answer is +that there are ${BITALIC}no${EITALIC} numbers that satisfy the +requirements. In that case, you should enter ${LQ}\{student +"NONE"\}${RQ} as your answer. +$PAR + +$BBLOCKQUOTE +The function \(\displaystyle f(x)=$f\) is not defined at these \(x\) values: \{ans_rule(20)\}. +$EBLOCKQUOTE + +END_TEXT +Context()->normalStrings; + +ANS(String('NONE')->cmp); + +################################################## + +ENDDOCUMENT(); # This should be the last executable line in the problem. --- /dev/null +++ courses.dist/modelCourse/templates/setOrientation/prob02.pg @@ -0,0 +1,108 @@ +DOCUMENT(); # This should be the first executable line in the problem. + +loadMacros( + "PGstandard.pl", + "PGunion.pl", + "parserOrientation.pl", + "PGcourse.pl", +); + + +TEXT(beginproblem); + +Title("Controlling $WW"); + +############################################## + +BEGIN_TEXT + +The buttons at the bottom of the screen are what cause $WW to process +your answers. Nothing that you type will have any effect until you +press one of these buttons. +$PAR + +The ${LQ}Submit Answers$RQ button causes $WW to check your answers and +report your score for the problem. You can continue to work on a +problem until you get it right, so don't be afraid to submit your +answer even if you have only finished parts of the problem or are +not sure of the correctness of your answer. If the due date is +passed and the answers are available, you can click the ${LQ}Show +Correct Answers$RQ button before pressing ${LQ}Submit$RQ. +If you do, the correct answer(s) will be displayed in the answer area +at the top of the screen along with the answers you have provided. +$PAR + +If you have typed in a complicated answer, or are being told your +answer is incorrect when you think it's right, you may want to use the +${LQ}Preview Answer$RQ button. This will ask $WW to display at the +top of the page its interpretation of what you have entered. This +can be used to help spot errors in your typing, and verify that $WW +understands your answer the way you intend it to. (This is discussed +further in a later problem.) +$PAR + +At the bottom of the red panel at the left is a box that allows you to +change how the problem is displayed. The equations within the problem +can be represented in three different ways: + +\{BeginParList("UL")\} + +$ITEM +${LQ}images${RQ} mode is the default choice (what $WW uses unless you tell +it otherwise). It produces the accurate mathematical notation, +with the disadvantages of being slightly slower, and not printing well +if you want to print out a single problem. +$ITEMSEP + +$ITEM +${LQ}formatted-text${RQ} mode produces results quickly, but more +complicated mathematics may be difficult to read in this +mode. For example, some fractions and integrals are not easy to read +in formatted-text mode. +$ITEMSEP + +$ITEM +${LQ}jsMath${RQ} mode uses a JavaScript program and Cascading Style +Sheets (CSS) to display the mathematics. This produces good results, +and is particularly nice if you need to change the size of the fonts +in your browser or wish to print out a single problem. For best +results, however, you should download and install some fonts that +jsMath uses; there is a link to the fonts on the jsMath control panel, +which you can activate using the small jsMath button that will appear +at the lower right of the screen when you activate this mode. The +first problem you view using jsMath may take a little longer to +appear, as the JavaScript program is being loaded into your browser, +but things should run faster after that. + +\{EndParList("UL")\} +$PAR + +Choose whichever mode is most comfortable for you. You can always +select a different mode if a particular problem needs it. Here is a +sample of some simple mathematics, \(x^2 + 3\), and a more complicated +expression, \(\frac{x(1-x)}{2x + 1}\). Try changing the display mode +by clicking the ${LQ}formatted-text$RQ or ${LQ}jsMath${RQ} radio +button and then pressing the ${LQ}Apply Options${RQ} button to cause +the page to be reformatted. Then change the display mode to back to +${LQ}images$RQ mode for the rest of the homework set. +$PAR + +The ${LQ}Show saved answers${RQ} checkbox tells whether you +want $WW to fill in the answer blanks with your previous answers or +not. (If you like, you can test this out on the next problem, since +there are no answer blanks in this one.) +$PAR + +You are now ready to learn how to enter answers into $WW. Press the +${LQ}Submit Answers${RQ} button to get credit for this problem, and +then press the ${LQ}Next$RQ button at the top of the page to go on to +the next one. + +END_TEXT + +install_forgiving_grader(); +$showPartialCorrectAnswers = 1; + +############################################## + +ENDDOCUMENT(); # This should be the last executable line in the problem. --- /dev/null +++ courses.dist/modelCourse/templates/setOrientation/prob07.pg @@ -0,0 +1,138 @@ +DOCUMENT(); # This should be the first executable line in the problem. + +loadMacros( + "PGstandard.pl", + "PGchoicemacros.pl", + "MathObjects.pl", + "PGunion.pl", + "alignedChoice.pl", + "parserOrientation.pl", + "PGcourse.pl", +); + + +$showPartialCorrectAnswers = 1; + +TEXT(beginproblem); + +Title("Constants and Functions in $WW"); + +############################################## + +BEGIN_TEXT + +$WW knows the value of \(\pi\), which you can enter as \{student +"pi"\}, and the value of \(e\) (the base of the natural logarithm, +\(e\approx 2.71828\)), which you can enter simply as the letter +\{student "e"\}. +$PAR + +$WW also understands many standard functions. Here +is a partial list. Notice that all the function names start with a lower-case +letter. Capitalizing the function will lead to an error message. + +\{BeginParList("UL")\} + +$ITEM +$WW knows about \{student "sin(x)"\}, \{student "cos(x)"\}, \{student +"tan(x)"\}, \{student "arcsin(x)"\}, \{student "arccos(x)"\}, +\{student "arctan(x)"\} and the other trigonometric functions and their +inverses. $WW ${BITALIC}always$EITALIC uses radian mode for these +functions. +$PAR + +$WW will evaluate trigonometric functions for you in many situations. +For example, the following blank is expecting the value \(-1\). +Remember that \(\cos(\pi) = -1\), so enter \{student "cos(pi)"\} +and submit it. + +$PAR +$BBLOCKQUOTE +\{ans_rule(10)\} \(= -1\) +$EBLOCKQUOTE +$PAR + +END_TEXT + +ANS(Real(-1)->cmp); + +################################################## + +BEGIN_TEXT + +$ITEM +The square root \(\sqrt x\) is represented by the function \{student +"sqrt(x)"\} or by \{student "x${CARET}(1/2)"\}. +$ITEMSEP + +$ITEM +The function \{student "log(x)"\} means the ${BITALIC}natural$EITALIC +logarithm of \(x\) (the logarithm with base \(e\)), not the common +logarithm (the logarithm with base \(10\), sometimes written +\(\log_{10}\)). You can also write \{student "ln(x)"\} for the +natural logarithm of \(x\), so \{student "log(x)"\} and \{student "ln(x)"\} +mean the same thing. Use \{student "log10(x)"\} for the base 10 +logarithm of \(x\). +$ITEMSEP + +$ITEM +The exponential function with base \(e\) can be entered as +\{student "e${CARET}x"\} or \{student "exp(x)"\}. The second notation +is convenient if you have a long, complicated exponent. +$ITEMSEP + +$ITEM +The absolute value function, \(|x|\), should be entered as +\{student "|x|"\} or \{student "abs(x)"\}. +$ITEMSEP + +$ITEM +The inverse sine function, \(\sin${CARET}{-1}(x)\), is written +\{student "arcsin(x)"\} or \{student "asin(x)"\} or \{student "sin${CARET}(-1)(x)"\} +in $WW. Note that this is ${BITALIC}not$EITALIC the same as +\{student "(sin(x))${CARET}(-1)"\}, which means \(\frac{1}{\sin(x)}\). +The other inverse functions are handled similarly. + +\{EndParList("UL")\} + +$PAR +$HR +$PAR + +Now enter the following functions: +$PAR +END_TEXT + +$al = new_aligned_list( + equals => 1, + ans_rule_len => 40, + tex_spacing => "5pt", + spacing => 10, +); + +Context("Numeric")->variables->are(t=>'Real'); $t = Formula('t'); +Context("Numeric")->variables->are(y=>'Real'); $y = Formula('y'); +Context("Numeric")->variables->are(x=>'Real'); $x = Formula('x'); +Context()->flags->set(limits=>[-2,10]); + +$al->qa( +# DisplayQA(sqrt($y**2+1)), +# DisplayQA(sin(3*$x+1)), + DisplayQA(1/tan($x)), + DisplayQA(asin($t+1)->with(limits=>[-2,0])), + DisplayQA((sin($x)-cos($x))/sqrt(2*$x-7)) +); + +BEGIN_TEXT + +$BBLOCKQUOTE +\{$al->print_q\} +$EBLOCKQUOTE + +END_TEXT + +ANS($al->correct_ans); + +############################################## + +ENDDOCUMENT(); # This should be the last executable line in the problem. --- /dev/null +++ courses.dist/modelCourse/templates/setOrientation/prob15.pg @@ -0,0 +1,90 @@ +DOCUMENT(); # This should be the first executable line in the problem. + +loadMacros( + "PGstandard.pl", + "PGunion.pl", + "parserOrientation.pl", + "PGcourse.pl", +); + + +TEXT(beginproblem); + +Title("When You're Stuck..."); + +############################################## + +BEGIN_TEXT +The goal of the $WW software is to help you learn mathematics by giving +you immediate feedback on the correctness of your answer to a problem. +It is not designed to be a tutorial or to replace humans in +explaining the material to you. As with any learning tool, it is +up to you to make efficient and effective use of the software. + +Here are some things you can try when you are stuck on a problem. +$PAR + +\{BeginParList("UL")\} +$ITEM +Reread the problem carefully to see if there are any instructions +that you did not notice. +$ITEMSEP + +$ITEM +Check carefully for directions on the Problem List page. +You can get to this page by pressing the ${LQ}Prob. List$RQ button at the +top of any problem page. +$ITEMSEP + +$ITEM +Look in the textbook for similar problems or relevant methods. +$ITEMSEP + +$ITEM +Talk to your instructor during office hours. +$ITEMSEP + +$ITEM +Ask a fellow student for help. +$ITEMSEP + +$ITEM +Use the Calculus Help Center. (Be sure to take a printout of +the problem with you. The tutors will need the ${BITALIC}exact$EITALIC +wording of the problem.) +$ITEMSEP + +$ITEM +Use the ${LQ}Email instructor$RQ button at the bottom of the problem page +to send e-mail to your instructor. Include in your message the details of +what you have tried so far. If you are having a software problem, +include details about the error messages you are getting. + +\{EndParList("UL")\} + +$PAR + +When you are truly stuck on a $WW problem, you should turn to other +sources (humans or books) for help, because it is not in your best +interest to guess repeatedly instead of thinking about what you might +be doing wrong. +$PAR + +To get credit for this problem, you must click the ${LQ}Submit +Answers$RQ button. Then you can use the ${LQ}Prob. List$RQ button at +the top of the page to return to the problem list page. You will see +that the problems you have done have been labeled as correct or +incorrect, and you can go back and do problems you skipped or couldn't +get right the first time. Once you have done a problem correctly, it +is ${BITALIC}always$EITALIC listed as correct even if you go back and +do it incorrectly later. This means you can use WeBWorK to review +course material without any danger of changing your grade. $PAR + +END_TEXT + +install_forgiving_grader(); +$showPartialCorrectAnswers = 1; + +############################################## + +ENDDOCUMENT(); # This should be the last executable line in the problem. --- /dev/null +++ courses.dist/modelCourse/templates/setOrientation/options_info.txt @@ -0,0 +1,31 @@ +<FONT SIZE="+1"><B>Change Your Password</B></FONT> + +<p align="justify"> + +If you haven't already changed your password, you should do so now. +To do this, type your OLD password in the top box at the left and +your NEW password in the two lower boxes at the left, +then press the "Change User Options" button. + +<p align="justify"> + +Your password should be at least 6 characters long, and should include +something other than just letters. Don't make it something that is +easily guessed, and don't make it the same as the password for your +e-mail account! + +<p align="justify"> + +If you prefer to receive your e-mail at a location other than your +Union College account, you should change your e-mail address in the box +at the left. Be aware, however, that your professor (and others on +the Union campus) may still send mail to your Union College address, +so you should check that account regularly anyway. Note that you can +have your Union college e-mail forwarded to another address +automatically if you wish. + +<p align="justify"> + +Finally, when you have made the changes that you want to make, select +the "Homework Sets" link at the top of the red panel at the far left +to get back to the list of homework sets. --- /dev/null +++ courses.dist/modelCourse/templates/setOrientation/prob03.pg @@ -0,0 +1,142 @@ +DOCUMENT(); # This should be the first executable line in the problem. + +loadMacros( + "PGstandard.pl", + "MathObjects.pl", + "contextLimitedNumeric.pl", + "PGunion.pl", + "parserOrientation.pl", + "PGcourse.pl", +); + + +$showPartialCorrectAnswers = 1; + +TEXT(beginproblem); + +Title("Typing in Your Answers"); + +############################################## + +BEGIN_TEXT + +Here are the standard symbols that $WW, along with most other +computer software, uses for arithmetic operations: +$PAR + +\{ + BeginTable(). + Row([$BBOLD.'Symbol'.$EBOLD, + $BBOLD.'Meaning'.$EBOLD, + $BBOLD.'Example'.$EBOLD]). + TableLine(). + Row([computer("+"),'Addition',computer("3+4 = 7")],align=>"CENTER"). + Row([computer("-"),'Subtraction',computer("3-4 = -1")],align=>"CENTER"). + Row([computer("*"),'Multiplication',computer("3*4 = 12")],align=>"CENTER"). + Row([computer("/"),'Division',computer("3/4 = .75")],align=>"CENTER"). + Row([computer($CARET)." or ".computer("**"),'Exponentiation', + computer("3${CARET}4 = 81")." or ". + computer("3**4 = 81")],align=>"CENTER"). + TableLine(). + EndTable() +\} +$PAR + +END_TEXT + +################################################## + +$a = non_zero_random(-5,5,1); +$b = non_zero_random(-5,5,1); +$c = non_zero_random(-3,3,1) * 2; +$d = non_zero_random(-5,5,1); + +BEGIN_TEXT + +Sometimes $WW will insist that you calculate the value of an +expression as a single number before you enter it. For example, +calculate the value of \($c($a - $b) - ($c - $d)\) and enter it in +the following blank. +(Here you have to enter a single integer; the question is testing +whether you can do the operations correctly.) + +$PAR +$BBLOCKQUOTE +\($c($a - $b) - ($c - $d)\) = \{ans_rule(10)\} +$EBLOCKQUOTE +$PAR +END_TEXT + +Context("LimitedNumeric"); +$ans = $c*($a - $b) - ($c - $d); +ANS(Real($ans)->cmp); + +################################################## + +BEGIN_TEXT + +Most often you will not have to simplify your answer, but can let +$WW do this for you. The following blanks are all expecting +the value 16. Try entering it several different ways, such as +\{student "7+9"\}, \{student "18-2"\}, \{student "8*2"\}, +\{student "32/2"\}, and \{student "4${CARET}2"\}. Note: pressing +the ${LQ}Tab$RQ key on your keyboard will move you from one answer +box to the next. + +$PAR +$BBLOCKQUOTE +16 = \{ans_rule(8)\} or +\{ans_rule(8)\} or +\{ans_rule(8)\} or +\{ans_rule(8)\} or +\{ans_rule(8)\} +$EBLOCKQUOTE +$PAR + +END_TEXT + +Context("Numeric"); + +ANS( + Real(16)->cmp, + Real(16)->cmp, + Real(16)->cmp, + Real(16)->cmp, + Real(16)->cmp, +); + +################################################## + +BEGIN_TEXT + +$WW also understands that quantities written next to each other are +supposed to be multiplied. For example, you can enter \{student +"(9)(7)"\} instead of \{student "63"\}. Most often this is used when +one quantity is a number and the other a variable or function. For +instance, \{computer "2x"\} means \{computer "2*x"\}, while \{computer +"3sin(5x)"\} means \{computer "3*sin(5*x)"\}. The following blank is +expecting the value 100; try entering it as +\{student("4(30-5)")\}. + +$PAR +$BBLOCKQUOTE +100 = \{ans_rule(10)\} +$EBLOCKQUOTE +$PAR +END_TEXT + +ANS(Real(100)->cmp); + +################################################## + +BEGIN_TEXT + +${BITALIC}When you are ready, don't forget to press the ${LQ}Submit Answers${RQ} +button to ask $WW to check your work. Once you get the answers +correct, press ${LQ}Next${RQ} to go on.${EITALIC} + +END_TEXT + +################################################## + +ENDDOCUMENT(); # This should be the last executable line in the problem. --- /dev/null +++ courses.dist/modelCourse/templates/setOrientation/setHeader.pg @@ -0,0 +1,105 @@ +DOCUMENT(); # This should be the first executable line in the problem. + +loadMacros( + "PGstandard.pl", + "PGunion.pl", + "PGcourse.pl", +); + +$WW = "WeBWorK"; + +if ($displayMode eq 'TeX') { + +TEXT($BEGIN_ONE_COLUMN, + '\noindent{\large\bf '.$studentName.'}\hfill{\large\bf '.$course.'}', + '\par\noindent', +" +This set of $WW problems is designed to orient you to the +$WW system and to help you learn how to communicate with the +software. You will be learning about how to understand what +you see on the screen and about how to enter your answers when you do +the problems. You will practice entering numerical and functional +expressions and look at ways to find and correct errors in your +entries. + +", + "WeBWorK assignment $setNumber is due on $formattedDueDate.", + $END_ONE_COLUMN +); + +} else { + +BEGIN_TEXT + +${BBOLD}Orientation to WeBWorK${EBOLD} +$PAR + +This set of $WW problems is designed to orient you to the $WW system +and to help you learn how to communicate with the software. You will +be learning about how to understand what you see on the screen and +about how to enter your answers when you do the problems. You will +practice entering numerical and functional expressions and look at +ways to find and correct errors in your entries. +$PAR + +Start by examining the features of this page. The red panels at the +left and top help you to navigate to the different pages available in +WeBWorK. You have already seen the ${LQ}Homework Sets${RQ} page, +which lists all the homework assignments, and the +${LQ}Password/Email${RQ} page, which lets you change your password or +email address. The ${LQ}Grades${RQ} link takes you to a page that +shows your scores on the various assignments (but there is nothing +much to show at this point). +$PAR + +\{ +#The ${LQ}Report Bugs${RQ} button is for reporting bugs in the WeBWorK +#System itself to the developers WeBWorK. It is unlikely that +#you will need to use that yourself. If you are having difficulty with +#WeBWorK, you should contact your professor using the ${LQ}Email +#Instructor${RQ} button instead. This should be available on nearly +#every page, so you always have a quick way to reach your professor. +#$PAR +\} + +At the bottom of the red panel is the list of homework sets that have +been assigned to you. These links allow you to go to any assignment +you want to work on. Right now, only the Orientation set is listed, +but as the term progresses, the list will grow. +$PAR + +The data in the red panel at the top of the page tells you where you +are in WeBWorK's hierarchy of pages, but you can ignore that for the +most part. There is an additional logout button at the far right, +however, that you will need to use when you are done using $WW (don't +press it yet). +$PAR + +\{ +#The yellow question mark icon is a ${LQ}Help${RQ} +#button for system documentation, but there is not much of that +#available at the moment. +#$PAR +\} + +The main information on this page is located in the large white panel +to the left. It shows the status of the problems in this assignment, +and your score on the set so far. Since you haven't yet tried any of +the problems, your score is zero, but after you work on some of them, +the number of attempts and the score will reflect the work you have +done. +$PAR + +Each problem number is a link to that problem in the homework set. +You can click on one to get to any specific problem. To begin the +orientation assignment, click on the link for Problem 1. When you are +done working, be sure to dismiss your connection to the server by +clicking on ${LQ}Log Out${RQ}, so that no one else can gain access to +your account. +$PAR + +END_TEXT + +} + +ENDDOCUMENT(); # This should be the last executable line in the problem. --- /dev/null +++ courses.dist/modelCourse/templates/setOrientation/prob10.pg @@ -0,0 +1,131 @@ +DOCUMENT(); # This should be the first executable line in the problem. + +loadMacros( + "PGstandard.pl", + "MathObjects.pl", + "PGunion.pl", + "parserVectorUtils.pl", + "parserOrientation.pl", + "PGcourse.pl", +); + +$showPartialCorrectAnswers = 1; + +TEXT(beginproblem); + +Title("Points and Vectors"); + +############################################## + +Context("Vector"); + +$p0 = non_zero_point2D(); +$p1 = $p0 + 2*non_zero_point2D(2,2,1); + +Context()->texStrings; +BEGIN_TEXT + +Some problems will ask you to enter an answer that is a point rather +than a number. You enter points in $WW just as you would expect: by +separating the coordinates by commas and enclosing them all in +parentheses. So \{student "(2,-3)"\} represents the point in the +plane that has an \(x\)-coordinate of \(2\) and \(y\)-coordinate of +\(-3\). +$PAR + +$BBLOCKQUOTE +What point is halfway between \($p0\) and \($p1\)? \{ans_rule(20)\}. +$EBLOCKQUOTE + +END_TEXT +Context()->normalStrings; + +ANS((($p0+$p1)/2)->cmp); + +################################################## + +$P = non_zero_point3D(); + +$LANGLE = HTML('<',"\char`\<"); +$RANGLE = HTML('>',"\char`\>"); + +Context()->flags->set(ijk=>1); +Context()->texStrings; +BEGIN_TEXT + +Other problems require you to provide a vector as your answer. $WW +allows you to enter vectors either as a list of coordinates enclosed +in angle braces, \{student $LANGLE\} and \{student $RANGLE\}, or as a +sum of multiples of the coordinate unit vectors, \(\{i\}\), \(\{j\}\) +and \(\{k\}\), which you enter as \{student "i"\}, \{student "j"\} and +\{student "k"\}. For example, \{student "${LANGLE}1,3,-2${RANGLE}"\} +represents the same vector as \{student "i+3j-2k"\}. +$PAR + +$BBLOCKQUOTE +What vector points from the origin to the point \($P\)? \{ans_rule(20)\}. +$EBLOCKQUOTE + +END_TEXT +Context()->normalStrings; +Context()->flags->set(ijk=>0); + +ANS(Vector($P)->cmp); + +################################################## + +$v0 = non_zero_vector3D(); +$v1 = non_zero_vector3D(); + +$SPACING = HTML(' '); +$BNOBR = HTML('<NOBR>'); +$ENOBR = HTML('</NOBR>'); + +Context()->texStrings; +BEGIN_TEXT + +Just as you can enter a number by giving an equation that reduces to it, +$WW allows you to enter points and vectors by giving equations for the +individual coordinates, or by using a vector-valued equation that +reduces to your answer. For example, +$PAR +$BCENTER +$BNOBR\{student "${LANGLE}1-(-3),2-sqrt(4),6/2${RANGLE}"\}$ENOBR +${SPACING} and ${SPACING} +$BNOBR\{student "[1-(-3)]i + [2-sqrt(4)]j + (6/2)k"\}$ENOBR +$ECENTER +$PAR +both represent the vector \(\{Vector(4,0,3)\}\), while +$BNOBR\{student "${LANGLE}1,0,-1${RANGLE} + ${LANGLE}2,-2,3${RANGLE}"\}$ENOBR +could be used to answer a question that asks for the vector \(\{Vector(3,-2,2)\}\). +$PAR + +$BBLOCKQUOTE +Write \(\{$v0+$v1\}\) as a sum of two vectors: \{ans_rule(30)\}. +$EBLOCKQUOTE + +END_TEXT +Context()->normalStrings; + +# +# Check that the result actually IS a sum (or difference). +# +sub checkAdd { + my $ans = shift; + if ($ans->{score} == 1 && !$ans->{isPreview}) { + my $item = $ans->{student_formula}->{tree}; + $ans->{correct_value}->cmp_Error + ($ans,"Your answer is not a sum of vectors") + unless $item->class eq 'BOP' && + ($item->{bop} eq '+' || $item->{bop} eq '-'); + } + return $ans; +} + +my $check = ($v0+$v1)->cmp; +$check->install_post_filter(~~&checkAdd); +ANS($check); + +################################################## + +ENDDOCUMENT(); # This should be the last executable line in the problem. --- /dev/null +++ courses.dist/modelCourse/templates/setOrientation/prob13.pg @@ -0,0 +1,68 @@ +DOCUMENT(); # This should be the first executable line in the problem. + +loadMacros( + "PGstandard.pl", + "PGchoicemacros.pl", + "PGunion.pl", + "parserOrientation.pl", + "choiceUtils.pl", + "PGcourse.pl", +); + +TEXT(beginproblem); + +Title("Matching Lists in $WW"); + +############################################## + +$a = random(-10,10,1); +$b = random(1,3,1); + +$ml = new_match_list(); +$ml->rf_print_q(~~&alt_print_q); +$ml->rf_print_a(~~&alt_print_a); +$ml->{separation} = 5; + +$ml->qa( + "\(x\) is less than \($a\)", "\(x $LT $a\)", + "\(x\) is any real number", "\(-\infty $LT x $LT \infty\)", + "\(x\) is greater than \($a\)", "\($a $LT x\)", + "\(x\) is less than or equal to \($a\)", "\(x $LE $a\)", + "\(x\) is greater than or equal to \($a\)", "\(x $GE $a\)", + "The distance from \(x\) to \($a\) is at most $b", + "\(|x - $a| $LE $b\)", + "The distance from \(x\) to \($a\) is more than $b", + "\(|x - $a| $GT $b\)" +); + +$ml->choose(5); + +################################################## + +BEGIN_TEXT + +Match the statements defined below with the letters labeling their +equivalent expressions. +$PAR + +\{ColumnMatchTable($ml,indent => 30)\} +$PAR + +END_TEXT + +ANS(str_cmp($ml->ra_correct_ans)); +install_problem_grader(~~&std_problem_grader); +$showPartialCorrectAnswers = 0; + +BEGIN_TEXT + +Usually with matching problems like this, +$WW only tells you whether ${BITALIC}all$EITALIC +your answers are correct or not. If they are not all +correct, $WW will not tell you which ones are right +and which are wrong. +$PAR + +END_TEXT + +ENDDOCUMENT(); # This should be the last executable line in the problem. --- /dev/null +++ courses.dist/modelCourse/templates/setOrientation/course_info.txt @@ -0,0 +1,22 @@ +<FONT SIZE="+1"><B>You have logged into WeBWorK!</B></FONT> + +<p align="justify"> + +If you haven't already done so, you should change your password to +something other than your student ID. To do this, click on the +Password/Email link in the list at the far left, and follow the +directions on that page. + +<p align="justify"> + +Once you have changed your password, click on the "Orientation" link +in the white area at the left. This will take you to the the first +homework assignment, which will help you to learn how to use WeBWorK +effectively. + +<p align="justify"> + +If you wish to get a printed copy of one of your assignments, you can +do so from this page by pressing the "Download Hardcopy" button. You +will be taken to a page where you can select what information to +include in the set, and which set to download. --- /dev/null +++ courses.dist/modelCourse/templates/setOrientation/prob12.pg @@ -0,0 +1,70 @@ +DOCUMENT(); # This should be the first executable line in the problem. + +loadMacros( + "PGstandard.pl", + "PGchoicemacros.pl", + "PGunion.pl", + "choiceUtils.pl", + "parserOrientation.pl", + "PGcourse.pl", +); + +TEXT(beginproblem); + +Title("True/False Questions in $WW"); + +############################################## + +$a = random(1,5,1); +$b = random(6,10,1); +$c = random(-10,-1,1); +$d = random(-10,-1,1); +$e = random(1,10,1); + +$sl = new_select_list(); +$sl->{rf_print_q} = ~~&alt_print_q; +$sl->{separation} = 5; + +$sl->qa( + "\(-$a $LT -$b\)", "F", + "\($c $LE $c\)", "T", + "\($d $LT $d\)", "F", + "\(\pi $GE 3.2\)", "F", + "\($e-1 $LE $e\)", "T" +); + +$sl->choose(4); + +################################################## + +BEGIN_TEXT + +Enter a \{student "T"\} or an \{student "F"\} in each +answer space below to indicate whether the corresponding +statement is true or false. +$PAR + +$BBLOCKQUOTE +\{$sl->print_q\} +$EBLOCKQUOTE +$PAR + +END_TEXT + +ANS(str_cmp($sl->ra_correct_ans)); +install_problem_grader(~~&std_problem_grader); +$showPartialCorrectAnswers = 0; + +BEGIN_TEXT + +In most multipart problems, if one or more of your answers is wrong, +then $WW tells you which ones they are. For True/False or +multiple-choice questions, however, $WW usually only tells you whether +${BITALIC}all$EITALIC the answers are correct. It won't tell you +which ones are right or wrong. + +END_TEXT + +################################################## + +ENDDOCUMENT(); # This should be the last executable line in the problem. |