Skip to content

Commit

Permalink
remove all beginproblem() from distribution problems
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-Jordan committed Jun 23, 2023
1 parent 59ba1e3 commit 656e0d3
Show file tree
Hide file tree
Showing 87 changed files with 36 additions and 164 deletions.
1 change: 0 additions & 1 deletion conf/snippets/blankProblem.pg
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ loadMacros("PG.pl",

## Do NOT show partial correct answers
$showPartialCorrectAnswers = 0;
TEXT(beginproblem());

BEGIN_TEXT

Expand Down
3 changes: 0 additions & 3 deletions conf/snippets/blankProblem2.pg
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ loadMacros(
"PGcourse.pl", # Customization file for the course
);

# Print problem number and point value (weight) for the problem
TEXT(beginproblem());

# Show which answers are correct and which ones are incorrect
$showPartialCorrectAnswers = 1;

Expand Down
1 change: 0 additions & 1 deletion courses.dist/modelCourse/templates/set0/prob1.pg
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ loadMacros(
"PGauxiliaryFunctions.pl"
);

TEXT(beginproblem());
$showPartialCorrectAnswers = 1;

$a = random(-10,-1,1);
Expand Down
1 change: 0 additions & 1 deletion courses.dist/modelCourse/templates/set0/prob1a.pg
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ loadMacros(
"PGauxiliaryFunctions.pl"
);

TEXT(beginproblem());
$showPartialCorrectAnswers = 1;


Expand Down
1 change: 0 additions & 1 deletion courses.dist/modelCourse/templates/set0/prob1b.pg
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ loadMacros(
"PGauxiliaryFunctions.pl"
);

TEXT(beginproblem());
$showPartialCorrectAnswers = 1;


Expand Down
3 changes: 1 addition & 2 deletions courses.dist/modelCourse/templates/set0/prob2.pg
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ loadMacros(
"PGauxiliaryFunctions.pl"
);

TEXT(beginproblem());
$showPartialCorrectAnswers = 1;

TEXT(EV2(<<EOT));
Expand Down Expand Up @@ -69,4 +68,4 @@ answers must be correct before you get credit for the problem.


EOT
ENDDOCUMENT(); # This should be the last executable line in the problem.
ENDDOCUMENT(); # This should be the last executable line in the problem.
3 changes: 1 addition & 2 deletions courses.dist/modelCourse/templates/set0/prob3.pg
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ loadMacros(
"PGauxiliaryFunctions.pl"
);

TEXT(beginproblem());
$showPartialCorrectAnswers = 0;


Expand Down Expand Up @@ -75,4 +74,4 @@ problem list page (use the button at the top of this page) and choosing "formatt
of "text". Sometimes there is a 15-20 second delay in viewing a problem in "typeset" mode the first time.
EOT

ENDDOCUMENT(); # This should be the last executable line in the problem.
ENDDOCUMENT(); # This should be the last executable line in the problem.
1 change: 0 additions & 1 deletion courses.dist/modelCourse/templates/set0/prob4/prob4.pg
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ loadMacros(
"PGauxiliaryFunctions.pl"
);

TEXT(beginproblem());
$showPartialCorrectAnswers = 0;


Expand Down
1 change: 0 additions & 1 deletion courses.dist/modelCourse/templates/set0/prob5.pg
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ loadMacros(
"PGauxiliaryFunctions.pl"
);

TEXT(beginproblem());
$showPartialCorrectAnswers = 0;


Expand Down
1 change: 0 additions & 1 deletion courses.dist/modelCourse/templates/setDemo/c4s5p2.pg
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ loadMacros("PGbasicmacros.pl",
"PGauxiliaryFunctions.pl"
);

TEXT(beginproblem());
$showPartialCorrectAnswers = 1;

$n = random(3,6,1);
Expand Down
4 changes: 1 addition & 3 deletions courses.dist/modelCourse/templates/setDemo/josephus.pg
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,6 @@ parent.gameStatus.document.close()

EOF


TEXT(beginproblem());
TEXT(MODES(
TeX => '',
Latex2HTML => "\begin{rawhtml} <NOSCRIPT> This problem requires that Java
Expand Down Expand Up @@ -203,4 +201,4 @@ $ans =3;
ANS(num_cmp($ans,reltol=>1,format =>"%0.14g") ); #We are allowing 1 percent error for the answer.


ENDDOCUMENT();
ENDDOCUMENT();
3 changes: 1 addition & 2 deletions courses.dist/modelCourse/templates/setDemo/limits.pg
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ loadMacros(
"PGauxiliaryFunctions.pl"
);

TEXT(&beginproblem);
$showPartialCorrectAnswers = 1;

$a=random(-3,3,1);
Expand Down Expand Up @@ -87,4 +86,4 @@ ANS(num_cmp( [ $b, $bp1,'DNE'] , strings => ['DNE'] )) ;
ANS(num_cmp( [ $c, 'DNE' ] , strings => ['DNE'] )) ;


ENDDOCUMENT(); # This should be the last executable line in the problem.
ENDDOCUMENT(); # This should be the last executable line in the problem.
3 changes: 1 addition & 2 deletions courses.dist/modelCourse/templates/setDemo/liteApplet1.pg
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ loadMacros("PGbasicmacros.pl",
);

$showPartialCorrectAnswers = 1;
TEXT(beginproblem());

# The link to the java applet is hard wired to use the java applet
# served from the University of Rochester WeBWorK machine.
Expand Down Expand Up @@ -65,4 +64,4 @@ ANS(num_cmp(dist($kandahar,$shindand), reltol => 3, units=>'km'));



ENDDOCUMENT();
ENDDOCUMENT();
4 changes: 1 addition & 3 deletions courses.dist/modelCourse/templates/setDemo/liteApplet2.pg
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ loadMacros("PGbasicmacros.pl",
);

$showPartialCorrectAnswers = 1;
TEXT(beginproblem());


BEGIN_TEXT
This is a lite applet designed by Frank Wattenberg.
Expand Down Expand Up @@ -71,4 +69,4 @@ ANS(num_cmp(dist(cityLoc($index[2]),cityLoc($index[2])), reltol=>3, un



ENDDOCUMENT();
ENDDOCUMENT();
1 change: 0 additions & 1 deletion courses.dist/modelCourse/templates/setDemo/nsc2s10p2.pg
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ loadMacros(
"PGgraphmacros.pl"
);

TEXT(beginproblem());
$showPartialCorrectAnswers = 0;

$a=random(0, 6.3, .1);
Expand Down
2 changes: 0 additions & 2 deletions courses.dist/modelCourse/templates/setDemo/prob0837.pg
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ loadMacros( "PGbasicmacros.pl",
"PG_CAPAmacros.pl"
);

TEXT(beginproblem());

# machine translated from CAPA.
# This is probaly not a good model for elegant PG code.
## **************************************
Expand Down
2 changes: 0 additions & 2 deletions courses.dist/modelCourse/templates/setDemo/prob5.pg
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ return( $a*Math.pow(x,2) + $b*x +$c );}

EOF


TEXT(beginproblem());
TEXT(MODES(
TeX => '',
Latex2HTML => "\begin{rawhtml} <NOSCRIPT> This problem requires that Java
Expand Down
2 changes: 0 additions & 2 deletions courses.dist/modelCourse/templates/setDemo/prob6b.pg
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ END_TEXT
$p = random(2,9,1); # multiplier
$p2 = ( $p % 2 == 0) ? 2*$p : $p;

TEXT(beginproblem());

# The link to the java applet is hard wired to use the java applet
# served from the University of Rochester WeBWorK machine.
# It is possible to set this up so that the java applet is served
Expand Down
1 change: 0 additions & 1 deletion courses.dist/modelCourse/templates/setDemo/s2_2_1.pg
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ loadMacros(
"PGauxiliaryFunctions.pl"
);

TEXT(&beginproblem);
$showPartialCorrectAnswers = 1;

$a1 = random(2,7,1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ loadMacros(
"PGanswermacros.pl"
);

TEXT(&beginproblem);
$showPartialCorrectAnswers = 1;

BEGIN_TEXT
Expand Down Expand Up @@ -83,4 +82,4 @@ $strict_palindrome_test = sub {

ANS($strict_palindrome_test);

ENDDOCUMENT();
ENDDOCUMENT();
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ loadMacros( "PGbasicmacros.pl",
"PGanswermacros.pl",
);

TEXT(beginproblem());

$showPartialCorrectAnswers = 1;
$showHint =0;

Expand Down
2 changes: 0 additions & 2 deletions courses.dist/modelCourse/templates/setDemo/srw1_9_4.pg
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ loadMacros(
"PGauxiliaryFunctions.pl"
);

TEXT(&beginproblem);

$showPartialCorrectAnswers = 1;

#install_problem_grader(~~&std_problem_grader); ##uncomment to use std grader
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ loadMacros(
"PGchoicemacros.pl",
"PGanswermacros.pl"
);
TEXT(beginproblem(), $BR,$BBOLD, "Conditional questions example", $EBOLD, $BR,$BR);
TEXT($BBOLD, "Conditional questions example", $EBOLD, $BR,$BR);
$showPartialCorrectAnswers = 1;

$a1 = random(3,25,1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ loadMacros("PGbasicmacros.pl",
"PGnumericalmacros.pl",
"PGgraphmacros.pl"
);
TEXT(beginproblem(), $BR,$BBOLD, "Hermite polynomial graph example", $EBOLD, $BR,$BR);
TEXT($BBOLD, "Hermite polynomial graph example", $EBOLD, $BR,$BR);
$showPartialAnswers = 1;

$graph = init_graph(-5,-5,5,5,'axes'=>[0,0],'grid'=>[10,10]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ loadMacros("PGbasicmacros.pl",
);
$showPartialCorrectAnswers = 0;

TEXT(beginproblem(), $BR,$BBOLD, "HTML links example", $EBOLD, $BR,$BR);
TEXT($BBOLD, "HTML links example", $EBOLD, $BR,$BR)

BEGIN_TEXT
This example shows how to link to resources outside the problem itself.
Expand Down Expand Up @@ -77,4 +77,4 @@ TEXT(
endtable()
);

ENDDOCUMENT();
ENDDOCUMENT();
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ loadMacros("PG.pl",
"PGanswermacros.pl",
);

TEXT(beginproblem(), $BR,$BBOLD, "Java applet example", $EBOLD, $BR,$BR);
TEXT($BBOLD, "Java applet example", $EBOLD, $BR,$BR);
# define function to be evaluated
$a= random(1,3,1);
$b= random(-4,4,.1);
Expand Down Expand Up @@ -92,4 +92,4 @@ ANS(str_cmp('No') );
ANS(function_cmp( '(a/2)^2', 'a') );


ENDDOCUMENT();
ENDDOCUMENT();
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ loadMacros(
"PGchoicemacros.pl",
"PGanswermacros.pl",
);
TEXT(beginproblem(), $BR,$BBOLD, "JavaScript Example 1", $EBOLD, $BR,$BR);
TEXT($BBOLD, "JavaScript Example 1", $EBOLD, $BR,$BR);
# define function to be evaluated
$a= random(1,3,1);
$b= random(-4,4,.1);
Expand Down Expand Up @@ -43,7 +43,6 @@ return( $a*Math.pow(x,2) + $b*x +$c );}

EOF

TEXT(beginproblem());
TEXT(MODES( TeX => "",
Latex2HTML => "\begin{rawhtml}
<NOSCRIPT> This problem requires that Java Script be
Expand Down Expand Up @@ -143,4 +142,4 @@ TEXT(MODES(

ANS(num_cmp($ans,reltol => 1) ); #We are allowing 1 percent error for the answer.

ENDDOCUMENT();
ENDDOCUMENT();
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ loadMacros("PGbasicmacros.pl",
"PGanswermacros.pl",
"PGnumericalmacros.pl", # needed for the javaScript spline code
);
TEXT(beginproblem(), $BR,$BBOLD, "JavaScript Example 2", $EBOLD, $BR,$BR);
TEXT($BBOLD, "JavaScript Example 2", $EBOLD, $BR,$BR);

# define function to be evaluated
$a= random(1,3,1);
Expand Down Expand Up @@ -49,7 +49,6 @@ $javascript= javaScript_cubic_spline(~~@x, ~~@y, name =>'func');
HEADER_TEXT( javaScript_cubic_spline(~~@x, ~~@y, name =>'func') );


TEXT(beginproblem());
TEXT(MODES( TeX => "",
Latex2HTML => "\begin{rawhtml}
<NOSCRIPT> This problem requires that Java Script be
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ loadMacros("PGbasicmacros.pl",
);

$showPartialCorrectAnswers = 1;
TEXT(beginproblem());

# The link to the java applet is hard wired to use the java applet
# served from the University of Rochester WeBWorK machine.
Expand Down Expand Up @@ -65,4 +64,4 @@ ANS(num_cmp(dist($kandahar,$shindand), reltol => 3, units=>'km'));



ENDDOCUMENT();
ENDDOCUMENT();
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ loadMacros("PGbasicmacros.pl",
);

$showPartialCorrectAnswers = 1;
TEXT(beginproblem());


BEGIN_TEXT
This is a lite applet designed by Frank Wattenberg.
Expand Down Expand Up @@ -71,4 +69,4 @@ ANS(num_cmp(dist(cityLoc($index[2]),cityLoc($index[2])), reltol=>3, un



ENDDOCUMENT();
ENDDOCUMENT();
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ loadMacros(
);


TEXT(beginproblem(), $BR,$BBOLD, "Matching list example", $EBOLD, $BR,$BR);
TEXT($BBOLD, "Matching list example", $EBOLD, $BR,$BR);


# Since this is a matching question, we do not usually wish to tell students
Expand Down Expand Up @@ -126,4 +126,4 @@ END_TEXT
# Enter the correct answers to be checked against the answers to the students.
ANS( str_cmp( $ml->ra_correct_ans ) ) ;

ENDDOCUMENT();
ENDDOCUMENT();
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ loadMacros("PGbasicmacros.pl",
"PGanswermacros.pl",

);
TEXT(beginproblem(), $BR,$BBOLD, "Multiple choice example", $EBOLD, $BR,$BR);
TEXT($BBOLD, "Multiple choice example", $EBOLD, $BR,$BR);

$showPartialCorrectAnswers = 0;
# Make a new multiple choice object.
Expand Down Expand Up @@ -42,4 +42,4 @@ END_TEXT
# Enter the correct answers to be checked against the answers to the students.
ANS( str_cmp( $mc->correct_ans ) ) ;

ENDDOCUMENT();
ENDDOCUMENT();
Loading

0 comments on commit 656e0d3

Please sign in to comment.