Skip to content

Commit

Permalink
Merge pull request openwebwork#602 from jirilebl/fixes2
Browse files Browse the repository at this point in the history
Some more fixes for stuff found by the script
  • Loading branch information
jwj61 authored Sep 25, 2019
2 parents 529b119 + 4e8bd13 commit 3377b28
Show file tree
Hide file tree
Showing 46 changed files with 96 additions and 586 deletions.
4 changes: 3 additions & 1 deletion OpenProblemLibrary/MC/Trigonometry/Angles02.pg
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ DOCUMENT();

loadMacros(
"PGstandard.pl",
"MathObjects.pl",,"parserMultiAnswer.pl"
"MathObjects.pl",
"parserMultiAnswer.pl",
"PGcourse.pl"
);

# Print problem number and point value (weight) for the problem
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
+DOCUMENT();
## DBsubject(Geometry)
## DBchapter(Shapes)
## DBsection(Properties of shapes)
## Level(3)

DOCUMENT();
loadMacros(
"PGstandard.pl",
"PGchoicemacros.pl",
Expand Down Expand Up @@ -114,10 +119,3 @@ END_SOLUTION

;
ENDDOCUMENT();


## DBsubject(Geometry)
## DBchapter(Shapes)
## DBsection(Properties of shapes)
## Level(3)

Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## DBsubject(Arithmetic)
## DBchapter(Integers)
## DBsection(Applications)
## Level(4)
## MLT(arithmetic_integers_applications_scales)

DOCUMENT();
loadMacros(
"PGstandard.pl",
Expand Down Expand Up @@ -192,6 +198,9 @@ $radio=new_multiple_choice();
$radio->qa("How many tetrahedrons weigh the same as one cube? ", "3 ");
#FIRST PAREN IS QUESTION, SECOND PAREN IS CORRECT ANSWER
$radio->extra("\(\frac{2}{3}\) ", "\(1\frac{1}{2}\) ", "2 ");

TEXT(beginproblem());

BEGIN_TEXT
These scales are balanced.
$BR
Expand All @@ -217,11 +226,3 @@ END_SOLUTION

;
ENDDOCUMENT();


## DBsubject(Arithmetic)
## DBchapter(Integers)
## DBsection(Applications)
## Level(4)
## MLT(arithmetic_integers_applications_scales)

Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@

DOCUMENT();

DOCUMENT();

loadMacros(
"PGstandard.pl",
"MathObjects.pl",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@

DOCUMENT();

DOCUMENT();

loadMacros(
"PGstandard.pl",
"MathObjects.pl",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@

DOCUMENT();

DOCUMENT();

loadMacros(
"PGstandard.pl",
"MathObjects.pl",
Expand Down
62 changes: 0 additions & 62 deletions OpenProblemLibrary/PCC/BasicAlgebra/FunctionBasics/Functions235.pg
Original file line number Diff line number Diff line change
Expand Up @@ -95,66 +95,4 @@ This tells us that [`x`] must be greater than or equal to [`-\frac{[$a]}{[$b]}`]
END_PGML_SOLUTION


ENDDOCUMENT();



##############################################

DOCUMENT();

loadMacros(
"PGstandard.pl",
"MathObjects.pl",
"PGML.pl",
"PCCmacros.pl",
"contextFraction.pl",
"PGcourse.pl"
);

TEXT(beginproblem());

##############################################


Context("Fraction");
$a = random(2,10,1);
$b = random(2,20,1);
while (gcd($a,$b) != 1) {$b = random(2,20,1);}

$r = Fraction("-$a","$b");

Context("Numeric");
$f = Formula("sqrt($a+$b x)")->reduce;

Context("Interval");
$domain = Compute("[$r,inf)");

##############################################

Context()->texStrings;

BEGIN_TEXT
Find the domain of the function \(f\) where \(f(x)=$f\).

$PAR

The domain is \{ans_rule(20)\} (in interval notation).
$BR If you need to enter \(\infty\), you can type $BBOLD INF$EBOLD or $BBOLD INFINITY$EBOLD. If you need to union two (or more) intervals, use the letter $BBOLD U$EBOLD. For example, to enter \((-\infty,5)\cup(5,10]\) you can type $BBOLD (-inf,5)U(5,10]$EBOLD.





END_TEXT

Context()->normalStrings;

##############################################

ANS($domain->cmp);




ENDDOCUMENT();
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,17 @@
# ENDDESCRIPTION

## DBCCSS('6.NS.6')
## DBsubject(Algebra)
## DBchapter(Cartesian coordinate system)
## DBsection(Plotting points)
## Institution(PCC)
## Author(Alex Jordan, Carl Yao, Chris Hughes)
## MLT(id_points_from_graph_1)
## MLTleader(1)
## Level(1)
## MO(1)
## KEYWORDS('coordinate','ordered pair')


##############################################

Expand Down Expand Up @@ -146,128 +157,3 @@ END_PGML_SOLUTION


ENDDOCUMENT();




# OLD
# OLD
# OLD
# WeBWorK problem written by Carl Yao
# Portland Community College
#
# Identify an ordered pair on a coordinate system. The point could be in
# any quadrant, but not on any axis.
#
# ENDDESCRIPTION

## DBCCSS('6.NS.6')
## DBsubject(Algebra)
## DBchapter(Cartesian coordinate system)
## DBsection(Plotting points)
## Institution(PCC)
## Author(Alex Jordan, Carl Yao, Chris Hughes)
## MLT(id_points_from_graph_1)
## MLTleader(1)
## Level(1)
## MO(1)
## KEYWORDS('coordinate','ordered pair')

##############################################

DOCUMENT();


##############################################

Context("Numeric");
$refreshCachedImages=1;

$x = non_zero_random(-8,8,1);
do {$y = non_zero_random(-8,8,1);} until (abs($x)!=abs($y));

@ar_x = ($x,$x,-$x,-$x);
@ar_y = ($y,-$y,$y,-$y);

$xmin = -10;
$xmax = 10;
$ymin = -10;
$ymax = 10;

@gr=();

for ($i=0;$i<=3;$i++) {
$gr[$i] = init_graph($xmin,$ymin,$xmax,$ymax,
axes=>[0,0],
grid=>[$xmax-$xmin,$ymax-$ymin],
size=>[800,800]
);

$gr[$i]->stamps(closed_circle($ar_x[$i],$ar_y[$i],'blue'));
}

#randomize choices
$j=5;
$p=random(1,3,1);
do {$q=random(1,3,1);} until ($p!=$q);
$gr[$j]=$gr[$p];
$gr[$p]=$gr[$q];
$gr[$q]=$gr[$j];

@ar_choice = ("A","B","C","D");
$correct = random(0,3,1);
$gr[$j]=$gr[$correct];
$gr[$correct]=$gr[0];
$gr[0]=$gr[$j];

$radio = RadioButtons(
["A","B","C","D"],
"$ar_choice[$correct]", # correct answer
order => ["A","B","C","D"],
);

##############################################

Context()->texStrings;

BEGIN_TEXT

$PAR
Choose the graph showing \( ($x,$y) \) in the coordinate system.
$PAR
Click on a graph to enlarge it.
$PAR

A. \{ image( insertGraph($gr[0]), width=>400, height=>400, tex_size=>800,
extra_html_tags=>'title="Graph of a coordinate system with an ordered pair." alt="Graph of a coordinate system with an ordered pair."' ) \}
$PAR
B. \{ image( insertGraph($gr[1]), width=>400, height=>400, tex_size=>800,
extra_html_tags=>'title="Graph of a coordinate system with an ordered pair." alt="Graph of a coordinate system with an ordered pair."' ) \}
$PAR
C. \{ image( insertGraph($gr[2]), width=>400, height=>400, tex_size=>800,
extra_html_tags=>'title="Graph of a coordinate system with an ordered pair." alt="Graph of a coordinate system with an ordered pair."' ) \}
$PAR
D. \{ image( insertGraph($gr[3]), width=>400, height=>400, tex_size=>800,
extra_html_tags=>'title="Graph of a coordinate system with an ordered pair." alt="Graph of a coordinate system with an ordered pair."' ) \}

$BR
$BR
\{ $radio->buttons() \}



END_TEXT

Context()->normalStrings;

##############################################

ANS( $radio->cmp() );

BEGIN_PGML_SOLUTION

The correct answer is [$radio->correct_ans()].

END_PGML_SOLUTION

ENDDOCUMENT();
Loading

0 comments on commit 3377b28

Please sign in to comment.