Forums

Search results: 133

WeBWorK Main Forum -> 4+1 projects at WPI -> Re: 4+1 projects at WPI

by Dick Lane -
Vicki --- I'm especially interested that two projects (... for stat I, Tutorials ...) designed their work with explicit reference to a learning model (Fading, backwards or forwards).  Perhaps recent work (both at WPI and the Rochester code camp) on macros for compound problems together with simplified ways to provide custom feedback will let us inch into providing a smidgen more tutorial help.

ASSISTments is one of several open-source projects with ideas that I hope we can adapt.  [I'm drafting a separate posting about that.]

WeBWorK Main Forum -> Bleeding Edge WeBWorK

by Michael Gage -
A quick look at one thing that was accomplished at WeBWorK::Rochester::2012 code camp. Compound Problems

A collection of sample homework sets (thanks Dick Lane, Arnie Pizer David Cervone, Barbara Margulius and all others who contributed to the sets).

A more complete view of changes to the instructor interface can be obtained by logging in to https://hosted2.webwork.rochester.edu/webwork2/maa102 using profa as login and profa as password.


Let me add my 5 cents to the discussion:

1. The coding style that Davide Cervone made popular using MathObjects with the sections:  Setup, Text, Answers and Solution  make it possible in a well written problem to change a few parameters in the Setup section and presto a new problem.  It's why I have adopted that style.  Originally, particularly in multi-step problems, I mixed the four parts together which made it more organic to write, but much less easy to maintain.

2. Everyone interested in simplifying input (and retaining good flexibility) should look through all of the PGML examples on Davide Cervone's course.
Other places to learn about PGML are PGML sample problem and PGML Lab.

3. This paper about work at Worcester PolyTech Institute just came to my attention.  It looks pretty similar to the kind of form input you were thinking about. Facilitating WeBWorK problem authoring.   (There are a few more student projects on WeBWorK coming from WPI which are listed in the reference database. Way to go guys!!)

4. Adding a form front end is certainly doable, and it's not the first time it's come up.  Given a script that translates a webform into a PG problem it wouldn't be hard to plug it in as an additional editor. As a proof of concept construct a stand alone form that returns the text of a PG problem -- one could cut and paste that text into the standard PG editor window for testing purposes -- and once it's ready we can figure out how to automatically and transparently transfer the text from the form to the editor window.

5. For the current state of the art take a look at the work accomplished at WeBWorK::Rochester -- note the various versions of the classlist page, problem editors as well as the compound problem. (It looks good on an ipad too!!) BleedingEdge WeBWorK (use login/password   profa/profa to get in ). 

WeBWorK Problems -> CompoundProblem.pl limited attempts

by Chris Donnelly -
I am using the compoundproblem package and I was curious if there was a way to remove the use of the submit button after a certain number of attempts. I can come up with a version of the package that counts attempts per part I just can't seem to figure out how to get students to stop once they hit the max number of tries in that part. can someone help please?

Installation -> Problems not showing up after upgrade

by Robin Cruz -
Hi, All,
I am trying to get an installation from the Vanilla LiveDVD (WW 2.4 on Ubuntu 10.04) working on a virtual machine. I believe it was working until I upgraded Ubuntu last week--which broke it big time. I've gone through the Installation manual for 2.4, the Upgrading WeBWorK manual and the Release Notes for 2.4 and have if running again, but there are a few problems I cannot figure out. I backed the webwork2 and pg folders back to the trunk version with SVN.

1) The problems will not display and the "map" at the top of the problem page is "odd". It is not displaying the text correctly. It looks like this when I select a problem to work:

webwork > test1 > algebra_01_01_algebraicexpressions > 1 Logged in as rcruz.
Log Out
Algebra 01 01 AlgebraicExpressions: Problem 1
This set is visible to students.
This set is visible to students.

I think first line of text shown above used to have upper case letters???

2) It will generate a hardcopy of a set, but I get a message box with:
/tmp/70YC2nSR.pdf.part could not be saved, because the source file could not be read.
However, it generates the hardcopy. I can open it from the Hardcopy folder and the problems show up just fine in the PDF.

