You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(16) |
Nov
(10) |
Dec
(4) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(34) |
Feb
(12) |
Mar
(21) |
Apr
|
May
(5) |
Jun
(13) |
Jul
(50) |
Aug
(62) |
Sep
(72) |
Oct
(17) |
Nov
(16) |
Dec
(19) |
2006 |
Jan
(26) |
Feb
(9) |
Mar
|
Apr
(8) |
May
(5) |
Jun
(7) |
Jul
(21) |
Aug
(33) |
Sep
(17) |
Oct
(4) |
Nov
(9) |
Dec
|
2007 |
Jan
|
Feb
(4) |
Mar
|
Apr
|
May
(6) |
Jun
(16) |
Jul
(8) |
Aug
(1) |
Sep
|
Oct
(2) |
Nov
(2) |
Dec
(2) |
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(4) |
Jul
(11) |
Aug
(6) |
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(4) |
Nov
|
Dec
|
2014 |
Jan
(2) |
Feb
(4) |
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
2016 |
Jan
(4) |
Feb
(4) |
Mar
(3) |
Apr
|
May
(1) |
Jun
(1) |
Jul
(1) |
Aug
(2) |
Sep
(1) |
Oct
(1) |
Nov
(1) |
Dec
|
2017 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
From: Michael G. <ga...@ma...> - 2008-07-08 16:04:32
|
Thanks Davide, On another issue -- problemPreserveAnswers.pl keeps $ from being erased in student sticky answers. Does using EV3P fix this problem directly in PGbasicmacros.pl? I don't have a test case to work on to see if this issue is fixed in rel-2-4-patches. If it's not already fixed then one will still have to use problemPreserveAnswers.pl for this release. Take care, Mike On Jul 8, 2008, at 11:41 AM, Davide Cervone wrote: > I think this was a file that John Jones wrote originally, so perhaps > he knows where they are used. I am not aware of any that use it, and > don't see any by grepping the libraries. The error was probably > introduced by me last summer when I was trying to encapsulate the > initialization code and make sure it runs from the _init() routine > rather than in the .pl file itself. > > As for whether there is a better way, currently this is the right way > to do it. One of the things that came out of the AIM conference is > that there needs to be a better way to add features to a context > (rather than just load a completely new context). I have some ideas > for that, but haven't completed the work on it. After that, it would > be reasonable to make this a "context patch" rather than a separate > context, but for now, this is the right way. > > I think the name change to contextCombinatorics would be fine. > > Davide > > |
From: Davide C. <dp...@un...> - 2008-07-08 15:41:33
|
I think this was a file that John Jones wrote originally, so perhaps he knows where they are used. I am not aware of any that use it, and don't see any by grepping the libraries. The error was probably introduced by me last summer when I was trying to encapsulate the initialization code and make sure it runs from the _init() routine rather than in the .pl file itself. As for whether there is a better way, currently this is the right way to do it. One of the things that came out of the AIM conference is that there needs to be a better way to add features to a context (rather than just load a completely new context). I have some ideas for that, but haven't completed the work on it. After that, it would be reasonable to make this a "context patch" rather than a separate context, but for now, this is the right way. I think the name change to contextCombinatorics would be fine. Davide On Jul 8, 2008, at 11:09 AM, Mike Gage via activitymail wrote: > Log Message: > ----------- > fixed typo by changing all references to IntegerFunction or > IntegerFunctions to the plural > > The typo gave an immediate error when IntegerFunctions2::Init was > called instead of > IntegerFunction2::Init while the internal name of the package was > integerFunction2. > The external name of the context was IntegerFunctions and > everything has been changed > to match that. > > The fact that this bug has existed so long leads me to believe that > this context is not > much used. Is there an alternative or better way to include C(n,k) > and P(n,k) as > functions in the context? I'd also suggest changing the name to > something like > contextCombinatorics since I think this is more likely to show up > when someone searches > for C(n,k) or P(N,k) functionality using a keyword search. This > would be feasible > if the current contextIntegerFunctions has not be used very much. > > -- Mike Gage and Noah Bennett > > Tags: > ---- > rel-2-4-patches > > Modified Files: > -------------- > pg/macros: > contextIntegerFunctions.pl > > Revision Data > ------------- > Index: contextIntegerFunctions.pl > =================================================================== > RCS file: /webwork/cvs/system/pg/macros/contextIntegerFunctions.pl,v > retrieving revision 1.1.6.2.2.1 > retrieving revision 1.1.6.2.2.2 > diff -Lmacros/contextIntegerFunctions.pl -Lmacros/ > contextIntegerFunctions.pl -u -r1.1.6.2.2.1 -r1.1.6.2.2.2 > --- macros/contextIntegerFunctions.pl > +++ macros/contextIntegerFunctions.pl > @@ -46,7 +46,7 @@ > > sub _contextIntegerFunctions_init {context::IntegerFunctions2::Init > ()}; # don't reload this file > > -package context::IntegerFunction2; > +package context::IntegerFunctions2; > our @ISA = qw(Parser::Function::numeric2); # checks for 2 numeric > inputs > > sub C { > @@ -69,8 +69,8 @@ > $context->{name} = "IntegerFunctions"; > > $context->functions->add( > - C => {class => 'context::IntegerFunction2'}, > - P => {class => 'context::IntegerFunction2'}, > + C => {class => 'context::IntegerFunctions2'}, > + P => {class => 'context::IntegerFunctions2'}, > ); > > main::Context("IntegerFunctions"); > > ---------------------------------------------------------------------- > --- > Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! > Studies have shown that voting for your favorite open source project, > along with a healthy diet, reduces your potential for chronic lameness > and boredom. Vote Now at http://www.sourceforge.net/community/cca08 > _______________________________________________ > OpenWeBWorK-CVS mailing list > Ope...@li... > https://lists.sf.net/lists/listinfo/openwebwork-cvs > > |
From: Michael G. <ga...@ma...> - 2008-06-27 00:52:53
|
On Jun 26, 2008, at 8:40 PM, Davide P. Cervone wrote: >> I see your point. The counter argument is that >> setOrientation.pg is being put in modelCourse and is likely >> to be available on every course on the server. > > I don't see that as a counter argument. I think setOrientation.pl > should be kept with the problems that call it rather than putting > it in the location of general-purpose macros. If you are > duplicating setOrientation in every course, then duplicate > setOrientation.pl as well. If you are really worried, then make a > link to a common area instead. > OK. I've thought some more about it and I agree. I'll put parserOrientation.pl in setOrientation in modelCourse and take it out of pg/macros. >> (It's the one set I build for each new user on our hosted and >> hosted2 servers. I use >> it instead of set 0. ) > > We use it that way here, as well. As I recall, there may be some > Union-specific information in the last problem (something about our > Calculus Help Center). I haven't checked to see if you have edited > them or not. > I believe I did but I'll double check. >> There is no space crunch, but duplicating setOrientation.pl >> everywhere seems >> inelegant. > > No more inelegant than duplicating the problem files, eh? > True. >> Another argument (on the other side) is that including it in every >> template directory >> would give them an opportunity to modify macros -- much as they can >> modify the questions in setOrientation. > > Certainly true. > > Davide > Take care, Mike |
From: Davide P. C. <dp...@un...> - 2008-06-27 00:40:12
|
> I see your point. The counter argument is that > setOrientation.pg is being put in modelCourse and is likely > to be available on every course on the server. I don't see that as a counter argument. I think setOrientation.pl should be kept with the problems that call it rather than putting it in the location of general-purpose macros. If you are duplicating setOrientation in every course, then duplicate setOrientation.pl as well. If you are really worried, then make a link to a common area instead. > (It's the one set I build for each new user on our hosted and > hosted2 servers. I use > it instead of set 0. ) We use it that way here, as well. As I recall, there may be some Union-specific information in the last problem (something about our Calculus Help Center). I haven't checked to see if you have edited them or not. > There is no space crunch, but duplicating setOrientation.pl > everywhere seems > inelegant. No more inelegant than duplicating the problem files, eh? > Another argument (on the other side) is that including it in every > template directory > would give them an opportunity to modify macros -- much as they can > modify the questions in setOrientation. Certainly true. Davide |
From: Michael G. <ga...@ma...> - 2008-06-26 23:56:52
|
Hi Davide, I see your point. The counter argument is that setOrientation.pg is being put in modelCourse and is likely to be available on every course on the server. (It's the one set I build for each new user on our hosted and hosted2 servers. I use it instead of set 0. ) There is no space crunch, but duplicating setOrientation.pl everywhere seems inelegant. Another argument (on the other side) is that including it in every template directory would give them an opportunity to modify macros -- much as they can modify the questions in setOrientation. Your thoughts? Take care, Mike On Jun 26, 2008, at 7:49 PM, Davide P. Cervone wrote: > parserOrientation.pl should only be used by the problems in the > parserOrientation set, and they will find the .pl file there > automatically (provided "." is in the path, which it is by default). > So there is no need to add it to pg/macros, and I'd prefer you > didn't, as that makes it look like it is a general macro file for use > in other situations. > > Davide > > > On Jun 26, 2008, at 1:16 PM, Mike Gage via activitymail wrote: > >> Log Message: >> ----------- >> put parserOrientation.pl in pg/macros since it is used >> in many courses >> >> Tags: >> ---- >> rel-2-4-patches >> >> Added Files: >> ----------- >> pg/macros: >> parserOrientation.pl >> >> Revision Data >> ------------- >> --- /dev/null >> +++ macros/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; >> >> --------------------------------------------------------------------- >> - >> --- >> Check out the new SourceForge.net Marketplace. >> It's the best place to buy or sell services for >> just about anything Open Source. >> http://sourceforge.net/services/buy/index.php >> _______________________________________________ >> OpenWeBWorK-CVS mailing list >> Ope...@li... >> https://lists.sf.net/lists/listinfo/openwebwork-cvs >> >> > > > ---------------------------------------------------------------------- > --- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > OpenWeBWorK-Devel mailing list > Ope...@li... > https://lists.sf.net/lists/listinfo/openwebwork-devel > |
From: Davide P. C. <dp...@un...> - 2008-06-26 23:50:00
|
parserOrientation.pl should only be used by the problems in the parserOrientation set, and they will find the .pl file there automatically (provided "." is in the path, which it is by default). So there is no need to add it to pg/macros, and I'd prefer you didn't, as that makes it look like it is a general macro file for use in other situations. Davide On Jun 26, 2008, at 1:16 PM, Mike Gage via activitymail wrote: > Log Message: > ----------- > put parserOrientation.pl in pg/macros since it is used > in many courses > > Tags: > ---- > rel-2-4-patches > > Added Files: > ----------- > pg/macros: > parserOrientation.pl > > Revision Data > ------------- > --- /dev/null > +++ macros/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; > > ---------------------------------------------------------------------- > --- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > OpenWeBWorK-CVS mailing list > Ope...@li... > https://lists.sf.net/lists/listinfo/openwebwork-cvs > > |
From: P. G. L. <gl...@um...> - 2007-12-05 21:00:52
|
Hi Sam, The current documentation on the AIM site includes some 20-35 pages, counting the code snippets that I've been working on. I spent a bit of time seeing how easy it is to copy those over to the MediaWiki site, and it's non-trivial but not a disaster. The biggest problem is that MoodleWiki thinks that WikiWords are automatically links (but MediaWiki doesn't seem to subscribe to this) and the links in the two are different. In any event, I marked the section of the language documentation on the old site, <https://webwork.maa.org/moodle/mod/wiki/view.php?id=160>, as being moved to the MediaWiki site, and played with filling in pages at <http://webwork.maa.org/wiki/Writing_WeBWorK_questions>. Basically I copied the top level pages to see how it works and stopped there. If you want to copy the pages under the Index of Problem Techniques, at <https://webwork.maa.org/moodle/mod/wiki/view.php?id=160&page=ProblemTechniquesIndexByTopic>, that would be great. Other than that there are only a couple of other pages that need to be moved across, and I suspect that some of those will want to be edited and reorganized. I also need to learn how to attach files in MediaWiki. For example, to <http://webwork.maa.org/wiki/SampleProblem1> et al. Additional comments and suggestions welcome, of course. Gavin -- P Gavin LaRose, PhD | gl...@um... | 734.764.6454 or maybe 763.3249 Program Manager, Instructional Tech. | ...you have to respect someone Mathematics Dept., Univ. of Michigan | who can spell Tuesday, even if http://www.math.lsa.umich.edu/~glarose/ | they can't spell it right. -Milne On 2007-11-29 [16:32] Sam Hathaway wrote: > On 11/26/2007 10:56 AM, P. Gavin LaRose wrote: > >> We now have an incomplete but growing block of documentation at >> <https://webwork.maa.org/moodle/mod/wiki/view.php?id=160>. I've been >> slowly expanding this in the course of this semester, mostly under the >> index of problem techniques section (at >> <https://webwork.maa.org/moodle/mod/wiki/view.php?id=160&page=ProblemTechniquesIndexByTopic>) >> >> This is obviously incomplete, and is also hobbled by being on the ugly >> Moodle Wiki. I understand that Mike and Sam have MediaWiki running >> somewhere, and think that there's some global view for how all of the >> WeBWorK documentation will eventually reside on all of these things. >> >> My questions, which may be answered "yeah, something like that >> eventually" are (1) whether we can or should be moving the existing >> documentation over to a different site (e.g., the MediaWiki site), both >> for ease of editing and for eventual unveiling. and (2) if so, whether >> the pages be moved transparently, without screwing up all of the links, >> formatting, etc. Because it appeared too hard to figure out for Moodle's >> Wiki I've been doing most of the formatting for the pages that I'm doing >> in HTML, so it would be nice if that were preserved somehow. >> >> Just thinking aloud, in any case. > > Hi Gavin (and other developers), > > We do in fact have a wiki set up on webwork.maa.org at > <http://webwork.maa.org/wiki/>. It should recognize a Moodle cookie and > automatically log you in. (Initial login though the MediaWiki login page > isn't quite working yet, so log into Moodle first if necessary.) > > I've been thinking about how to organize the new site, which will mostly > contain documentation. Here are my thoughts -- please give feedback! > > Top-level categories: > > * Installation, administration, and maintenance - Info for sysadmins on > how to install and manage WeBWorK. > > * Using WeBWorK - How to use the WeBWorK web interface. Mostly for > instructors, since most of the complexity of WW is in the instructor > tools, but we would also want to have docs for students. > > * Using PG - How to write and modify PG problems. > > For now I'm focusing mostly on PG docs, since we've been doing a lot of > work on them lately and "modern" PG is the least discoverable aspect of > WW. So within the Using PG category, we'd have: > > * Macro and library reference - This is what I'm currently working on. > It's represented as POD docs in the macro and library files in CVS. That > way, it's easy to keep it up-to-date and it's versioned along with the > code itself. (A web-based annotation system would be nice, but I think > it's more important to keep it "close" to the code.) > > * Manuals and HOWTOs - Information on larger features of PG, like > MathObjects, or certain techniques, like the stuff you've been working on. > > * "Best-practices" sample problems - Problems based on a "new" and > "non-crappy" blankProblem.pg, that feature MathObjects, don't use > deprecated techniques, and aren't the same trivial examples you always > see. These should be linked to from the other documentation where > appropriate, and should link back to the docs for the macros and > libraries they use. > > As for moving pages over from the Moodle wiki... How many pages are we > talking about here? MediaWiki can handle raw HTML, so cut-and-paste > would work for the most part. As for links, I think we'll want to > replace real <a href="..."> links with MediaWiki [...] links. If you > want to pawn the transition work off on me, go ahead -- I love mindless > busywork. :) > -sam > > |
From: Michael G. <ga...@ma...> - 2007-12-04 13:35:04
|
Hi, Thanks Sam for getting this started. I put up a first page on the WeBWorK documentation wiki at http://webwork.maa.org/wiki/Main_Page responding more or less to your outline below. I haven't created any further pages yet -- (but go ahead and start if anyone has time). The next page in each hierarchy would have a list of subtopics and below that for the most part would be individual documents. Do you think we should create navigation links in the left margin for each of the main sections? Let me know what you think. Take care, Mike On Nov 29, 2007, at 4:32 PM, Sam Hathaway wrote: > On 11/26/2007 10:56 AM, P. Gavin LaRose wrote: > >> We now have an incomplete but growing block of documentation at >> <https://webwork.maa.org/moodle/mod/wiki/view.php?id=160>. I've been >> slowly expanding this in the course of this semester, mostly under >> the >> index of problem techniques section (at >> <https://webwork.maa.org/moodle/mod/wiki/view.php? >> id=160&page=ProblemTechniquesIndexByTopic>) >> >> This is obviously incomplete, and is also hobbled by being on the >> ugly >> Moodle Wiki. I understand that Mike and Sam have MediaWiki running >> somewhere, and think that there's some global view for how all of the >> WeBWorK documentation will eventually reside on all of these things. >> >> My questions, which may be answered "yeah, something like that >> eventually" are (1) whether we can or should be moving the existing >> documentation over to a different site (e.g., the MediaWiki site), >> both >> for ease of editing and for eventual unveiling. and (2) if so, >> whether >> the pages be moved transparently, without screwing up all of the >> links, >> formatting, etc. Because it appeared too hard to figure out for >> Moodle's >> Wiki I've been doing most of the formatting for the pages that I'm >> doing >> in HTML, so it would be nice if that were preserved somehow. >> >> Just thinking aloud, in any case. > > Hi Gavin (and other developers), > > We do in fact have a wiki set up on webwork.maa.org at > <http://webwork.maa.org/wiki/>. It should recognize a Moodle cookie > and > automatically log you in. (Initial login though the MediaWiki login > page > isn't quite working yet, so log into Moodle first if necessary.) > > I've been thinking about how to organize the new site, which will > mostly > contain documentation. Here are my thoughts -- please give feedback! > > Top-level categories: > > * Installation, administration, and maintenance - Info for > sysadmins on > how to install and manage WeBWorK. > > * Using WeBWorK - How to use the WeBWorK web interface. Mostly for > instructors, since most of the complexity of WW is in the instructor > tools, but we would also want to have docs for students. > > * Using PG - How to write and modify PG problems. > > For now I'm focusing mostly on PG docs, since we've been doing a > lot of > work on them lately and "modern" PG is the least discoverable > aspect of > WW. So within the Using PG category, we'd have: > > * Macro and library reference - This is what I'm currently working on. > It's represented as POD docs in the macro and library files in CVS. > That > way, it's easy to keep it up-to-date and it's versioned along with the > code itself. (A web-based annotation system would be nice, but I think > it's more important to keep it "close" to the code.) > > * Manuals and HOWTOs - Information on larger features of PG, like > MathObjects, or certain techniques, like the stuff you've been > working on. > > * "Best-practices" sample problems - Problems based on a "new" and > "non-crappy" blankProblem.pg, that feature MathObjects, don't use > deprecated techniques, and aren't the same trivial examples you always > see. These should be linked to from the other documentation where > appropriate, and should link back to the docs for the macros and > libraries they use. > > As for moving pages over from the Moodle wiki... How many pages are we > talking about here? MediaWiki can handle raw HTML, so cut-and-paste > would work for the most part. As for links, I think we'll want to > replace real <a href="..."> links with MediaWiki [...] links. If you > want to pawn the transition work off on me, go ahead -- I love > mindless > busywork. :) > -sam > > ---------------------------------------------------------------------- > --- > SF.Net email is sponsored by: The Future of Linux Business White Paper > from Novell. From the desktop to the data center, Linux is going > mainstream. Let it simplify your IT future. > http://altfarm.mediaplex.com/ad/ck/ > 8857-50307-18918-4_______________________________________________ > OpenWeBWorK-Devel mailing list > Ope...@li... > https://lists.sf.net/lists/listinfo/openwebwork-devel |
From: Sam H. <sh...@ma...> - 2007-11-29 21:32:31
|
On 11/26/2007 10:56 AM, P. Gavin LaRose wrote: > We now have an incomplete but growing block of documentation at > <https://webwork.maa.org/moodle/mod/wiki/view.php?id=3D160>. I've been= > slowly expanding this in the course of this semester, mostly under the > index of problem techniques section (at > <https://webwork.maa.org/moodle/mod/wiki/view.php?id=3D160&page=3DProbl= emTechniquesIndexByTopic>) >=20 > This is obviously incomplete, and is also hobbled by being on the ugly > Moodle Wiki. I understand that Mike and Sam have MediaWiki running > somewhere, and think that there's some global view for how all of the > WeBWorK documentation will eventually reside on all of these things. >=20 > My questions, which may be answered "yeah, something like that > eventually" are (1) whether we can or should be moving the existing > documentation over to a different site (e.g., the MediaWiki site), both= > for ease of editing and for eventual unveiling. and (2) if so, whether > the pages be moved transparently, without screwing up all of the links,= > formatting, etc. Because it appeared too hard to figure out for Moodle'= s > Wiki I've been doing most of the formatting for the pages that I'm doin= g > in HTML, so it would be nice if that were preserved somehow. >=20 > Just thinking aloud, in any case. Hi Gavin (and other developers), We do in fact have a wiki set up on webwork.maa.org at <http://webwork.maa.org/wiki/>. It should recognize a Moodle cookie and automatically log you in. (Initial login though the MediaWiki login page isn't quite working yet, so log into Moodle first if necessary.) I've been thinking about how to organize the new site, which will mostly contain documentation. Here are my thoughts -- please give feedback! Top-level categories: * Installation, administration, and maintenance - Info for sysadmins on how to install and manage WeBWorK. * Using WeBWorK - How to use the WeBWorK web interface. Mostly for instructors, since most of the complexity of WW is in the instructor tools, but we would also want to have docs for students. * Using PG - How to write and modify PG problems. For now I'm focusing mostly on PG docs, since we've been doing a lot of work on them lately and "modern" PG is the least discoverable aspect of WW. So within the Using PG category, we'd have: * Macro and library reference - This is what I'm currently working on. It's represented as POD docs in the macro and library files in CVS. That way, it's easy to keep it up-to-date and it's versioned along with the code itself. (A web-based annotation system would be nice, but I think it's more important to keep it "close" to the code.) * Manuals and HOWTOs - Information on larger features of PG, like MathObjects, or certain techniques, like the stuff you've been working on= =2E * "Best-practices" sample problems - Problems based on a "new" and "non-crappy" blankProblem.pg, that feature MathObjects, don't use deprecated techniques, and aren't the same trivial examples you always see. These should be linked to from the other documentation where appropriate, and should link back to the docs for the macros and libraries they use. As for moving pages over from the Moodle wiki... How many pages are we talking about here? MediaWiki can handle raw HTML, so cut-and-paste would work for the most part. As for links, I think we'll want to replace real <a href=3D"..."> links with MediaWiki [...] links. If you want to pawn the transition work off on me, go ahead -- I love mindless busywork. :) -sam |
From: Vishnu C. <vi...@pa...> - 2007-11-29 14:10:15
|
Hello, I am trying to install the WebWork system here at Arizona State University and I need help with the CVS errors. I tried the first line as indicated in the Wiki : http://devel.webwork.rochester.edu/twiki/bin/view/Webwork/InstallationManualV2pt3forUbuntu7pt04#Downloading_the_WeBWorK_System_S The line is as follows: cvs -d :pserver:an...@cv...:/webwork/cvs/system checkout -r rel-2-3-dev webwork2 pg I get an error which says that says the following: cvs checkout: CVS password file /home/beck/.cvspass does not exist - creating a new file cvs [checkout aborted]: cannot write to history file: /webwork/cvs/ system/CVSROOT/history: No space left on device Is there something I am doing wrong at my end or is this an issue that needs to be fixed on their end? Thank you, Vishnu |
From: Sam H. <sh...@ma...> - 2007-10-18 15:07:02
|
Hi All, Does anyone know anything about this collection of WeBWorK problems? I haven't heard anything about it, and based on the status and availability date, it might not even exist. http://vig.pearsoned.ca/catalog/academic/product/0,1144,0321487877,00.htm= l Thanks. -sam |
From: Sam H. <sa...@sa...> - 2007-10-17 17:00:55
|
Hello, I'm about to commit some useful tools for managing NPL-style tags in PG problems. These tools were developed in the course of managing the Rogawski problem library for W.H.Freeman, and are being contributed back to the WeBWorK project in accordance with the GPL. Please feel free to take a look at these and use/improve them. -sam lib/WeBWorK/NPL.pm - Useful routines for parsing and writing PG tags format as well as the Textbooks file format. Also contains a routine gen_find_tags which generates a "wanted" function for File::Find that finds files that match a certain tags specification. As of now, editing of tags is somewhat limited -- a facility for appending tags to the end of the tag block is given, which should be sufficient for adding a new textbook to existing files. The tag parsing routine is all new, and should be somewhat more robust and harder to abuse. One notable improvement is that it can handle escaped single quotes within values, making it possible to say things lik= e: ## DBsection('L\'Hospital\'s Rule') However, the stricter value parsing makes it reject some broken values already in the NPL. In the case of KEYWORDS, if a parse error is encountered it will fall back on the old keyword parsing method. This could be extended to other values if need be. bin/pg-find-tags - Prints file names for files that match specifications given on the command line. Good demo of how to use gen_find_tags. Can be easily modified to perform other tasks. bin/pg-append-textbook-tags - Appends tags for a new textbook to the end of the tag block in an already-tagged file. bin/pg-pull - Pull files from an existing library into a new library. Directory and file names for the new library can be generated from the tags in the problem (and optionally use the names from a Textbooks file). We use this to pull Rogawski-tagged NPL problems out for separate distribution. This script has some annoying limitations right now -- read the comments. |
From: Sam H. <sh...@ma...> - 2007-08-26 01:54:26
|
I WeBWorK 2.4.1 this evening. The list of changes is short, and this should be an unobtrusive update. Quicky upgrade instructions: cd /opt/webwork/webwork2 cvs -q up -dP -rrel-2-4-dev bin/NPL-update apachectl graceful See the full release notes http://devel.webwork.rochester.edu/twiki/bin/view/Webwork/WeBWorKRelease2pt4pt1 or the installation manual http://devel.webwork.rochester.edu/twiki/bin/view/Webwork/InstallationManualV2pt4 for more detail. This is kind of a release-and-run situation, since unreachable for the next week. Post on webwork.maa.org if you run into trouble. -sam |
From: Jeff H. <jj...@vi...> - 2007-07-24 11:25:04
|
Please ignore my last post. The cvs up happened to coincide with something dumb that I did that was actually causing the problem I was observing. Best regards, Jeff Jeff Holt wrote: > Hi Sam, > > Regarding this note, can you be a bit more explicit about what changes > need to be made to > > webwork.apache2-config and global.conf > > I cvs up'ed and can no longer see the local problem sets. > > Sorry for the low-level question. > > Thanks > > --Jeff > > Sam Hathaway via activitymail wrote: > >> Log Message: >> ----------- >> PLEASE READ -- APACHE CONFIG CHANGES! >> >> This patch makes webwork.apache2-config static (no <Perl> sections) and >> passes changes into WeBWorK via PerlSetVar directives. The course >> environment (global.conf) is seeded from these variables. Also changes >> pg_dir to webwork_pg_dir, so all seed variables start with "webwork_". >> >> So update your webwork.apache2-config and global.conf files! :) >> >> Modified Files: >> -------------- >> webwork2/conf: >> global.conf.dist >> webwork.apache2-config.dist >> webwork2/lib: >> WeBWorK.pm >> webwork2/lib/WeBWorK: >> CourseEnvironment.pm >> Request.pm >> >> Revision Data >> ------------- >> Index: webwork.apache2-config.dist >> =================================================================== >> RCS file: /webwork/cvs/system/webwork2/conf/webwork.apache2-config.dist,v >> retrieving revision 1.8 >> retrieving revision 1.9 >> diff -Lconf/webwork.apache2-config.dist -Lconf/webwork.apache2-config.dist -u -r1.8 -r1.9 >> --- conf/webwork.apache2-config.dist >> +++ conf/webwork.apache2-config.dist >> @@ -18,89 +18,68 @@ >> # support in your Apache configuration, add the following line to the end of >> # your Apache configuration file (usually apache.conf or httpd.conf): >> # >> -# Include /path/to/webwork.apache-config >> +# Include /path/to/webwork.apache2-config >> # >> -# Customize the variable $webwork_dir below to match the location of your >> -# WeBWorK installation. >> +# Please read throught this file if you are not using the default paths or want >> +# to use non-standard URLs. >> >> -PerlModule mod_perl2 >> - >> -<Perl> >> - >> -my $webwork_dir = "/opt/webwork/webwork2"; >> - >> -eval "use lib '$webwork_dir/lib'"; die $@ if $@; >> -eval "use WeBWorK::CourseEnvironment"; die $@ if $@; >> - >> -my $ce = new WeBWorK::CourseEnvironment({ webwork_dir => $webwork_dir }); >> -my $webwork_url = $ce->{webwork_url}; >> -my $pg_dir = $ce->{pg_dir}; >> -my $webwork_htdocs_url = $ce->{webwork_htdocs_url}; >> -my $webwork_htdocs_dir = $ce->{webwork_htdocs_dir}; >> -my $webwork_courses_url = $ce->{webwork_courses_url}; >> -my $webwork_courses_dir = $ce->{webwork_courses_dir}; >> -eval "use lib '$pg_dir/lib'"; die $@ if $@; >> - >> -eval "use WeBWorK::PG::ImageGenerator"; die $@ if $@; >> -$WeBWorK::SeedCE{webwork_dir} = $webwork_dir; >> -$ENV{WEBWORK_ROOT} = $webwork_dir; >> +# Define the location that is handled by the Apache::WeBWorK module. >> +# >> +PerlSetVar webwork_dir /opt/webwork/webwork2 >> +PerlSetVar webwork_url /webwork2 >> +<Location /webwork2> >> + PerlHandler Apache::WeBWorK >> + SetHandler perl-script >> + Options FollowSymLinks >> + AllowOverride None >> + Order Allow,Deny >> + Allow from all >> +</Location> >> >> -</Perl> >> +# Provide access to system-wide resources. >> +# >> +PerlSetVar webwork_htdocs_dir /opt/webwork/webwork2/htdocs >> +PerlSetVar webwork_htdocs_url /webwork2_files >> +Alias /webwork2_files /opt/webwork/webwork2/htdocs >> +<Location /webwork2_files> >> + SetHandler None >> +</Location> >> +<Directory /opt/webwork/webwork2/htdocs> >> + Options FollowSymLinks >> + AllowOverride None >> + Order Allow,Deny >> + Allow from all >> +</Directory> >> >> +# Provide access to course-specific resources >> +# >> +PerlSetVar webwork_courses_dir /opt/webwork/courses >> +PerlSetVar webwork_courses_url /webwork2_course_files >> AliasMatch /webwork2_course_files/([^/]*)/(.*) /opt/webwork/courses/$1/html/$2 >> -Alias /webwork2_files /opt/webwork/webwork2/htdocs >> +<Location /webwork2_course_files> >> + SetHandler None >> +</Location> >> <Directory /opt/webwork/courses/*/html> >> - Allow from all >> - AllowOverride None >> + SetHandler None >> Options FollowSymLinks >> - Order allow,deny >> -</Directory> >> -<Directory /opt/webwork/webwork2/htdocs> >> - Allow from all >> AllowOverride None >> - Options FollowSymLinks >> - Order allow,deny >> + Order Allow,Deny >> + Allow from all >> </Directory> >> -<Location /webwork2> >> - PerlInitHandler Apache2::Reload >> - PerlSetVar ReloadAll Off >> - PerlSetVar ReloadModules "Apache::WeBWorK WeBWorK::*" >> - PerlHandler Apache::WeBWorK >> - SetHandler perl-script >> - #PerlFixuphandler Apache::DB >> -</Location> >> -#WEBWORK SOAP TEST CONFIGURATION >> -<Files soap.php> >> - PerlInitHandler Apache2::Reload >> - PerlSetVar ReloadAll On >> - PerlSetVar ReloadModules "WebworkSOAP WeBWorK::* WebworkSOAP::* WebworkSOAP::Classes::*" >> -</Files> >> - >> -PerlModule Apache2::Reload >> -PerlModule WebworkSOAP >> -#WEBWORK SOAP CONFIGURATION >> -<Location /webwork2_rpc> >> - PerlInitHandler Apache2::Reload >> - PerlHandler Apache::SOAP >> - SetHandler perl-script >> - PerlSetVar ReloadAll Off >> - PerlSetVar ReloadModules "WeBWorK::* WebworkSOAP WebworkSOAP::*" >> - PerlSetVar dispatch_to "WebworkSOAP" >> - PerlSetVar options "compress_threshold => 10000" >> - Order Allow,Deny >> - Allow from All >> -</Location> >> -#WEBWORK SOAP WSDL HANDLER :: TO BE REPLACED WITH A FILE FOR PRODUCTION SERVERS >> -<Location /webwork2_wsdl> >> - PerlInitHandler Apache2::Reload >> - PerlSetVar ReloadAll Off >> - PerlSetVar ReloadModules "WeBWorK::* WebworkSOAP::* WebworkSOAP" >> - PerlSetVar dispatch_to "WebworkSOAP::WSDL" >> - PerlSetVar options "compress_threshold => 10000" >> - PerlHandler WebworkSOAP::WSDL >> - SetHandler perl-script >> - Order Allow,Deny >> - Allow from All >> -</Location> >> >> +# Make additional settings available to WeBWorK. >> +# >> +PerlSetVar webwork_pg_dir /opt/webwork/pg >> + >> +# Include WeBWorK and PG lib directories. (We prefer PerlSwitches to "use lib" >> +# in a startup.pl because it prevents us from having to specify paths in two >> +# separate files.) >> +# >> +PerlSwitches -I/opt/webwork/webwork2/lib >> +PerlSwitches -I/opt/webwork/pg/lib >> + >> +# Pre-load modules. >> +# >> +PerlModule mod_perl2 >> +PerlModule Apache::WeBWorK >> >> Index: global.conf.dist >> =================================================================== >> RCS file: /webwork/cvs/system/webwork2/conf/global.conf.dist,v >> retrieving revision 1.193 >> retrieving revision 1.194 >> diff -Lconf/global.conf.dist -Lconf/global.conf.dist -u -r1.193 -r1.194 >> --- conf/global.conf.dist >> +++ conf/global.conf.dist >> @@ -34,7 +34,7 @@ >> $webwork_url = "/webwork2"; >> >> # Root directory of PG. >> -$pg_dir = "/opt/webwork/pg"; >> +$webwork_pg_dir = "/opt/webwork/pg"; >> >> # URL and path to htdocs directory. >> $webwork_htdocs_url = "/webwork2_files"; >> @@ -803,8 +803,8 @@ >> >> ##### Directories used by PG >> >> -# The root of the PG directory tree (from pg_root in Apache config). >> -$pg{directories}{root} = "$pg_dir"; >> +# The root of the PG directory tree (from webwork_pg_dir in Apache config). >> +$pg{directories}{root} = "$webwork_pg_dir"; >> $pg{directories}{lib} = "$pg{directories}{root}/lib"; >> $pg{directories}{macros} = "$pg{directories}{root}/macros"; >> >> @@ -928,3 +928,5 @@ >> $webworkRoot = $webworkDirs{root}; >> $webworkURLRoot = $webworkURLs{root}; >> $pgRoot = $pg{directories}{root}; >> +$pg_dir = $pg{directories}{root}; >> + >> Index: WeBWorK.pm >> =================================================================== >> RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK.pm,v >> retrieving revision 1.97 >> retrieving revision 1.98 >> diff -Llib/WeBWorK.pm -Llib/WeBWorK.pm -u -r1.97 -r1.98 >> --- lib/WeBWorK.pm >> +++ lib/WeBWorK.pm >> @@ -81,8 +81,9 @@ >> my $uri = $r->uri; >> my $path_info = $r->path_info | ""; >> my $args = $r->args || ""; >> - #my $webwork_root = $r->dir_config("webwork_root"); >> - #my $pg_root = $r->dir_config("pg_root"); >> + my $dir_config = $r->dir_config; >> + my %conf_vars = map { $_ => $dir_config->{$_} } grep { /^webwork_/ } keys %$dir_config; >> + @SeedCE{keys %conf_vars} = values %conf_vars; >> >> debug("\n\n===> Begin " . __PACKAGE__ . "::dispatch() <===\n\n"); >> debug("Hi, I'm the new dispatcher!\n"); >> @@ -178,7 +179,7 @@ >> my $apache_port = $r->get_server_port; >> my $apache_is_ssl = ($r->subprocess_env('https') ? 1 : ""); >> my $apache_root_url; >> - if ($r->subprocess_env('https')) { >> + if ($apache_is_ssl) { >> $apache_root_url = "https://$apache_hostname"; >> $apache_root_url .= ":$apache_port" if $apache_port != 443; >> } else { >> Index: CourseEnvironment.pm >> =================================================================== >> RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/CourseEnvironment.pm,v >> retrieving revision 1.35 >> retrieving revision 1.36 >> diff -Llib/WeBWorK/CourseEnvironment.pm -Llib/WeBWorK/CourseEnvironment.pm -u -r1.35 -r1.36 >> --- lib/WeBWorK/CourseEnvironment.pm >> +++ lib/WeBWorK/CourseEnvironment.pm >> @@ -27,7 +27,7 @@ >> $ce = WeBWorK::CourseEnvironment->new({ >> webwork_url => "/webwork2", >> webwork_dir => "/opt/webwork2", >> - pg_dir => "/opt/pg", >> + webwork_pg_dir => "/opt/pg", >> webwork_htdocs_url => "/webwork2_files", >> webwork_htdocs_dir => "/opt/webwork2/htdocs", >> webwork_courses_url => "/webwork2_course_files", >> @@ -76,7 +76,8 @@ >> =item new(ROOT URLROOT PGROOT COURSENAME) >> >> A deprecated form of the constructor in which four seed variables are given >> -explicitly: C<webwork_dir>, C<webwork_url>, C<pg_dir>, and C<courseName>. >> +explicitly: C<webwork_dir>, C<webwork_url>, C<webwork_pg_dir>, and >> +C<courseName>. >> >> =cut >> >> @@ -107,12 +108,9 @@ >> %seedVars = %{$rest[0]}; >> } else { >> debug __PACKAGE__, ": deprecated four-argument form of new() used.\n"; >> - #$seedVars{webworkRoot} = $rest[0]; >> - #$seedVars{webworkURLRoot} = $rest[1]; >> - #$seedVars{pgRoot} = $rest[2]; >> $seedVars{webwork_dir} = $rest[0]; >> $seedVars{webwork_url} = $rest[1]; >> - $seedVars{pg_dir} = $rest[2]; >> + $seedVars{webwork_pg_dir} = $rest[2]; >> $seedVars{courseName} = $rest[3]; >> } >> >> Index: Request.pm >> =================================================================== >> RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/Request.pm,v >> retrieving revision 1.9 >> retrieving revision 1.10 >> diff -Llib/WeBWorK/Request.pm -Llib/WeBWorK/Request.pm -u -r1.9 -r1.10 >> --- lib/WeBWorK/Request.pm >> +++ lib/WeBWorK/Request.pm >> @@ -176,8 +176,22 @@ >> return $self->{urlpath}; >> } >> >> +=item location() >> + >> +Overrides the location() method in Apache::Request (or Apache2::Request) so that >> +if the location is "/", the empty string is returned. >> + >> +=cut >> + >> +sub location { >> + my $self = shift; >> + my $location = $self->SUPER::location; >> + return $location eq "/" ? "" : $location; >> +} >> + >> =back >> >> =cut >> >> 1; >> + >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by: Splunk Inc. >> Still grepping through log files to find problems? Stop. >> Now Search log events and configuration files using AJAX and a browser. >> Download your FREE copy of Splunk now >> http://get.splunk.com/ >> _______________________________________________ >> OpenWeBWorK-CVS mailing list >> Ope...@li... >> https://lists.sf.net/lists/listinfo/openwebwork-cvs >> >> > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > OpenWeBWorK-Devel mailing list > Ope...@li... > https://lists.sf.net/lists/listinfo/openwebwork-devel > |
From: Jeff H. <jj...@vi...> - 2007-07-24 02:52:24
|
Hi Sam, Regarding this note, can you be a bit more explicit about what changes need to be made to webwork.apache2-config and global.conf I cvs up'ed and can no longer see the local problem sets. Sorry for the low-level question. Thanks --Jeff Sam Hathaway via activitymail wrote: > Log Message: > ----------- > PLEASE READ -- APACHE CONFIG CHANGES! > > This patch makes webwork.apache2-config static (no <Perl> sections) and > passes changes into WeBWorK via PerlSetVar directives. The course > environment (global.conf) is seeded from these variables. Also changes > pg_dir to webwork_pg_dir, so all seed variables start with "webwork_". > > So update your webwork.apache2-config and global.conf files! :) > > Modified Files: > -------------- > webwork2/conf: > global.conf.dist > webwork.apache2-config.dist > webwork2/lib: > WeBWorK.pm > webwork2/lib/WeBWorK: > CourseEnvironment.pm > Request.pm > > Revision Data > ------------- > Index: webwork.apache2-config.dist > =================================================================== > RCS file: /webwork/cvs/system/webwork2/conf/webwork.apache2-config.dist,v > retrieving revision 1.8 > retrieving revision 1.9 > diff -Lconf/webwork.apache2-config.dist -Lconf/webwork.apache2-config.dist -u -r1.8 -r1.9 > --- conf/webwork.apache2-config.dist > +++ conf/webwork.apache2-config.dist > @@ -18,89 +18,68 @@ > # support in your Apache configuration, add the following line to the end of > # your Apache configuration file (usually apache.conf or httpd.conf): > # > -# Include /path/to/webwork.apache-config > +# Include /path/to/webwork.apache2-config > # > -# Customize the variable $webwork_dir below to match the location of your > -# WeBWorK installation. > +# Please read throught this file if you are not using the default paths or want > +# to use non-standard URLs. > > -PerlModule mod_perl2 > - > -<Perl> > - > -my $webwork_dir = "/opt/webwork/webwork2"; > - > -eval "use lib '$webwork_dir/lib'"; die $@ if $@; > -eval "use WeBWorK::CourseEnvironment"; die $@ if $@; > - > -my $ce = new WeBWorK::CourseEnvironment({ webwork_dir => $webwork_dir }); > -my $webwork_url = $ce->{webwork_url}; > -my $pg_dir = $ce->{pg_dir}; > -my $webwork_htdocs_url = $ce->{webwork_htdocs_url}; > -my $webwork_htdocs_dir = $ce->{webwork_htdocs_dir}; > -my $webwork_courses_url = $ce->{webwork_courses_url}; > -my $webwork_courses_dir = $ce->{webwork_courses_dir}; > -eval "use lib '$pg_dir/lib'"; die $@ if $@; > - > -eval "use WeBWorK::PG::ImageGenerator"; die $@ if $@; > -$WeBWorK::SeedCE{webwork_dir} = $webwork_dir; > -$ENV{WEBWORK_ROOT} = $webwork_dir; > +# Define the location that is handled by the Apache::WeBWorK module. > +# > +PerlSetVar webwork_dir /opt/webwork/webwork2 > +PerlSetVar webwork_url /webwork2 > +<Location /webwork2> > + PerlHandler Apache::WeBWorK > + SetHandler perl-script > + Options FollowSymLinks > + AllowOverride None > + Order Allow,Deny > + Allow from all > +</Location> > > -</Perl> > +# Provide access to system-wide resources. > +# > +PerlSetVar webwork_htdocs_dir /opt/webwork/webwork2/htdocs > +PerlSetVar webwork_htdocs_url /webwork2_files > +Alias /webwork2_files /opt/webwork/webwork2/htdocs > +<Location /webwork2_files> > + SetHandler None > +</Location> > +<Directory /opt/webwork/webwork2/htdocs> > + Options FollowSymLinks > + AllowOverride None > + Order Allow,Deny > + Allow from all > +</Directory> > > +# Provide access to course-specific resources > +# > +PerlSetVar webwork_courses_dir /opt/webwork/courses > +PerlSetVar webwork_courses_url /webwork2_course_files > AliasMatch /webwork2_course_files/([^/]*)/(.*) /opt/webwork/courses/$1/html/$2 > -Alias /webwork2_files /opt/webwork/webwork2/htdocs > +<Location /webwork2_course_files> > + SetHandler None > +</Location> > <Directory /opt/webwork/courses/*/html> > - Allow from all > - AllowOverride None > + SetHandler None > Options FollowSymLinks > - Order allow,deny > -</Directory> > -<Directory /opt/webwork/webwork2/htdocs> > - Allow from all > AllowOverride None > - Options FollowSymLinks > - Order allow,deny > + Order Allow,Deny > + Allow from all > </Directory> > -<Location /webwork2> > - PerlInitHandler Apache2::Reload > - PerlSetVar ReloadAll Off > - PerlSetVar ReloadModules "Apache::WeBWorK WeBWorK::*" > - PerlHandler Apache::WeBWorK > - SetHandler perl-script > - #PerlFixuphandler Apache::DB > -</Location> > -#WEBWORK SOAP TEST CONFIGURATION > -<Files soap.php> > - PerlInitHandler Apache2::Reload > - PerlSetVar ReloadAll On > - PerlSetVar ReloadModules "WebworkSOAP WeBWorK::* WebworkSOAP::* WebworkSOAP::Classes::*" > -</Files> > - > -PerlModule Apache2::Reload > -PerlModule WebworkSOAP > -#WEBWORK SOAP CONFIGURATION > -<Location /webwork2_rpc> > - PerlInitHandler Apache2::Reload > - PerlHandler Apache::SOAP > - SetHandler perl-script > - PerlSetVar ReloadAll Off > - PerlSetVar ReloadModules "WeBWorK::* WebworkSOAP WebworkSOAP::*" > - PerlSetVar dispatch_to "WebworkSOAP" > - PerlSetVar options "compress_threshold => 10000" > - Order Allow,Deny > - Allow from All > -</Location> > -#WEBWORK SOAP WSDL HANDLER :: TO BE REPLACED WITH A FILE FOR PRODUCTION SERVERS > -<Location /webwork2_wsdl> > - PerlInitHandler Apache2::Reload > - PerlSetVar ReloadAll Off > - PerlSetVar ReloadModules "WeBWorK::* WebworkSOAP::* WebworkSOAP" > - PerlSetVar dispatch_to "WebworkSOAP::WSDL" > - PerlSetVar options "compress_threshold => 10000" > - PerlHandler WebworkSOAP::WSDL > - SetHandler perl-script > - Order Allow,Deny > - Allow from All > -</Location> > > +# Make additional settings available to WeBWorK. > +# > +PerlSetVar webwork_pg_dir /opt/webwork/pg > + > +# Include WeBWorK and PG lib directories. (We prefer PerlSwitches to "use lib" > +# in a startup.pl because it prevents us from having to specify paths in two > +# separate files.) > +# > +PerlSwitches -I/opt/webwork/webwork2/lib > +PerlSwitches -I/opt/webwork/pg/lib > + > +# Pre-load modules. > +# > +PerlModule mod_perl2 > +PerlModule Apache::WeBWorK > > Index: global.conf.dist > =================================================================== > RCS file: /webwork/cvs/system/webwork2/conf/global.conf.dist,v > retrieving revision 1.193 > retrieving revision 1.194 > diff -Lconf/global.conf.dist -Lconf/global.conf.dist -u -r1.193 -r1.194 > --- conf/global.conf.dist > +++ conf/global.conf.dist > @@ -34,7 +34,7 @@ > $webwork_url = "/webwork2"; > > # Root directory of PG. > -$pg_dir = "/opt/webwork/pg"; > +$webwork_pg_dir = "/opt/webwork/pg"; > > # URL and path to htdocs directory. > $webwork_htdocs_url = "/webwork2_files"; > @@ -803,8 +803,8 @@ > > ##### Directories used by PG > > -# The root of the PG directory tree (from pg_root in Apache config). > -$pg{directories}{root} = "$pg_dir"; > +# The root of the PG directory tree (from webwork_pg_dir in Apache config). > +$pg{directories}{root} = "$webwork_pg_dir"; > $pg{directories}{lib} = "$pg{directories}{root}/lib"; > $pg{directories}{macros} = "$pg{directories}{root}/macros"; > > @@ -928,3 +928,5 @@ > $webworkRoot = $webworkDirs{root}; > $webworkURLRoot = $webworkURLs{root}; > $pgRoot = $pg{directories}{root}; > +$pg_dir = $pg{directories}{root}; > + > Index: WeBWorK.pm > =================================================================== > RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK.pm,v > retrieving revision 1.97 > retrieving revision 1.98 > diff -Llib/WeBWorK.pm -Llib/WeBWorK.pm -u -r1.97 -r1.98 > --- lib/WeBWorK.pm > +++ lib/WeBWorK.pm > @@ -81,8 +81,9 @@ > my $uri = $r->uri; > my $path_info = $r->path_info | ""; > my $args = $r->args || ""; > - #my $webwork_root = $r->dir_config("webwork_root"); > - #my $pg_root = $r->dir_config("pg_root"); > + my $dir_config = $r->dir_config; > + my %conf_vars = map { $_ => $dir_config->{$_} } grep { /^webwork_/ } keys %$dir_config; > + @SeedCE{keys %conf_vars} = values %conf_vars; > > debug("\n\n===> Begin " . __PACKAGE__ . "::dispatch() <===\n\n"); > debug("Hi, I'm the new dispatcher!\n"); > @@ -178,7 +179,7 @@ > my $apache_port = $r->get_server_port; > my $apache_is_ssl = ($r->subprocess_env('https') ? 1 : ""); > my $apache_root_url; > - if ($r->subprocess_env('https')) { > + if ($apache_is_ssl) { > $apache_root_url = "https://$apache_hostname"; > $apache_root_url .= ":$apache_port" if $apache_port != 443; > } else { > Index: CourseEnvironment.pm > =================================================================== > RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/CourseEnvironment.pm,v > retrieving revision 1.35 > retrieving revision 1.36 > diff -Llib/WeBWorK/CourseEnvironment.pm -Llib/WeBWorK/CourseEnvironment.pm -u -r1.35 -r1.36 > --- lib/WeBWorK/CourseEnvironment.pm > +++ lib/WeBWorK/CourseEnvironment.pm > @@ -27,7 +27,7 @@ > $ce = WeBWorK::CourseEnvironment->new({ > webwork_url => "/webwork2", > webwork_dir => "/opt/webwork2", > - pg_dir => "/opt/pg", > + webwork_pg_dir => "/opt/pg", > webwork_htdocs_url => "/webwork2_files", > webwork_htdocs_dir => "/opt/webwork2/htdocs", > webwork_courses_url => "/webwork2_course_files", > @@ -76,7 +76,8 @@ > =item new(ROOT URLROOT PGROOT COURSENAME) > > A deprecated form of the constructor in which four seed variables are given > -explicitly: C<webwork_dir>, C<webwork_url>, C<pg_dir>, and C<courseName>. > +explicitly: C<webwork_dir>, C<webwork_url>, C<webwork_pg_dir>, and > +C<courseName>. > > =cut > > @@ -107,12 +108,9 @@ > %seedVars = %{$rest[0]}; > } else { > debug __PACKAGE__, ": deprecated four-argument form of new() used.\n"; > - #$seedVars{webworkRoot} = $rest[0]; > - #$seedVars{webworkURLRoot} = $rest[1]; > - #$seedVars{pgRoot} = $rest[2]; > $seedVars{webwork_dir} = $rest[0]; > $seedVars{webwork_url} = $rest[1]; > - $seedVars{pg_dir} = $rest[2]; > + $seedVars{webwork_pg_dir} = $rest[2]; > $seedVars{courseName} = $rest[3]; > } > > Index: Request.pm > =================================================================== > RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/Request.pm,v > retrieving revision 1.9 > retrieving revision 1.10 > diff -Llib/WeBWorK/Request.pm -Llib/WeBWorK/Request.pm -u -r1.9 -r1.10 > --- lib/WeBWorK/Request.pm > +++ lib/WeBWorK/Request.pm > @@ -176,8 +176,22 @@ > return $self->{urlpath}; > } > > +=item location() > + > +Overrides the location() method in Apache::Request (or Apache2::Request) so that > +if the location is "/", the empty string is returned. > + > +=cut > + > +sub location { > + my $self = shift; > + my $location = $self->SUPER::location; > + return $location eq "/" ? "" : $location; > +} > + > =back > > =cut > > 1; > + > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > OpenWeBWorK-CVS mailing list > Ope...@li... > https://lists.sf.net/lists/listinfo/openwebwork-cvs > |
From: John J. <jj...@as...> - 2007-07-18 18:45:23
|
P. Gavin LaRose wrote: > I am sure that, but feel obligated to ask whether, your database.conf > file includes the stanzas in $dbLayouts{sql_single} for the locations > and location_addresses tables. That would be the easiest explanation > for the error. That was it. I admit that I do not dutifully check for differences between database.conf and database.conf.dist. I just made the former a symbolic link to the latter to avoid this in the future. That raises another question, with the current contents of database.conf.dist, is there anything anyone but the most sophisticated system administrator would change? If not, why not make the small simplification of changing it to be database.conf? John |
From: P. G. L. <gl...@um...> - 2007-07-18 18:30:10
|
Hi John, It looks to me as if this is a continuing problem with the definition of the database fields. In my version of DB.pm line 717 invokes $self->{locations}->get_fields_where, so it looks as if the accessor to the locations table in the database isn't getting properly defined. I am sure that, but feel obligated to ask whether, your database.conf file includes the stanzas in $dbLayouts{sql_single} for the locations and location_addresses tables. That would be the easiest explanation for the error. Gavin -- P Gavin LaRose, PhD | gl...@um... | 734.764.6454 | ...you have Program Manager, Instructional Technology | to respect someone who can Mathematics Dept, University of Michigan | spell Tuesday, even if they http://www.math.lsa.umich.edu/~glarose/ | can't spell it right. -Milne On 2007-07-18 [10:38] John Jones wrote: > Thanks for the suggestion Gavin, but it didn't work, giving the same error > for location_addresses. This seems to be because there are two parts to the > key, and 255+255>500. > > I noticed that in lib/WeBWorK/DB/Schema/NewSQL/Std.pm, there is a place where > 255 is specified as part of a key length. I changed that to 25 (which might > be a more sensible value anyway), and addcourse seemed to get farther. Now > the error is > > skipping creation of 'problem_merged' table: no create_table method > > When I go into the new course, things seem ok until I create a problem set, > and then try to edit the list of problems in the set. Then I get the same > error I was getting on the older course: > > |Can't call method "get_fields_where" on an undefined value at > /opt/devel/webwork-modperl/lib/WeBWorK/DB.pm line 717. > | > > > Call stack > > The information below can help locate the source of the problem. > > * |in WeBWorK::DB::listLocations called at line 597 of > /opt/devel/webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail.pm| > * |in > WeBWorK::ContentGenerator::Instructor::ProblemSetDetail::extraSetFields > called at line 344 of > /opt/devel/webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail.pm| > * |in > WeBWorK::ContentGenerator::Instructor::ProblemSetDetail::FieldTable > called at line 1685 of > /opt/devel/webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail.pm| > * |in WeBWorK::ContentGenerator::Instructor::ProblemSetDetail::body > called at line 152 of > /opt/devel/webwork-modperl/lib/WeBWorK/Template.pm| > * |in WeBWorK::Template::template called at line 486 of > /opt/devel/webwork-modperl/lib/WeBWorK/ContentGenerator.pm| > * |in WeBWorK::ContentGenerator::content called at line 194 of > /opt/devel/webwork-modperl/lib/WeBWorK/ContentGenerator.pm| > * |in WeBWorK::ContentGenerator::go called at line 338 of > /opt/devel/webwork-modperl/lib/WeBWorK.pm| > > This seems to be connected to the locations business. > > John > > > > > > P. Gavin LaRose wrote: >> Hi John, >> >> I can't see anywhere in the WeBWorK code that the key length is defined. >> However, if the database has some funny definition it would throw an error >> whenever you bumped into it. The only place I can see a length of 500 is >> in the location_addresses table, so I'd be tempted to try and make sure >> that there isn't still a residual error with that. My solution would be >> the "heavy club" method, of dropping the tables I think might be offending >> and then recreating them, e.g., >> mysql> use webwork; >> mysql> drop table locations; >> mysql> drop table location_addresses; >> mysql> create table locations (location_id tinyblob not null, >> > description text, primary_key (location_id(255))); >> mysql> create table location_addresses ((location_id tinyblob not null, >> > ip_mask tinyblob not null, primary key (location_id(255), >> > ip_mask(255))); >> >> Gavin >> > > |
From: John J. <jj...@as...> - 2007-07-18 17:38:04
|
Thanks for the suggestion Gavin, but it didn't work, giving the same error for location_addresses. This seems to be because there are two parts to the key, and 255+255>500. I noticed that in lib/WeBWorK/DB/Schema/NewSQL/Std.pm, there is a place where 255 is specified as part of a key length. I changed that to 25 (which might be a more sensible value anyway), and addcourse seemed to get farther. Now the error is skipping creation of 'problem_merged' table: no create_table method When I go into the new course, things seem ok until I create a problem set, and then try to edit the list of problems in the set. Then I get the same error I was getting on the older course: |Can't call method "get_fields_where" on an undefined value at /opt/devel/webwork-modperl/lib/WeBWorK/DB.pm line 717. | Call stack The information below can help locate the source of the problem. * |in WeBWorK::DB::listLocations called at line 597 of /opt/devel/webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail.pm| * |in WeBWorK::ContentGenerator::Instructor::ProblemSetDetail::extraSetFields called at line 344 of /opt/devel/webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail.pm| * |in WeBWorK::ContentGenerator::Instructor::ProblemSetDetail::FieldTable called at line 1685 of /opt/devel/webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail.pm| * |in WeBWorK::ContentGenerator::Instructor::ProblemSetDetail::body called at line 152 of /opt/devel/webwork-modperl/lib/WeBWorK/Template.pm| * |in WeBWorK::Template::template called at line 486 of /opt/devel/webwork-modperl/lib/WeBWorK/ContentGenerator.pm| * |in WeBWorK::ContentGenerator::content called at line 194 of /opt/devel/webwork-modperl/lib/WeBWorK/ContentGenerator.pm| * |in WeBWorK::ContentGenerator::go called at line 338 of /opt/devel/webwork-modperl/lib/WeBWorK.pm| This seems to be connected to the locations business. John P. Gavin LaRose wrote: > Hi John, > > I can't see anywhere in the WeBWorK code that the key length is > defined. However, if the database has some funny definition it would > throw an error whenever you bumped into it. The only place I can see > a length of 500 is in the location_addresses table, so I'd be tempted > to try and make sure that there isn't still a residual error with > that. My solution would be the "heavy club" method, of dropping the > tables I think might be offending and then recreating them, e.g., > mysql> use webwork; > mysql> drop table locations; > mysql> drop table location_addresses; > mysql> create table locations (location_id tinyblob not null, > > description text, primary_key (location_id(255))); > mysql> create table location_addresses ((location_id tinyblob not > null, > > ip_mask tinyblob not null, primary key (location_id(255), > > ip_mask(255))); > > Gavin > |
From: P. G. L. <gl...@um...> - 2007-07-18 12:08:02
|
Hi John, I can't see anywhere in the WeBWorK code that the key length is defined. However, if the database has some funny definition it would throw an error whenever you bumped into it. The only place I can see a length of 500 is in the location_addresses table, so I'd be tempted to try and make sure that there isn't still a residual error with that. My solution would be the "heavy club" method, of dropping the tables I think might be offending and then recreating them, e.g., mysql> use webwork; mysql> drop table locations; mysql> drop table location_addresses; mysql> create table locations (location_id tinyblob not null, > description text, primary_key (location_id(255))); mysql> create table location_addresses ((location_id tinyblob not null, > ip_mask tinyblob not null, primary key (location_id(255), > ip_mask(255))); Gavin -- P Gavin LaRose, PhD | gl...@um... | 734.764.6454 | ...you have Program Manager, Instructional Technology | to respect someone who can Mathematics Dept, University of Michigan | spell Tuesday, even if they http://www.math.lsa.umich.edu/~glarose/ | can't spell it right. -Milne On 2007-07-17 [11:45] John Jones wrote: > Hi, > > I tried the change below and have a partially working system. I still get > errors in the course, so I decided to create a new course. When I do that > (using the command line utility), I get an error > > DBD::mysql::db do failed: Specified key was too long. Max key length is 500 > at /opt/devel/webwork-modperl/lib/WeBWorK/DB/Schema/NewSQL/Std.pm line 111. > > Are these key lengths specified inside webwork (so that I can reduce them for > this system)? > > John > > > P. Gavin LaRose wrote: >> Hi John, >> >> I'm running MySQL 4.1.20 on my servers, and think the script ran fine >> there. The offending line is >> $dbh->do("CREATE TABLE locations (location_id TINYBLOB NOT NULL, >> description TEXT, PRIMARY KEY (location_id(1000)))"); >> My bet from the error message is that the assignment of a prefix of 1000 >> bytes is causing the error; I wonder if the implementation of TINYBLOB is >> having trouble with the 1000 byte value on your machine, or in MySQL 4.0. >> >> In fact, the MySQL 4.0/4.1 documentation indicates that "Before MySQL >> 4.1.2, the limit is 255 bytes for all tables." So that sounds like it's >> likely to be the problem. If you change the prefix value to 255 it should >> work for you, and we might want to document somewhere that the assumption >> is that users are running MySQL 4.1.2 or better (or change the 1000 to >> 255). >> >> Gavin >> >> > > > > |
From: John J. <jj...@as...> - 2007-07-17 18:45:13
|
Hi, I tried the change below and have a partially working system. I still get errors in the course, so I decided to create a new course. When I do that (using the command line utility), I get an error DBD::mysql::db do failed: Specified key was too long. Max key length is 500 at /opt/devel/webwork-modperl/lib/WeBWorK/DB/Schema/NewSQL/Std.pm line 111. Are these key lengths specified inside webwork (so that I can reduce them for this system)? John P. Gavin LaRose wrote: > Hi John, > > I'm running MySQL 4.1.20 on my servers, and think the script ran fine > there. The offending line is > $dbh->do("CREATE TABLE locations (location_id TINYBLOB NOT NULL, > description TEXT, PRIMARY KEY (location_id(1000)))"); > My bet from the error message is that the assignment of a prefix of 1000 > bytes is causing the error; I wonder if the implementation of TINYBLOB is > having trouble with the 1000 byte value on your machine, or in MySQL 4.0. > > In fact, the MySQL 4.0/4.1 documentation indicates that "Before MySQL > 4.1.2, the limit is 255 bytes for all tables." So that sounds like it's > likely to be the problem. If you change the prefix value to 255 it should > work for you, and we might want to document somewhere that the assumption > is that users are running MySQL 4.1.2 or better (or change the 1000 to > 255). > > Gavin > > |
From: Sam H. <sh...@ma...> - 2007-07-04 15:36:49
|
on 06/27/2007 05:12 PM jf...@pu... said the following: > Sam, > > Hello, it's Justin Floro from Purdue again. If you have a few moments I have > some more questions about Webwork's security key. > > Is the session key generated unique to each Webwork session, or is it a key > that is generated for a specific student login? It is unique for each session. If a client attempts to use an expired key, the key is deleted and the user is prompted for a password. Upon authenticating, a new key is created. The details are in lib/WeBWorK/Authen.pm and its subclasses. > How large is the session key that is generated? >From conf/global.conf: # $sessionKeyLength defines the length (in characters) of the session key $sessionKeyLength = 32; # @sessionKeyChars lists the legal session key characters @sessionKeyChars = ('A'..'Z', 'a'..'z', '0'..'9'); > How is the session key generated? $sessionKeyLength random characters are selected from @sessionKeyChars. > Thanks again for your help. No problem. -sam |
From: Sam H. <sh...@ma...> - 2007-06-29 20:19:53
|
on 06/29/2007 01:12 PM Matt Leventi via activitymail said the following: > Log Message: > ----------- > Put back whitespace. This doesn't put back whitespace, but it does remove the module preloading code (and change $main::VERSION, but I fixed that already). Please explain. :) -sam > -BEGIN { > - # pre-compile all content generators > - # Login and LoginProctor need to be handled separately, since they don't have paths > - map { eval "require $_"; die $@ if $@ } > - WeBWorK::URLPath->all_modules, > - LOGIN_MODULE, > - PROCTOR_LOGIN_MODULE; > - # other candidates for preloading: > - # - DB Record, Schema, and Driver classes (esp. Driver::SQL as it loads DBI) > - # - CourseManagement subclasses (ditto. sql_single.pm) > - # - WeBWorK::PG::Local, which loads WeBWorK::PG::Translator > - # - Authen subclasses > -} |
From: P. G. L. <gl...@um...> - 2007-06-26 11:35:15
|
Hi John, I'm running MySQL 4.1.20 on my servers, and think the script ran fine there. The offending line is $dbh->do("CREATE TABLE locations (location_id TINYBLOB NOT NULL, description TEXT, PRIMARY KEY (location_id(1000)))"); My bet from the error message is that the assignment of a prefix of 1000 bytes is causing the error; I wonder if the implementation of TINYBLOB is having trouble with the 1000 byte value on your machine, or in MySQL 4.0. In fact, the MySQL 4.0/4.1 documentation indicates that "Before MySQL 4.1.2, the limit is 255 bytes for all tables." So that sounds like it's likely to be the problem. If you change the prefix value to 255 it should work for you, and we might want to document somewhere that the assumption is that users are running MySQL 4.1.2 or better (or change the 1000 to 255). Gavin -- P Gavin LaRose, PhD | gl...@um... | 734.764.6454 | ...you have Program Manager, Instructional Technology | to respect someone who can Mathematics Dept, University of Michigan | spell Tuesday, even if they http://www.math.lsa.umich.edu/~glarose/ | can't spell it right. -Milne On 2007-06-25 [14:34] John Jones wrote: > Hi, > > I am trying to get my development copy of webwork working. In running > wwdb_upgrade, I get the message > >> Upgrading database from version 19 to 20... >> (Version 20 adds locations, location_addresses, set_locations and >> set_locations_user tables to database, and add restrict_ip to set and >> set_user.) >> >> An error occured while running the system upgrade code for version 20: >> DBD::mysql::db do failed: Incorrect sub part key. The used key part >> isn't a string, the used length is longer than the key part or the >> table handler doesn't support unique sub keys at ./wwdb_upgrade line 248. > I don't know if this is a bug in the script, perhaps related to my > version of mysql (4.0.20) (in which case I will be happy to file a bug > report), or if it is caused by a problem on my end. Any thoughts? > > John > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > OpenWeBWorK-Devel mailing list > Ope...@li... > https://lists.sf.net/lists/listinfo/openwebwork-devel > > > |
From: John J. <jj...@as...> - 2007-06-25 21:34:24
|
Hi, I am trying to get my development copy of webwork working. In running wwdb_upgrade, I get the message > Upgrading database from version 19 to 20... > (Version 20 adds locations, location_addresses, set_locations and > set_locations_user tables to database, and add restrict_ip to set and > set_user.) > > An error occured while running the system upgrade code for version 20: > DBD::mysql::db do failed: Incorrect sub part key. The used key part > isn't a string, the used length is longer than the key part or the > table handler doesn't support unique sub keys at ./wwdb_upgrade line 248. I don't know if this is a bug in the script, perhaps related to my version of mysql (4.0.20) (in which case I will be happy to file a bug report), or if it is caused by a problem on my end. Any thoughts? John |
From: Sam H. <sh...@ma...> - 2007-06-20 16:52:08
|
on 06/19/2007 10:00 PM jf...@pu... said the following: > My name is Justin Floro and I am a graduate student at Purdue University. The > mechanical engineering department at Purdue is considering using the Webwork > system in an engineering thermodynamics class. Some of the faculty have > questions regarding the security features of webwork. I have searched the > webwork website for information pertaining to the security features of > webwork, but I have not been able to locate much information about them. > Could you please provide me with documentation on security, or tell me where I > may go to find it? Hi Justin, The WeBWorK security model is pretty standard -- one logs in with a user name and password, and a session key is generated that is used to authenticate subsequent requests. The session key expires after a configurable period of inactivity. WeBWorK also has a permissions system -- each user has a numeric "permission level". Each WeBWorK action is assigned a minimum required permission level, and a user must meet that minimum to perform that action. All this is configured in the main configuration file -- global.conf. You can peruse the latest version of the file here: <http://cvs.webwork.rochester.edu/viewcvs.cgi/webwork2/conf/global.conf.dist?rev=HEAD&content-type=text/vnd.viewcvs-markup> Thanks for writing -- I'm glad Purdue is considering WeBWorK. Let me know if you have other questions, or need assistance in getting things working. -sam |