3) I tried to see if the problems would show up in the LibraryBrowser and they show up fine if you use the "From This Course" button. But, if I click the "Try it" option, the same thing happens as in 1) . If I try to see the problems from the "Set Definition Files" button I get the following error:

WeBWorK error

An error occured while processing your request. For help, please send mail to this site's webmaster (webmaster@localhost), including all of the following information as well as what what you were doing when the error occured.

Mon Aug 29 00:17:17 2011

Warning messages

Error messages

/opt/webwork/Problems/MAT105_Templates//MAT105_Templates is a recursive symbolic link at /usr/share/perl/5.10/File/Find.pm line 557.

Call stack

The information below can help locate the source of the problem.

  • in File::Find::Follow_SymLink called at line 1179 of /usr/share/perl/5.10/File/Find.pm
  • in File::Find::_find_dir_symlnk called at line 710 of /usr/share/perl/5.10/File/Find.pm
  • in File::Find::_find_opt called at line 1297 of /usr/share/perl/5.10/File/Find.pm
  • in File::Find::find called at line 170 of /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Instructor/SetMaker.pm
  • in WeBWorK::ContentGenerator::Instructor::SetMaker::get_set_defs called at line 704 of /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Instructor/SetMaker.pm
  • in WeBWorK::ContentGenerator::Instructor::SetMaker::browse_setdef_panel called at line 799 of /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Instructor/SetMaker.pm
  • in WeBWorK::ContentGenerator::Instructor::SetMaker::make_top_row called at line 1374 of /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Instructor/SetMaker.pm
  • in WeBWorK::ContentGenerator::Instructor::SetMaker::body called at line 152 of /opt/webwork/webwork2/lib/WeBWorK/Template.pm
  • in WeBWorK::Template::template called at line 494 of /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator.pm
  • in WeBWorK::ContentGenerator::content called at line 198 of /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator.pm
  • in WeBWorK::ContentGenerator::go called at line 370 of /opt/webwork/webwork2/lib/WeBWorK.pm

Request information

Add problems to Target Set: Select a Set from this Course Algebra_01_01_AlgebraicExpressions Algebra_01_02_OperationsWithRealNumbers Algebra_01_03_GraphingFunctions Algebra_01_04_SolveLinearEq Algebra_01_05_ProblemSolvingAndFormulas Algebra_01_06_Exponents Algebra_01_07_ScientificNotation Algebra_02_01_IntroFunctions Algebra_02_02_GraphsOfFunctions Algebra_02_03_AlgebraOfFunctions Algebra_02_04_LinearFunctionsAndSlope Algebra_02_05_PointSlopeFormofLine Algebra_03_01_SystemOfLinearEq Algebra_03_02_ProblemSolvingBusinessApp Algebra_04_01_LinearInequalities Algebra_04_02_CompoundInequ Algebra_04_03_AbsoluteValue Algebra_05_01_IntroPolynomials Algebra_05_02_MultiplyPolynomials Algebra_05_03_FactoringByGrouping Algebra_05_04_FactoringTrinomials Algebra_05_05_FactoringSpecialForms Algebra_05_06_Factoring Algebra_05_07_PolyEqAndApplications Algebra_06_01_MultDivRationalExpressions Algebra_06_02_AddSubRationalExpressions Algebra_06_06_RationalEquations TEST_PROBLEMS


Browse
or Problems from
Method POST
URI /webwork2/test1/instructor/setmaker/
HTTP Headers
Keep-Alive 115
Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7
User-Agent Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.18) Gecko/20110628 Ubuntu/10.04 (lucid) Firefox/3.6.18
Accept text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Connection keep-alive
Referer https://docralphv.collegeofidaho.edu/webwork2/test1/instructor/setmaker/
Content-Length 20762
Accept-Encoding gzip,deflate
Content-Type multipart/form-data; boundary=---------------------------180332438216272680691322632690
Cookie __utma=33027372.845525900.1247692761.1314560451.1314596257.385; __utmz=33027372.1311555009.343.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none); __utmc=33027372; jsMath=font%3Asymbol%2Cwarn%3A0
Accept-Language en-us,en;q=0.5
Host docralphv.collegeofidaho.edu

Here is some more info: I currently have
Ubuntu 10.04.3 LTS
Perl v5.10.1
Apache2 2.2.14 (Ubuntu)
Mysql 5.1.41-3unbuntu12,10
Note, that I set this up with Option A and C.

Help! Classes start this Friday -- rac

ps I'm attaching a copy of that I have in the global.conf file
After lots of naive tries at an answer checker to handle student responses of different types, I realized that this task might be better handled before sending a student response to a single ANS command.


Problem setup:  3 points given
Task: enter a normal to plane they determine or NONE if they are collinear
student response to process: vector or string

current solution: (with $normal equal to cross product of suitable vectors and $abNorm being its norm)
  if  ($abNorm == 0)  {
ANS( List('NONE') -> cmp() ;
$msg = 'comment about collinear points' ;
  }  else  {
ANS( $normal -> cmp( parallel => 1 ) ) ;
$msg = 'scalar multiples are also correct' ;
  }
Note: both of those ANS modes seem relatively quiet about chiding a student for entering the wrong type of info.
    Late insight: this provides a method for having a relevant $msg within my SOLUTION.


failed attempts at a custom checker (with $ab being cross product of PQ and PR vectors)
[the first presumes a "lazy evaluation" of compound clauses]
ANS( $ab -> cmp( checker => sub {
        my ( $correct , $student , $ansHash ) = @_ ;
        return ( ( (norm($correct) == 0) && ($student == "NONE") )
                ||      ( $correct -> isParallel( $student ) ) ) ;
        } ,
 showCoordinateHints => 0 )
) ;

ANS( $ab -> cmp( parallel => 1 , checker => sub {
        my ( $correct , $student , $ansHash ) = @_ ;
        return $student == "none" if (norm($correct) == 0) ;
        return  ($correct == $student) ;
        } ,
 showCoordinateHints => 0 )
) ;

WeBWorK Problems -> compoundProblem in 2.4.9

by Ted Shifrin -
I wrote a number of problems using compoundProblem.pg. It's a bit clunky (especially when students have to re-enter their answers to early parts if they leave and come back), but now that I try it in 2.4.9 it seems to be inputting the answers to Part 1 as the first answers to the blanks in Part 2. Not only does this count as an extra try, but it's disconcerting for the student to start off Part 2 seeing a bunch of automatically entered wrong answers. Any idea what's going on?
Eric:

I have updated the contextReaction.pl file to allow subscripts on compounds as well as elements. (But not on molecules; should that be allowed, too? I.e., do you want (O_2)_3?)

I'm not currently set up to update the SVN repository, so I'm attaching the updated file here. I corrected the problem with Pb as well. Thanks for the catch.

Mike, perhaps you can update the SVN version? Thanks.

Davide

contextReaction.pl works very nicely...but I have discovered a bit of a problem when entering compounds with complex ions.
Compounds such as Zn(ClO_{3})_{2} are not liked by the macro. Any suggestions? I have included a short sample problem below the error message generated by fixing the choice to a reaction scheme that triggers the error.
It may also be necessary for contextReaction to have a comma put in line 132 between Pb and Bi. I was having lead containing formulae rejected until I changed my copy.
Thanks for all the help.

Error messages

The left-hand side of '_' must be an element, not a compound; see position 17 of formula at line 395 of [TMPL]/macros/contextReaction.pl Died within context::Reaction::BOP::underscore::_check called at line 35 of [PG]/lib/Parser/BOP.pm from within Parser::BOP::new called at line 494 of [PG]/lib/Parser.pm from within Parser::Precedence called at line 381 of [PG]/lib/Parser.pm from within Parser::Close called at line 145 of [PG]/lib/Parser.pm from within Parser::parse called at line 50 of [PG]/lib/Parser.pm from within Parser::new called at line 19 of [PG]/lib/Value/Formula.pm from within Value::Formula::new called at line 64 of [PG]/macros/Parser.pl from within main::Formula called at line 105 of [TMPL]/chem1l2/predicting_products/pred_prod.pg


The file responsible
DOCUMENT();
#
# Predict products of a chemical reaction.
# Student presented with the (balanced) reactants and asked for products.
# Answer must present balanced products.
# If a reaction does not proceed as written the product is NR.
#
loadMacros(
"PG.pl",
"PGbasicmacros.pl",
"PGchoicemacros.pl",
"PGanswermacros.pl",
"PGauxiliaryFunctions.pl",
"MathObjects.pl",
"Parser.pl",
"PGstandard.pl",
"contextReaction.pl");
#
# Normally this hash would be stored under macros and called above
#
%reactions=(
1=>{equation=>"N_{2} + H_{2} \longrightarrow NH_{3}",
class=>"combination",
components=>[
{type=>"reactant", compound=>"N_{2}", coef=>1 },
{type=>"reactant", compound=>"H_{2}", coef=>3 },
{type=>"product", compound=>"NH_{3}", coef=>2 },]},
2=>{equation=>"Cu + Zn(ClO_{3})_{2} \longrightarrow NR",
class=>"single-replacement",
components=>[
{type=>"reactant", compound=>"Cu", coef=>"" },
{type=>"reactant", compound=>"Pb(ClO_{3})_{2}", coef=>"" },
{type=>"product", compound=>"NR", coef=>"" },]},
3=>{equation=>"CuNO_{3} + CuCl \longrightarrow NR",
class=>"double-replacement",
components=>[
{type=>"reactant", compound=>"CuNO_{3}", coef=>"" },
{type=>"reactant", compound=>"CuCl", coef=>"" },
{type=>"product", compound=>"NR", coef=>"" },]},
);
#
Context("Reaction");
Context()->variables->add(NR => $context::Reaction::CONSTANT);
#
# Pick a reaction from the selected database
#
$number_of_reactions = keys %reactions;
@items=(1..$number_of_reactions);
$S = list_random(@items);
#
# Get skeleton equation, type of reaction, then get
# info about coefficients and calculate formula masses
#
$equation = $reactions{$S}{equation};
$type = $reactions{$S}{class};
$i=0;
$j=0;
for $who (@{$reactions{$S}{components}})
{
$kind=$who->{type};
if($kind eq "reactant")
{$n_r =$i;
$react[$i] = $who->{compound};
$react_coef[$i]=$who->{coef};
$i=$i+1;
}
if($kind eq "product")
{$n_p=$j;
$prod[$j] = $who->{compound};
$prod_coef[$j]=$who->{coef};
$j=$j+1;
}
}
#
# Build reactants and products sides of equation
#
$reactants = '';
for ($i=0;$i<=$n_r;$i++)
{ if($i < $n_r)
{$and = ' + ';}
if($i ==$n_r)
{$and = '';}
$r_c = '';
if($react_coef[$i] != 1)
{$r_c = $react_coef[$i]}
$reactants = $reactants.$r_c.$react[$i].$and;
}
$products = '';
for ($i=0;$i<=$n_p;$i++)
{ if($i < $n_p)
{$and = ' + ';}
if($i ==$n_p)
{$and = '';}
$p_c = '';
if($prod_coef[$i] != 1)
{$p_c = $prod_coef[$i]}
$products = $products.$p_c.$prod[$i].$and;
}
#
$react = Formula($reactants);
$prod = Formula($products);
#
Context()->texStrings;
BEGIN_TEXT
For the following problem your answer must be entered in LaTeX format.
as discussed in lecture.
$BR
Predict the products for the $type reaction shown.$BR
If a combination does not react the products should be input as NR.$BR
\($react \longrightarrow\) \{ans_rule(30)\}.
END_TEXT
Context()->normalStrings;
#
ANS($prod->cmp);
ENDDOCUMENT();