You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(58) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(53) |
Feb
(56) |
Mar
|
Apr
|
May
(30) |
Jun
(78) |
Jul
(121) |
Aug
(155) |
Sep
(77) |
Oct
(61) |
Nov
(45) |
Dec
(94) |
2006 |
Jan
(116) |
Feb
(33) |
Mar
(11) |
Apr
(23) |
May
(60) |
Jun
(89) |
Jul
(130) |
Aug
(109) |
Sep
(124) |
Oct
(63) |
Nov
(82) |
Dec
(45) |
2007 |
Jan
(31) |
Feb
(35) |
Mar
(123) |
Apr
(36) |
May
(18) |
Jun
(134) |
Jul
(133) |
Aug
(241) |
Sep
(126) |
Oct
(31) |
Nov
(15) |
Dec
(5) |
2008 |
Jan
(11) |
Feb
(6) |
Mar
(16) |
Apr
(29) |
May
(43) |
Jun
(149) |
Jul
(27) |
Aug
(29) |
Sep
(37) |
Oct
(20) |
Nov
(4) |
Dec
(6) |
2009 |
Jan
(34) |
Feb
(30) |
Mar
(16) |
Apr
(6) |
May
(1) |
Jun
(32) |
Jul
(22) |
Aug
(7) |
Sep
(18) |
Oct
(50) |
Nov
(22) |
Dec
(8) |
2010 |
Jan
(17) |
Feb
(15) |
Mar
(10) |
Apr
(9) |
May
(67) |
Jun
(30) |
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
(1) |
Dec
|
From: Mike G. v. a. <we...@ma...> - 2007-09-19 15:54:37
|
Log Message: ----------- Corrected $userdata->emailaddress to $userdata->email so that the email address is passed correctly to webwork. Added a list of FIXES that are needed in this subroutine so that group information is translated into section and recitation data in webwork. Modified Files: -------------- wwmoodle/wwassignment: lib.php Revision Data ------------- Index: lib.php =================================================================== RCS file: /webwork/cvs/system/wwmoodle/wwassignment/lib.php,v retrieving revision 1.25 retrieving revision 1.26 diff -Lwwassignment/lib.php -Lwwassignment/lib.php -u -r1.25 -r1.26 --- wwassignment/lib.php +++ wwassignment/lib.php @@ -669,6 +669,7 @@ if(isset($setlist)) { $setoptions = array(); foreach($setlist as $setid) { + $setoptions[$setid] = $setid; } return $setoptions; @@ -710,11 +711,18 @@ */ function create_user($webworkcourse,&$userdata,$permission='0') { $studentid = $userid; + # FIXME: find permission for this user and set permissions appropriately in webwork + # FIXME: find the group(s) that this person is a member of + # FIXME: I have used the following scheme: gage_SEC use groups ending like this to determine sections in webwork + # FIXME: use ordinary groups taName to correspond to recitation sections in WeBWorK + # + # FIXME: make it so an update_user function is called whenever the user data in moodle is changed + # FIXME: so if a student switches groups this is reflected in WeBWorK $this->handler('add_user',array('courseName' => $webworkcourse, 'record' => array( 'user_id' => $userdata->username, 'first_name' => $userdata->firstname, 'last_name' => $userdata->lastname, - 'email_address' => $userdata->emailaddress, + 'email_address' => $userdata->email, 'student_id' => $studentid, 'status' => 'C', 'section' => '', |
From: dpvc v. a. <we...@ma...> - 2007-09-19 12:18:28
|
Log Message: ----------- One last change to make hardcopy work properly. Modified Files: -------------- pg/macros: contextCurrency.pl Revision Data ------------- Index: contextCurrency.pl =================================================================== RCS file: /webwork/cvs/system/pg/macros/contextCurrency.pl,v retrieving revision 1.9 retrieving revision 1.10 diff -Lmacros/contextCurrency.pl -Lmacros/contextCurrency.pl -u -r1.9 -r1.10 --- macros/contextCurrency.pl +++ macros/contextCurrency.pl @@ -198,7 +198,8 @@ $context->{_currency}{symbol} = $symbol; $context->operators->remove($symbol) if $context->operators->get($symbol); $context->operators->add( - $symbol => {precedence => 10, associativity => $associativity, type => "unary", string => $symbol, + $symbol => {precedence => 10, associativity => $associativity, type => "unary", + string => ($main::displayMode eq 'TeX' ? Currency::quoteTeX($symbol) : $symbol), TeX => Currency::quoteTeX($symbol), class => 'Currency::UOP::currency'}, ); $context->{parser}{Number} = "Currency::Number"; |
From: dpvc v. a. <we...@ma...> - 2007-09-19 12:12:59
|
Log Message: ----------- Make sure comma's are represented correctly in TeX mode. (They need to be enclosed in braces to get the spacing right.) Modified Files: -------------- pg/macros: contextCurrency.pl Revision Data ------------- Index: contextCurrency.pl =================================================================== RCS file: /webwork/cvs/system/pg/macros/contextCurrency.pl,v retrieving revision 1.8 retrieving revision 1.9 diff -Lmacros/contextCurrency.pl -Lmacros/contextCurrency.pl -u -r1.8 -r1.9 --- macros/contextCurrency.pl +++ macros/contextCurrency.pl @@ -456,6 +456,7 @@ my $currency = ($self->{currency} || $self->context->{currency}); my ($symbol,$comma,$decimal) = ($currency->{symbol},$currency->{comma},$currency->{decimal}); $symbol = $self->context->operators->get($symbol)->{$type} || $symbol; + $comma = "{$comma}" if $type eq 'TeX'; my $s = main::prfmt($self->value,"%.2f"); $s =~ s/\./$decimal/; while ($s =~ s/(\d)(\d\d\d\D)/$1$comma$2/) {} |
From: dpvc v. a. <we...@ma...> - 2007-09-19 12:08:45
|
Log Message: ----------- This was accidentally removed in the last update. OOPS! Modified Files: -------------- pg/macros: contextCurrency.pl Revision Data ------------- Index: contextCurrency.pl =================================================================== RCS file: /webwork/cvs/system/pg/macros/contextCurrency.pl,v retrieving revision 1.7 retrieving revision 1.8 diff -Lmacros/contextCurrency.pl -Lmacros/contextCurrency.pl -u -r1.7 -r1.8 --- macros/contextCurrency.pl +++ macros/contextCurrency.pl @@ -196,6 +196,11 @@ my $associativity = $context->{currency}{associativity}; my $string = ($symbol =~ m/[a-z]/i ? " $symbol " : $symbol); $context->{_currency}{symbol} = $symbol; + $context->operators->remove($symbol) if $context->operators->get($symbol); + $context->operators->add( + $symbol => {precedence => 10, associativity => $associativity, type => "unary", string => $symbol, + TeX => Currency::quoteTeX($symbol), class => 'Currency::UOP::currency'}, + ); $context->{parser}{Number} = "Currency::Number"; $context->{value}{Currency} = "Currency::Currency"; $context->flags->set( |
From: dpvc v. a. <we...@ma...> - 2007-09-19 12:05:05
|
Log Message: ----------- Handle TeX special characters better when used as the currency symbol. (Quote them when displayMode is TeX.) Modified Files: -------------- pg/macros: contextCurrency.pl Revision Data ------------- Index: contextCurrency.pl =================================================================== RCS file: /webwork/cvs/system/pg/macros/contextCurrency.pl,v retrieving revision 1.6 retrieving revision 1.7 diff -Lmacros/contextCurrency.pl -Lmacros/contextCurrency.pl -u -r1.6 -r1.7 --- macros/contextCurrency.pl +++ macros/contextCurrency.pl @@ -198,11 +198,6 @@ $context->{_currency}{symbol} = $symbol; $context->{parser}{Number} = "Currency::Number"; $context->{value}{Currency} = "Currency::Currency"; - $context->operators->remove($symbol) if $context->operators->get($symbol); - $context->operators->add( - $symbol => {precedence => 10, associativity => $associativity, type => "unary", string => $symbol, - TeX => Currency::quoteTeX($symbol), class => 'Currency::UOP::currency'}, - ); $context->flags->set( tolerance => .005, tolType => "absolute", @@ -293,7 +288,8 @@ $operators->add( $symbol => { %{$def}, associativity => $associativity, - string => $string, TeX => Currency::quoteTeX($string), + string => ($main::qisplayMode eq 'TeX' ? Currency::quoteTeX($string) : $string), + TeX => Currency::quoteTeX($string), } ); } @@ -329,7 +325,8 @@ my $string = ($data->{symbol} =~ m/[^a-z]/i ? $data->{symbol} : " $data->{symbol} "); $context->operators->set($data->{symbol}=>{ associativity => $data->{associativity}, - string => $string, tex => Currency::quoteTeX($string), + string => ($main::displayMode eq 'TeX' ? Currency::quoteTeX($string) : $string), + TeX => Currency::quoteTeX($string), }); $context->update; } @@ -449,11 +446,11 @@ # on the correct end for the associativity and remove leading # and trailing spaces. # -sub string { - my $self = shift; +sub format { + my $self = shift; my $type = shift; my $currency = ($self->{currency} || $self->context->{currency}); my ($symbol,$comma,$decimal) = ($currency->{symbol},$currency->{comma},$currency->{decimal}); - $symbol = $self->context->operators->get($symbol)->{string} || $symbol; + $symbol = $self->context->operators->get($symbol)->{$type} || $symbol; my $s = main::prfmt($self->value,"%.2f"); $s =~ s/\./$decimal/; while ($s =~ s/(\d)(\d\d\d\D)/$1$comma$2/) {} @@ -462,13 +459,10 @@ return $s; } -# -# Just use the string and escape any TeX specials -# -sub TeX { - my $self = shift; - return Currency::quoteTeX($self->string(@_)); -} +sub string {(shift)->format("string")} +sub TeX {(shift)->format("TeX")} + + # # Override the class name to get better error messages |
From: dpvc v. a. <we...@ma...> - 2007-09-15 14:52:03
|
Log Message: ----------- Cosmetic changes. Modified Files: -------------- pg/lib/Parser: Number.pm pg/lib/Parser/BOP: equality.pm Revision Data ------------- Index: Number.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/Parser/Number.pm,v retrieving revision 1.17 retrieving revision 1.18 diff -Llib/Parser/Number.pm -Llib/Parser/Number.pm -u -r1.17 -r1.18 --- lib/Parser/Number.pm +++ lib/Parser/Number.pm @@ -11,11 +11,11 @@ sub new { my $self = shift; my $class = ref($self) || $self; my $equation = shift; my $context = $equation->{context}; - my $num; my ($value,$ref) = @_; + my ($value,$ref) = @_; return $self->Item("Complex",$context)->new($equation,$value,$ref) if (ref($value) eq 'ARRAY'); $value = $value->value while Value::isReal($value); - $num = bless { + my $num = bless { value => $value + 0, # format the value as a number, just in case value_string => $value, # for decimal checking, etc. type => $Value::Type{number}, isConstant => 1, Index: equality.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/Parser/BOP/equality.pm,v retrieving revision 1.14 retrieving revision 1.15 diff -Llib/Parser/BOP/equality.pm -Llib/Parser/BOP/equality.pm -u -r1.14 -r1.15 --- lib/Parser/BOP/equality.pm +++ lib/Parser/BOP/equality.pm @@ -40,7 +40,7 @@ $self = $self->Item("BOP")->new($equation,'=',$self->{lop}{op},$self->{rop}{op}); $self = $self->reduce; } - if ($self->{lop}->isNeg && $self->{rop}{isConstant} && + if ($self->{lop}->isNeg && $self->{rop}{isConstant} && $self->{rop}->isNumber && $reduce->{'-x=n'}) { $self = $self->Item("BOP")->new($equation,"=",$self->{lop}{op},Parser::UOP::Neg($self->{rop})); $self = $self->reduce; |
From: dpvc v. a. <we...@ma...> - 2007-09-15 14:50:50
|
Log Message: ----------- Reduce -0 to 0. Modified Files: -------------- pg/lib/Parser/UOP: minus.pm Revision Data ------------- Index: minus.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/Parser/UOP/minus.pm,v retrieving revision 1.5 retrieving revision 1.6 diff -Llib/Parser/UOP/minus.pm -Llib/Parser/UOP/minus.pm -u -r1.5 -r1.6 --- lib/Parser/UOP/minus.pm +++ lib/Parser/UOP/minus.pm @@ -29,11 +29,13 @@ sub _reduce { my $self = shift; my $op = $self->{op}; my $reduce = $self->{equation}{context}{reduction}; - $self = $op->{op} if $op->isNeg && $reduce->{'-(-x)'}; + return $op->{op} if $op->isNeg && $reduce->{'-(-x)'}; + return $op if $op->{isZero} && $reduce->{'-0'}; return $self; } $Parser::reduce->{'-(-x)'} = 1; +$Parser::reduce->{'-0'} = 1; ######################################################################### |
From: dpvc v. a. <we...@ma...> - 2007-09-15 01:03:39
|
Log Message: ----------- Formula objects and Context objects contain reference loops, which prevent them from being freed properly by perl when they are no longer needed. This is a source of an important memory leak in WeBWorK. The problem has been fixed by using Scalar::Util::weaken for these recursive references, so these objects can be freed properly when they go out of scope. This should cause an improvement in the memory usage of the httpd child processes. Modified Files: -------------- pg/lib/Parser: BOP.pm Complex.pm Constant.pm Function.pm Item.pm List.pm Number.pm String.pm UOP.pm Value.pm Variable.pm pg/lib/Value: Formula.pm pg/lib/Value/Context: Data.pm Revision Data ------------- Index: Number.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/Parser/Number.pm,v retrieving revision 1.16 retrieving revision 1.17 diff -Llib/Parser/Number.pm -Llib/Parser/Number.pm -u -r1.16 -r1.17 --- lib/Parser/Number.pm +++ lib/Parser/Number.pm @@ -21,6 +21,7 @@ type => $Value::Type{number}, isConstant => 1, ref => $ref, equation => $equation, }, $class; + $num->weaken; my $x = $num->Package("Real")->make($context,$value); $num->{isOne} = 1 if $x eq 1; $num->{isZero} = 1 if $value == 0; Index: Complex.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/Parser/Complex.pm,v retrieving revision 1.11 retrieving revision 1.12 diff -Llib/Parser/Complex.pm -Llib/Parser/Complex.pm -u -r1.11 -r1.12 --- lib/Parser/Complex.pm +++ lib/Parser/Complex.pm @@ -20,6 +20,7 @@ value => $value, type => $Value::Type{complex}, isConstant => 1, ref => $ref, equation => $equation, }, $class; + $num->weaken; my $z = $self->Package("Complex",$context)->make($context,@{$value}); $num->{isOne} = 1 if ($z cmp 1) == 0; $num->{isZero} = 1 if $z == 0; Index: Value.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/Parser/Value.pm,v retrieving revision 1.20 retrieving revision 1.21 diff -Llib/Parser/Value.pm -Llib/Parser/Value.pm -u -r1.20 -r1.21 --- lib/Parser/Value.pm +++ lib/Parser/Value.pm @@ -37,6 +37,7 @@ value => $value, type => $type, isConstant => 1, ref => $ref, equation => $equation, }, $class; + $c->weaken; $c->check; return $c; } Index: List.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/Parser/List.pm,v retrieving revision 1.23 retrieving revision 1.24 diff -Llib/Parser/List.pm -Llib/Parser/List.pm -u -r1.23 -r1.24 --- lib/Parser/List.pm +++ lib/Parser/List.pm @@ -48,6 +48,7 @@ coords => $coords, type => $type, open => $open, close => $close, paren => $paren, equation => $equation, isConstant => $constant }, $context->{lists}{$type->{name}}{class}; + $list->weaken; my $zero = 1; foreach my $x (@{$coords}) {$zero = 0, last unless $x->{isZero}} Index: Constant.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/Parser/Constant.pm,v retrieving revision 1.14 retrieving revision 1.15 diff -Llib/Parser/Constant.pm -Llib/Parser/Constant.pm -u -r1.14 -r1.15 --- lib/Parser/Constant.pm +++ lib/Parser/Constant.pm @@ -23,6 +23,7 @@ name => $name, type => $type, def => $const, ref => $ref, equation => $equation }, $class; + $c->weaken; $c->{isConstant} = 1 if $const->{isConstant}; return $c; } Index: String.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/Parser/String.pm,v retrieving revision 1.13 retrieving revision 1.14 diff -Llib/Parser/String.pm -Llib/Parser/String.pm -u -r1.13 -r1.14 --- lib/Parser/String.pm +++ lib/Parser/String.pm @@ -26,6 +26,7 @@ value => $value, type => $Value::Type{string}, isConstant => 1, def => $def, ref => $ref, equation => $equation, }, $class; + $str->weaken; $str->{isInfinite} = 1 if ($def->{infinite}); $str->{isInfinity} = 1 if ($def->{infinite} && !$def->{negative}); $str->{isNegativeInfinity} = 1 if ($def->{infinite} && $def->{negative}); Index: BOP.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/Parser/BOP.pm,v retrieving revision 1.21 retrieving revision 1.22 diff -Llib/Parser/BOP.pm -Llib/Parser/BOP.pm -u -r1.21 -r1.22 --- lib/Parser/BOP.pm +++ lib/Parser/BOP.pm @@ -30,6 +30,7 @@ bop => $bop, lop => $lop, rop => $rop, def => $def, ref => $ref, equation => $equation, }, $def->{class}; + $BOP->weaken; $BOP->{isConstant} = 1 if ($lop->{isConstant} && $rop->{isConstant}); $BOP->_check; $BOP = $BOP->Item("Value")->new($equation,[$BOP->eval]) Index: Variable.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/Parser/Variable.pm,v retrieving revision 1.11 retrieving revision 1.12 diff -Llib/Parser/Variable.pm -Llib/Parser/Variable.pm -u -r1.11 -r1.12 --- lib/Parser/Variable.pm +++ lib/Parser/Variable.pm @@ -28,10 +28,12 @@ if $variables-> {$name}{parameter} && $equation->{context}{flags}{no_parameters}; $equation->{variables}{$name} = 1; my $def = $variables->{$name}; - bless { + my $v = bless { name => $name, def => $def, type => $def->{type}, ref => $ref, equation => $equation }, $class; + $v->weaken; + return $v; } # Index: Function.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/Parser/Function.pm,v retrieving revision 1.24 retrieving revision 1.25 diff -Llib/Parser/Function.pm -Llib/Parser/Function.pm -u -r1.24 -r1.25 --- lib/Parser/Function.pm +++ lib/Parser/Function.pm @@ -19,6 +19,7 @@ name => $name, params => $params, def => $def, ref => $ref, equation => $equation, }, $def->{class}; + $fn->weaken; $fn->{isConstant} = $constant; $fn->_check; return $fn->Item("Value")->new($equation,[$fn->eval]) Index: Item.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/Parser/Item.pm,v retrieving revision 1.15 retrieving revision 1.16 diff -Llib/Parser/Item.pm -Llib/Parser/Item.pm -u -r1.15 -r1.16 --- lib/Parser/Item.pm +++ lib/Parser/Item.pm @@ -6,6 +6,7 @@ package Parser::Item; use strict; use UNIVERSAL; +use Scalar::Util; # # Make these available to Parser items @@ -13,6 +14,8 @@ sub isa {UNIVERSAL::isa(@_)} sub can {UNIVERSAL::can(@_)} +sub weaken {Scalar::Util::weaken((shift)->{equation})} + # # Return the class name of an item # @@ -135,9 +138,10 @@ my $self = shift; my $equation = shift; my $new = {%{$self}}; if (ref($self) ne 'HASH') { - bless $new, ref($self); $new->{equation} = $equation if defined($equation); $new->{ref} = undef; + bless $new, ref($self); + $new->weaken; } $new->{type} = copy($self->{type}) if defined($self->{type}); return $new; Index: UOP.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/Parser/UOP.pm,v retrieving revision 1.20 retrieving revision 1.21 diff -Llib/Parser/UOP.pm -Llib/Parser/UOP.pm -u -r1.20 -r1.21 --- lib/Parser/UOP.pm +++ lib/Parser/UOP.pm @@ -17,6 +17,7 @@ uop => $uop, op => $op, def => $def, ref => $ref, equation => $equation }, $def->{class}; + $UOP->weaken; $UOP->{isConstant} = 1 if $op->{isConstant}; $UOP->_check; $UOP = $UOP->Item("Value")->new($equation,[$UOP->eval]) Index: Formula.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/Value/Formula.pm,v retrieving revision 1.58 retrieving revision 1.59 diff -Llib/Value/Formula.pm -Llib/Value/Formula.pm -u -r1.58 -r1.59 --- lib/Value/Formula.pm +++ lib/Value/Formula.pm @@ -75,13 +75,13 @@ $formula->{context} = $r->{context}; $r = $r->{tree}->copy($formula); } else { - $r = $self->new($r)->{tree}; + $r = $self->new($r)->{tree}->copy($formula); } if (ref($l) eq $class || ref($l) eq $pkg) { $formula->{context} = $l->{context}; $l = $l->{tree}->copy($formula); } else { - $l = $self->new($l)->{tree}; + $l = $self->new($l)->{tree}->copy($formula); } $bop = 'U' if $bop eq '+' && ($l->type =~ m/Interval|Set|Union/ || $r->type =~ m/Interval|Set|Union/); Index: Data.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/Value/Context/Data.pm,v retrieving revision 1.11 retrieving revision 1.12 diff -Llib/Value/Context/Data.pm -Llib/Value/Context/Data.pm -u -r1.11 -r1.12 --- lib/Value/Context/Data.pm +++ lib/Value/Context/Data.pm @@ -4,6 +4,7 @@ # package Value::Context::Data; use strict; +use Scalar::Util; sub new { my $self = shift; my $class = ref($self) || $self; @@ -17,6 +18,7 @@ namePattern => '', # pattern for allowed names for new items name => '', Name => '', # lower- and upper-case names for the class of items }, $class; + $data->weaken; $data->init(); $parent->{$data->{dataName}} = {}; push @{$parent->{data}{objects}},"_$data->{dataName}"; @@ -55,6 +57,11 @@ } # +# Make context pointer a weak pointer (avoids reference loops) +# +sub weaken {Scalar::Util::weaken((shift)->{context})} + +# # Update the context patterns # sub update {(shift)->{context}->update} |
From: Mike G. v. a. <we...@ma...> - 2007-09-14 16:18:10
|
Log Message: ----------- Add webwork image as favicon to the standard distribution. The favicon produces the small web image that appears in the browser's url entry window at the top of the page. Added Files: ----------- webwork-modperl/htdocs: favicon.ico Revision Data ------------- |
From: Gavin L. v. a. <we...@ma...> - 2007-09-14 15:34:03
|
Log Message: ----------- Bug fix. Both the proctored test template and all taken versions of the test were being dropped from the ProblemSets page when the user didn't have the auth level to view proctored tests. Modified Files: -------------- webwork2/lib/WeBWorK/ContentGenerator: ProblemSets.pm Revision Data ------------- Index: ProblemSets.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/ContentGenerator/ProblemSets.pm,v retrieving revision 1.90 retrieving revision 1.91 diff -Llib/WeBWorK/ContentGenerator/ProblemSets.pm -Llib/WeBWorK/ContentGenerator/ProblemSets.pm -u -r1.90 -r1.91 --- lib/WeBWorK/ContentGenerator/ProblemSets.pm +++ lib/WeBWorK/ContentGenerator/ProblemSets.pm @@ -139,7 +139,7 @@ debug("Begin collecting merged sets"); my @sets = $db->getMergedSets( @userSetIDs ); - + debug("Begin fixing merged sets"); # Database fix (in case of undefined published values) @@ -164,13 +164,15 @@ my $existVersions = 0; my @gwSets = (); my @nonGWsets = (); + my %gwSetNames = (); # this is necessary because we get a setname + # for all versions of g/w tests foreach ( @sets ) { if ( defined( $_->assignment_type() ) && $_->assignment_type() =~ /gateway/ ) { $existVersions = 1; - push( @gwSets, $_ ) - if ( $_->assignment_type() !~ /proctored/ || - $authz->hasPermissions($user,"view_proctored_tests") ); + + push( @gwSets, $_ ) if ( ! defined($gwSetNames{$_->set_id}) ); + $gwSetNames{$_->set_id} = 1; } else { push( @nonGWsets, $_ ); } @@ -221,6 +223,11 @@ } debug("Begin sorting merged sets"); + +# before building final set lists, exclude proctored gateway sets +# for users without permission to view them + my $viewPr = $authz->hasPermissions( $user, "view_proctored_tests" ); + @gwSets = grep {$_->assignment_type !~ /proctored/ || $viewPr} @gwSets; if ( $sort eq 'name' ) { @nonGWsets = sortByName("set_id", @nonGWsets); |
From: Matt L. v. a. <we...@ma...> - 2007-09-13 00:44:48
|
Log Message: ----------- New README Modified Files: -------------- wwmoodle/wwquestion: README wwmoodle/wwquestion/bin/setup: setup.pl Revision Data ------------- Index: README =================================================================== RCS file: /webwork/cvs/system/wwmoodle/wwquestion/README,v retrieving revision 1.1 retrieving revision 1.2 diff -Lwwquestion/README -Lwwquestion/README -u -r1.1 -r1.2 --- wwquestion/README +++ wwquestion/README @@ -1,6 +1,6 @@ Webwork Question Type ---------------------- -Version: 0.4 (stable) Released 9/11/2007 +Version: 1.0 (stable RC1) Released 9/12/2007 Maintainer: Matthew Leventi <mle...@gm...> CVS: cvs.webwork.rochester.edu:/webwork/cvs/system wwmoodle/wwquestion Index: setup.pl =================================================================== RCS file: /webwork/cvs/system/wwmoodle/wwquestion/bin/setup/setup.pl,v retrieving revision 1.4 retrieving revision 1.5 diff -Lwwquestion/bin/setup/setup.pl -Lwwquestion/bin/setup/setup.pl -u -r1.4 -r1.5 --- wwquestion/bin/setup/setup.pl +++ wwquestion/bin/setup/setup.pl @@ -97,7 +97,7 @@ #File Moving/Linking $files = promptUser('Would you like me to place the files into proper directories (y,n)','y'); if($files eq 'y') { - $doWhat = promptUser('Would you like me to copy the files or soft link them.(copy,link)','link'); + $doWhat = promptUser('Would you like me to copy the help files or soft link them.(copy,link)','link'); if($doWhat eq 'link') { $action = 'ln -sf '; } elsif ($doWhat eq 'copy') { @@ -109,7 +109,7 @@ #wipe existing directories system("rm -rf $moodleRoot/question/type/webwork"); system("rm -rf $moodleRoot/lang/en_utf8/help/webwork"); - system($action . "$wwquestionRoot/moodle/question/type/webwork " .$moodleRoot . '/question/type/'); + system("cp -R $wwquestionRoot/moodle/question/type/webwork " .$moodleRoot . '/question/type/'); system($action . "$wwquestionRoot/moodle/lang/en_utf8/qtype_webwork.php " . $moodleRoot . '/lang/en_utf8/qtype_webwork.php'); system($action . "$wwquestionRoot/moodle/lang/en_utf8/help/quiz/webwork.html " . $moodleRoot . '/lang/en_utf8/help/quiz/webwork.html'); system($action . "$wwquestionRoot/moodle/lang/en_utf8/help/webwork " . $moodleRoot . '/lang/en_utf8/help/'); |
From: Matt L. v. a. <we...@ma...> - 2007-09-13 00:43:12
|
Log Message: ----------- New setup instructions Modified Files: -------------- ww_question_server: README ww_question_server/bin/setup: setup.pl Revision Data ------------- Index: README =================================================================== RCS file: /webwork/cvs/system/ww_question_server/README,v retrieving revision 1.7 retrieving revision 1.8 diff -LREADME -LREADME -u -r1.7 -r1.8 --- README +++ README @@ -1,48 +1,12 @@ Webwork Question Server ---------------------- -Version: 0.3 (stable) +Version: 1.0 (stable RC1) Maintainer: Matthew Leventi <mle...@gm...> CVS: cvs.webwork.rochester.edu:/webwork/cvs/system ww_question_server ** If your using this send me an email ** -Note: You don't need to install the WeBWorK system for this server to function. All you need are the PG libraries. - -Whats new: -* Safe compartment errors fixed. -* Automatic downloading of external files for PG questions. -* Many bug fixes -* Added tth support. --- -* Simple install with script. -* Code refactoring -* One translator per child, (speed boost) -* Fixed WSDL errors -* Minor bug fixes - -Prerequisites: -* Pod::WSDL CPAN Module -* Apache 1 or 2 -* mod_perl -* Apache::SOAP CPAN Module for apache 1, or Apache2::SOAP CPAN Module for apache2 -* LWP::Simple module -* latex,dvipng,tth installed -* WeBWorK PG libraries installed +Note: You don't need to install the WeBWorK system for this server to function. All you need is the PG libraries. Setup: - 1) Change permissions for directories writable by server - chmod -R 777 htdocs/tmp - chown -R www-data:www-data htdocs/tmp - chmod -R 777 tmp - chown -R www-data:www-data tmp - 2) Run the setup program in bin/setup - perl setup.pl - Write down the WSDL path that the setup program gives you. It is what you use in the Moodle - WeBWorK Question Type. - 3) Copy the following files to the following places - bin/setup/WSDL.wsdl -> htdocs/WSDL.wsdl - bin/setup/global.conf -> conf/global.conf - bin/setup/problemserver.apache-config -> conf/problemserver.apache-config - 4) Include problemserver.apache-config in your apache configuration file. - Note: The problemserver.apache-config works for both apache 1 and 2. - ex) Include /home/you/problemserver/conf/problemserver.apache-config - 6) Restart Apache + 1) Run the bin/setup/setup.pl Index: setup.pl =================================================================== RCS file: /webwork/cvs/system/ww_question_server/bin/setup/setup.pl,v retrieving revision 1.7 retrieving revision 1.8 diff -Lbin/setup/setup.pl -Lbin/setup/setup.pl -u -r1.7 -r1.8 --- bin/setup/setup.pl +++ bin/setup/setup.pl @@ -116,7 +116,7 @@ print "###################################\n"; #Continue? -print "This script will setup the configuration of WeBWorK Question Server.\n"; +print "This script will setup the WeBWorK Question Server.\n"; $continue = promptUser('Continue','y'); if($continue ne "y") { exit; |
From: Matt L. v. a. <we...@ma...> - 2007-09-13 00:35:11
|
Log Message: ----------- Modified Files: -------------- wwmoodle/wwquestion/moodle/question/type/webwork: edit_webwork_form.php Revision Data ------------- Index: edit_webwork_form.php =================================================================== RCS file: /webwork/cvs/system/wwmoodle/wwquestion/moodle/question/type/webwork/edit_webwork_form.php,v retrieving revision 1.1 retrieving revision 1.2 diff -Lwwquestion/moodle/question/type/webwork/edit_webwork_form.php -Lwwquestion/moodle/question/type/webwork/edit_webwork_form.php -u -r1.1 -r1.2 --- wwquestion/moodle/question/type/webwork/edit_webwork_form.php +++ wwquestion/moodle/question/type/webwork/edit_webwork_form.php @@ -25,7 +25,6 @@ //CODE HEADER $mform->addElement('header', 'codeheader', get_string("edit_codeheader", 'qtype_webwork')); - $mform->setHelpButton('codeheader',array('codeheader', get_string('edit_codeheader','qtype_webwork'),'webwork')); //CODE $mform->addElement('textarea', 'code', get_string('edit_code', 'qtype_webwork'), @@ -66,7 +65,7 @@ $mform->addElement('text', 'seed', get_string('edit_seed','qtype_webwork'), array('size' => 3)); $mform->setType('seed', PARAM_INT); - $mform->setHelpButton('seed', array('webwork', get_string('edit_seed', 'qtype_webwork'), 'webwork')); + $mform->setHelpButton('seed', array('seed', get_string('edit_seed', 'qtype_webwork'), 'webwork')); $mform->setDefault('seed', 0); $mform->addRule('seed', null, 'required', null, 'client'); @@ -74,7 +73,7 @@ $mform->addElement('text', 'trials', get_string('edit_trials','qtype_webwork'), array('size' => 3)); $mform->setType('trials', PARAM_INT); - $mform->setHelpButton('trials', array('webwork', get_string('edit_trials', 'qtype_webwork'), 'webwork')); + $mform->setHelpButton('trials', array('trials', get_string('edit_trials', 'qtype_webwork'), 'webwork')); $mform->setDefault('trials', 10); $mform->addRule('trials', null, 'required', null, 'client'); } |
From: Matt L. v. a. <we...@ma...> - 2007-09-13 00:33:47
|
Log Message: ----------- Modified Files: -------------- wwmoodle/wwquestion/moodle/lang/en_utf8/help/quiz: webwork.html wwmoodle/wwquestion/moodle/lang/en_utf8/help/webwork: code.html codecheck.html fileheader.html seed.html trials.html Removed Files: ------------- wwmoodle/wwquestion/moodle/lang/en_utf8/help/webwork: codeheader.html webwork.html Revision Data ------------- Index: webwork.html =================================================================== RCS file: /webwork/cvs/system/wwmoodle/wwquestion/moodle/lang/en_utf8/help/quiz/webwork.html,v retrieving revision 1.1 retrieving revision 1.2 diff -Lwwquestion/moodle/lang/en_utf8/help/quiz/webwork.html -Lwwquestion/moodle/lang/en_utf8/help/quiz/webwork.html -u -r1.1 -r1.2 --- wwquestion/moodle/lang/en_utf8/help/quiz/webwork.html +++ wwquestion/moodle/lang/en_utf8/help/quiz/webwork.html @@ -0,0 +1,3 @@ +<h1>WeBWorK questions</h1> + +<p>This is a WeBWorK question within Moodle. For information on each of the fields click the corresponding help icon.</p> --- wwquestion/moodle/lang/en_utf8/help/webwork/webwork.html +++ /dev/null @@ -1,4 +0,0 @@ -<p align="center"><b>WeBWorK</b></p> - -<p>TODO describe your question type and how to edit it here. This help file is -linked to from the top of the question editing form for you question type.</p> Index: code.html =================================================================== RCS file: /webwork/cvs/system/wwmoodle/wwquestion/moodle/lang/en_utf8/help/webwork/code.html,v retrieving revision 1.1 retrieving revision 1.2 diff -Lwwquestion/moodle/lang/en_utf8/help/webwork/code.html -Lwwquestion/moodle/lang/en_utf8/help/webwork/code.html -u -r1.1 -r1.2 --- wwquestion/moodle/lang/en_utf8/help/webwork/code.html +++ wwquestion/moodle/lang/en_utf8/help/webwork/code.html @@ -0,0 +1,3 @@ +<h1>PG Code</h1> + +<p>Paste in the PG code for this WeBWorK problem.</p> \ No newline at end of file Index: seed.html =================================================================== RCS file: /webwork/cvs/system/wwmoodle/wwquestion/moodle/lang/en_utf8/help/webwork/seed.html,v retrieving revision 1.1 retrieving revision 1.2 diff -Lwwquestion/moodle/lang/en_utf8/help/webwork/seed.html -Lwwquestion/moodle/lang/en_utf8/help/webwork/seed.html -u -r1.1 -r1.2 --- wwquestion/moodle/lang/en_utf8/help/webwork/seed.html +++ wwquestion/moodle/lang/en_utf8/help/webwork/seed.html @@ -0,0 +1,3 @@ +<h1>Seed</h1> + +<p>This is the starting seed used in the random number generator.</p> \ No newline at end of file Index: fileheader.html =================================================================== RCS file: /webwork/cvs/system/wwmoodle/wwquestion/moodle/lang/en_utf8/help/webwork/fileheader.html,v retrieving revision 1.1 retrieving revision 1.2 diff -Lwwquestion/moodle/lang/en_utf8/help/webwork/fileheader.html -Lwwquestion/moodle/lang/en_utf8/help/webwork/fileheader.html -u -r1.1 -r1.2 --- wwquestion/moodle/lang/en_utf8/help/webwork/fileheader.html +++ wwquestion/moodle/lang/en_utf8/help/webwork/fileheader.html @@ -0,0 +1,5 @@ +<h1>File Handler</h1> + +<p>This allows you to upload any files that the PG code requires as external dependencies. Examples would be images, java applet code, etc. Please only upload necessary files. The more you upload the slower question creation will be. Although the number of files will not effect the speed a question is displayed.</p> + +<p>The derivations directory holds information about the current question derivations.</p> \ No newline at end of file Index: codecheck.html =================================================================== RCS file: /webwork/cvs/system/wwmoodle/wwquestion/moodle/lang/en_utf8/help/webwork/codecheck.html,v retrieving revision 1.1 retrieving revision 1.2 diff -Lwwquestion/moodle/lang/en_utf8/help/webwork/codecheck.html -Lwwquestion/moodle/lang/en_utf8/help/webwork/codecheck.html -u -r1.1 -r1.2 --- wwquestion/moodle/lang/en_utf8/help/webwork/codecheck.html +++ wwquestion/moodle/lang/en_utf8/help/webwork/codecheck.html @@ -0,0 +1,26 @@ +<h1>Code Checking</h1> + +<p>This field determines how strictly Moodle will check your PG code. If a question fails to clear code checking the question edit form will be displayed with the errors and warnings the question produced. There are five levels of code checking:</p> + +<ul> + <li> + <b>Turn Off (unadvised)</b><br> + This will turn of Code Checking completely. It is strongly recommended that you do not use this setting. + </li> + <li> + <b>Reject Problem Seeds w/ Errors (silent)</b><br> + This setting will reject any seeds that are generated with errors. Warnings are ignored. If any error-free seeds are found within the alloted trials they will be used as derivations. + </li> + <li> + <b>Reject Question if any Errors exist (strict)</b><br> + This setting will reject the question if any errors are found on any seeds. Warnings are ignored. + </li> + <li> + <b>Problem Seeds w/ Errors or Warnings (silent)</b><br> + This setting will reject any seeds that are generated with any errors or warnings. If any error-free seeds are found within the alloted trials they will be used as derivations. + </li> + <li> + <b>Reject Question if any Errors or Warnings exist (strict)</b><br> + This setting will reject the question if any errors or warnings are found on any seeds. + </li> +</ul> \ No newline at end of file Index: trials.html =================================================================== RCS file: /webwork/cvs/system/wwmoodle/wwquestion/moodle/lang/en_utf8/help/webwork/trials.html,v retrieving revision 1.1 retrieving revision 1.2 diff -Lwwquestion/moodle/lang/en_utf8/help/webwork/trials.html -Lwwquestion/moodle/lang/en_utf8/help/webwork/trials.html -u -r1.1 -r1.2 --- wwquestion/moodle/lang/en_utf8/help/webwork/trials.html +++ wwquestion/moodle/lang/en_utf8/help/webwork/trials.html @@ -0,0 +1,3 @@ +<h1>Trials</h1> + +<p>This is the number of attempts the WeBWorK Question Server will make to render question derivations. Depending on your code checking settings the number of derivations of a question may be less than this number</p> \ No newline at end of file |
From: Matt L. v. a. <we...@ma...> - 2007-09-12 15:51:37
|
Log Message: ----------- Fixed linking Errors Modified Files: -------------- wwmoodle/wwquestion/bin/setup: setup.pl Revision Data ------------- Index: setup.pl =================================================================== RCS file: /webwork/cvs/system/wwmoodle/wwquestion/bin/setup/setup.pl,v retrieving revision 1.3 retrieving revision 1.4 diff -Lwwquestion/bin/setup/setup.pl -Lwwquestion/bin/setup/setup.pl -u -r1.3 -r1.4 --- wwquestion/bin/setup/setup.pl +++ wwquestion/bin/setup/setup.pl @@ -101,14 +101,20 @@ if($doWhat eq 'link') { $action = 'ln -sf '; } elsif ($doWhat eq 'copy') { + print "Remember to rerun setup when/if you update from the CVS\n"; $action = 'cp -R '; } else { exit; } - system($action . "$wwquestionRoot/moodle/question/type/webwork " .$moodleRoot . '/question/type/webwork'); + #wipe existing directories + system("rm -rf $moodleRoot/question/type/webwork"); + system("rm -rf $moodleRoot/lang/en_utf8/help/webwork"); + system($action . "$wwquestionRoot/moodle/question/type/webwork " .$moodleRoot . '/question/type/'); system($action . "$wwquestionRoot/moodle/lang/en_utf8/qtype_webwork.php " . $moodleRoot . '/lang/en_utf8/qtype_webwork.php'); system($action . "$wwquestionRoot/moodle/lang/en_utf8/help/quiz/webwork.html " . $moodleRoot . '/lang/en_utf8/help/quiz/webwork.html'); - system($action . "$wwquestionRoot/moodle/lang/en_utf8/help/webwork " . $moodleRoot . '/lang/en_utf8/help/webwork'); + system($action . "$wwquestionRoot/moodle/lang/en_utf8/help/webwork " . $moodleRoot . '/lang/en_utf8/help/'); + + print "Setup Successful!\n"; } |
From: Matt L. v. a. <we...@ma...> - 2007-09-12 15:33:30
|
Log Message: ----------- Inline with UNIX standards Added Files: ----------- wwmoodle/wwquestion: CHANGES Removed Files: ------------- wwmoodle/wwquestion: version.txt Revision Data ------------- --- /dev/null +++ wwquestion/CHANGES @@ -0,0 +1,17 @@ +Change Log: + +Version .3 (9/11/2007) +* Derivation mismatch bugs fixed. +* New Test file +* External File support! (applet,images,graphs,etc) +* Code Refactoring +* New levels of Code Checking including warnings + +Version .2 (August 2007) +* DB consistency issues fixed (thanks to Jean-Marc) +* New code checking, makes sure PG code is correct +* Images are now copied locally for faster problem loading +* Minor bug Fixes + +Version .1 (July 2007) +* Initial Release --- wwquestion/version.txt +++ /dev/null @@ -1,17 +0,0 @@ -Old versions: - -Version .3 (9/11/2007) -* Derivation mismatch bugs fixed. -* New Test file -* External File support! (applet,images,graphs,etc) -* Code Refactoring -* New levels of Code Checking including warnings - -Version .2 (August 2007) -* DB consistency issues fixed (thanks to Jean-Marc) -* New code checking, makes sure PG code is correct -* Images are now copied locally for faster problem loading -* Minor bug Fixes - -Version .1 (July 2007) -* Initial Release \ No newline at end of file |
From: Matt L. v. a. <we...@ma...> - 2007-09-12 15:30:00
|
Log Message: ----------- In line with UNIX standard Added Files: ----------- wwmoodle/wwquestion: README Removed Files: ------------- wwmoodle/wwquestion: README.txt Revision Data ------------- --- wwquestion/README.txt +++ /dev/null @@ -1,43 +0,0 @@ -Webwork Question Type ----------------------- -Version: 0.4 (stable) Released 9/11/2007 -Maintainer: Matthew Leventi <mle...@gm...> -CVS: cvs.webwork.rochester.edu:/webwork/cvs/system wwmoodle/wwquestion - -This is a moodle questiontype module that will allow webwork questions to be asked in Moodle Quizzes and Lessons. Currently it supports many of the features found in the webwork2 system. Almost all WeBWorK questions should work with this system. (If you find one that doesnt send me a copy). - -* If you are using this send me an email. Feedback is appreciated. * - -Current Release: -* Show Partial Answer Questions Work! -* New Unit Tests to ensure proper setup. -* Code refactoring - -Upgrading: -Backward Compatibility of existing questions is not guaranteeded. To upgrade your Database loading and unloading the webwork DB file in the XMLDB editor should make the necessary changes. - - -Setup: -1) Run the perl installation script in bin/setup/setup.pl -2) Point your browser to http://yourmoodle/admin to setup the question_webwork database table. - -Testing: -1) In the site administration -> reports -> unit tests run the webwork unit tests. Enter '/question/type/webwork/simpletest' to only run the webwork tests. - -Use: -Go into the question bank and create a new WeBWorK question. Besides the usual question options there are a few WeBWorL specific fields. -Code -> Copy and paste the PG code into this field. -Files -> Upload any necessary external files that the question depends on. -Code Check -> This determines how strict the checker should be in determining whether your question works -Seed -> The starting seed on which to create question derivations. -Trials -> The number of derivations to create. (Roughly) - -Note on Question Creation: -As you increase trials question creation will take longer. If you need a lot of external files question creation will also take longer. Longest time I have seen is about a minute. The reason for the delay involves the creation of derived questions based on the PG code. It means that viewing of questions should be very fast. Student answer checks will also be faster. - -Note on Randomness: -WeBWorK Questions are not truly random within this module. The trials option determines the size of a pool of questions that are generated from the PG code. Students will get a random derivation out of the pool as the question they have to answer. When an instructor previews a question in the bank he/she will see a random seed. - -Finding webwork questions: -http://cvs.webwork.rochester.edu/viewcvs.cgi/rochester_problib/?cvsroot=UR+Problem+Library (for now) -An example can be found in simpletest/sampleProblem.pg as well. --- /dev/null +++ wwquestion/README @@ -0,0 +1,43 @@ +Webwork Question Type +---------------------- +Version: 0.4 (stable) Released 9/11/2007 +Maintainer: Matthew Leventi <mle...@gm...> +CVS: cvs.webwork.rochester.edu:/webwork/cvs/system wwmoodle/wwquestion + +This is a moodle questiontype module that will allow webwork questions to be asked in Moodle Quizzes and Lessons. Currently it supports many of the features found in the webwork2 system. Almost all WeBWorK questions should work with this system. (If you find one that doesnt send me a copy). + +* If you are using this send me an email. Feedback is appreciated. * + +Current Release: +* Show Partial Answer Questions Work! +* New Unit Tests to ensure proper setup. +* Code refactoring + +Upgrading: +Backward Compatibility of existing questions is not guaranteeded. To upgrade your Database loading and unloading the webwork DB file in the XMLDB editor should make the necessary changes. + + +Setup: +1) Run the perl installation script in bin/setup/setup.pl +2) Point your browser to http://yourmoodle/admin to setup the question_webwork database table. + +Testing: +1) In the site administration -> reports -> unit tests run the webwork unit tests. Enter '/question/type/webwork/simpletest' to only run the webwork tests. + +Use: +Go into the question bank and create a new WeBWorK question. Besides the usual question options there are a few WeBWorL specific fields. +Code -> Copy and paste the PG code into this field. +Files -> Upload any necessary external files that the question depends on. +Code Check -> This determines how strict the checker should be in determining whether your question works +Seed -> The starting seed on which to create question derivations. +Trials -> The number of derivations to create. (Roughly) + +Note on Question Creation: +As you increase trials question creation will take longer. If you need a lot of external files question creation will also take longer. Longest time I have seen is about a minute. The reason for the delay involves the creation of derived questions based on the PG code. It means that viewing of questions should be very fast. Student answer checks will also be faster. + +Note on Randomness: +WeBWorK Questions are not truly random within this module. The trials option determines the size of a pool of questions that are generated from the PG code. Students will get a random derivation out of the pool as the question they have to answer. When an instructor previews a question in the bank he/she will see a random seed. + +Finding webwork questions: +http://cvs.webwork.rochester.edu/viewcvs.cgi/rochester_problib/?cvsroot=UR+Problem+Library (for now) +An example can be found in simpletest/sampleProblem.pg as well. |
From: Matt L. v. a. <we...@ma...> - 2007-09-12 15:26:32
|
Log Message: ----------- Updated README for setup.pl Modified Files: -------------- wwmoodle/wwquestion: README.txt Revision Data ------------- Index: README.txt =================================================================== RCS file: /webwork/cvs/system/wwmoodle/wwquestion/README.txt,v retrieving revision 1.6 retrieving revision 1.7 diff -Lwwquestion/README.txt -Lwwquestion/README.txt -u -r1.6 -r1.7 --- wwquestion/README.txt +++ wwquestion/README.txt @@ -18,12 +18,8 @@ Setup: -1) Make a new folder named 'webwork' in the question/type directory. -2) Copy all the files into the new 'webwork' directory. -3) Point your browser to http://yourmoodle/admin to setup the question_webwork database table. - -Configuration: -1) Change the WSDL path variable in the webwork/config.php file to point to your Webwork Problem Server's WSDL file. +1) Run the perl installation script in bin/setup/setup.pl +2) Point your browser to http://yourmoodle/admin to setup the question_webwork database table. Testing: 1) In the site administration -> reports -> unit tests run the webwork unit tests. Enter '/question/type/webwork/simpletest' to only run the webwork tests. |
From: Matt L. v. a. <we...@ma...> - 2007-09-12 15:24:40
|
Log Message: ----------- Fixed Errors with stagnant config.php file. Modified Files: -------------- wwmoodle/wwquestion/bin/setup: setup.pl Removed Files: ------------- wwmoodle/wwquestion/moodle/question/type/webwork: config.php Revision Data ------------- Index: setup.pl =================================================================== RCS file: /webwork/cvs/system/wwmoodle/wwquestion/bin/setup/setup.pl,v retrieving revision 1.2 retrieving revision 1.3 diff -Lwwquestion/bin/setup/setup.pl -Lwwquestion/bin/setup/setup.pl -u -r1.2 -r1.3 --- wwquestion/bin/setup/setup.pl +++ wwquestion/bin/setup/setup.pl @@ -91,7 +91,7 @@ print OUTP3 $content; close OUTP3; -system("cp config.php $wwquestionRoot/moodle/question/type/webwork/config.php"); +system("mv config.php $wwquestionRoot/moodle/question/type/webwork/config.php"); print "config.php file generated.\n"; #File Moving/Linking |
From: Matt L. v. a. <we...@ma...> - 2007-09-12 15:22:17
|
Log Message: ----------- Added Robust Installation Script Modified Files: -------------- wwmoodle/wwquestion/bin/setup: config.php.base setup.pl wwmoodle/wwquestion/moodle/question/type/webwork: config.php Revision Data ------------- Index: config.php.base =================================================================== RCS file: /webwork/cvs/system/wwmoodle/wwquestion/bin/setup/config.php.base,v retrieving revision 1.1 retrieving revision 1.2 diff -Lwwquestion/bin/setup/config.php.base -Lwwquestion/bin/setup/config.php.base -u -r1.1 -r1.2 --- wwquestion/bin/setup/config.php.base +++ wwquestion/bin/setup/config.php.base @@ -1,7 +1,7 @@ <?php //Path to the WSDL file on the Webwork Server -define('WWQUESTION_WSDL','ENTER YOUR WSDL PATH HERE','WSDL Path Test'); +define('WWQUESTION_WSDL','MARKER_FOR_WSDL'); //Leave the rest alone define('WWQUESTION_PREFIX','/wwquestions'); Index: setup.pl =================================================================== RCS file: /webwork/cvs/system/wwmoodle/wwquestion/bin/setup/setup.pl,v retrieving revision 1.1 retrieving revision 1.2 diff -Lwwquestion/bin/setup/setup.pl -Lwwquestion/bin/setup/setup.pl -u -r1.1 -r1.2 --- wwquestion/bin/setup/setup.pl +++ wwquestion/bin/setup/setup.pl @@ -1,7 +1,6 @@ #!/usr/bin/env perl -use CPAN; -use File::Which; die "You do not have File::Which installed.\n Run perl -MCPAN -e 'install File::Which' to install. Then rerun this." if $@; +use Cwd; sub promptUser { @@ -62,10 +61,56 @@ exit; } +#Program Root +print "Please enter the root directory where wwquestion module is located. \n"; +print "Example: /tmp/wwmoodle/wwquestion\n"; +$wwquestionRoot = promptUser(''); + +#Moodle Root print "Please enter the root directory where Moodle is installed. \n"; print "Example: /var/www/moodle \n"; $moodleRoot = promptUser(''); +#WSDL Root Directory print "Please enter the WSDL Path given in the server setup. \n"; print "Example: http://myserver/problemserver_files/WSDL.wsdl\n"; $wsdlPath = promptUser(''); + +#Writing Configuration File +open(INPUT2, "<config.php.base"); +$content = ""; +while(<INPUT2>) +{ + my($line) = $_; + $content .= $line; +} +close INPUT2; + +$content =~ s/MARKER_FOR_WSDL/$wsdlPath/; +open(OUTP3, ">config.php") or die("Cannot open file 'config.php' for writing.\n"); +print OUTP3 $content; +close OUTP3; + +system("cp config.php $wwquestionRoot/moodle/question/type/webwork/config.php"); +print "config.php file generated.\n"; + +#File Moving/Linking +$files = promptUser('Would you like me to place the files into proper directories (y,n)','y'); +if($files eq 'y') { + $doWhat = promptUser('Would you like me to copy the files or soft link them.(copy,link)','link'); + if($doWhat eq 'link') { + $action = 'ln -sf '; + } elsif ($doWhat eq 'copy') { + $action = 'cp -R '; + } else { + exit; + } + system($action . "$wwquestionRoot/moodle/question/type/webwork " .$moodleRoot . '/question/type/webwork'); + system($action . "$wwquestionRoot/moodle/lang/en_utf8/qtype_webwork.php " . $moodleRoot . '/lang/en_utf8/qtype_webwork.php'); + system($action . "$wwquestionRoot/moodle/lang/en_utf8/help/quiz/webwork.html " . $moodleRoot . '/lang/en_utf8/help/quiz/webwork.html'); + system($action . "$wwquestionRoot/moodle/lang/en_utf8/help/webwork " . $moodleRoot . '/lang/en_utf8/help/webwork'); + + +} + +1; |
From: Gavin L. v. a. <we...@ma...> - 2007-09-12 15:11:44
|
Log Message: ----------- Correct logic error for showing correct answers with respect to hiding scores et al. Modified Files: -------------- webwork2/lib/WeBWorK/ContentGenerator: Hardcopy.pm Revision Data ------------- Index: Hardcopy.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/ContentGenerator/Hardcopy.pm,v retrieving revision 1.96 retrieving revision 1.97 diff -Llib/WeBWorK/ContentGenerator/Hardcopy.pm -Llib/WeBWorK/ContentGenerator/Hardcopy.pm -u -r1.96 -r1.97 --- lib/WeBWorK/ContentGenerator/Hardcopy.pm +++ lib/WeBWorK/ContentGenerator/Hardcopy.pm @@ -227,11 +227,11 @@ } $canShowScore{"$uid!$sid"} = - ! ( defined( $userSet->hide_score ) && - ( $userSet ->hide_score eq 'Y' || + ( ! defined( $userSet->hide_score ) ) || + ( $userSet ->hide_score eq 'N' || ( $userSet->hide_score eq 'BeforeAnswerDate' && - time < $userSet->answer_date ) ) ); -# die("hide_score = ", $userSet->hide_score, "; canshow{$uid!$sid} = ", $canShowScore{"$uid!$sid"}, "\n"); + time >= $userSet->answer_date ) ); +# die("hide_score = ", $userSet->hide_score, "; canshow{$uid!$sid} = ", (($canShowScore{"$uid!$sid"})?"True":"False"), "\n"); } last if $validation_failed; |
From: Matt L. v. a. <we...@ma...> - 2007-09-12 00:00:26
|
Log Message: ----------- Base file for configuration Added Files: ----------- wwmoodle/wwquestion/bin/setup: config.php.base Revision Data ------------- --- /dev/null +++ wwquestion/bin/setup/config.php.base @@ -0,0 +1,13 @@ +<?php + +//Path to the WSDL file on the Webwork Server +define('WWQUESTION_WSDL','ENTER YOUR WSDL PATH HERE','WSDL Path Test'); + +//Leave the rest alone +define('WWQUESTION_PREFIX','/wwquestions'); +define('WWQUESTION_ROOTDIR','/' . SITEID . WWQUESTION_PREFIX); + +define('WWQUESTION_RESPONSE_TIMEOUT',120); + + +?> |
From: Matt L. v. a. <we...@ma...> - 2007-09-11 23:37:33
|
Log Message: ----------- Changing setup script to its own directory. Added Files: ----------- wwmoodle/wwquestion/bin/setup: setup.pl Removed Files: ------------- wwmoodle/wwquestion/bin: setup.pl Revision Data ------------- --- /dev/null +++ wwquestion/bin/setup/setup.pl @@ -0,0 +1,71 @@ +#!/usr/bin/env perl + +use CPAN; +use File::Which; die "You do not have File::Which installed.\n Run perl -MCPAN -e 'install File::Which' to install. Then rerun this." if $@; + +sub promptUser { + + #-------------------------------------------------------------------# + # two possible input arguments - $promptString, and $defaultValue # + # make the input arguments local variables. # + #-------------------------------------------------------------------# + + local($promptString,$defaultValue) = @_; + + #-------------------------------------------------------------------# + # if there is a default value, use the first print statement; if # + # no default is provided, print the second string. # + #-------------------------------------------------------------------# + + if ($defaultValue) { + print $promptString, "[", $defaultValue, "]: "; + } else { + print $promptString, ": "; + } + + $| = 1; # force a flush after our print + $_ = <STDIN>; # get the input from STDIN (presumably the keyboard) + + + #------------------------------------------------------------------# + # remove the newline character from the end of the input the user # + # gave us. # + #------------------------------------------------------------------# + + chomp; + + #-----------------------------------------------------------------# + # if we had a $default value, and the user gave us input, then # + # return the input; if we had a default, and they gave us no # + # no input, return the $defaultValue. # + # # + # if we did not have a default value, then just return whatever # + # the user gave us. if they just hit the <enter> key, # + # the calling routine will have to deal with that. # + #-----------------------------------------------------------------# + + if ("$defaultValue") { + return $_ ? $_ : $defaultValue; # return $_ if it has a value + } else { + return $_; + } +} + +print "###################################\n"; +print "#WeBWorK Question Type in Moodle #\n"; +print "###################################\n"; + +#Continue? +print "This script will setup the configuration of WeBWorK Question Server.\n"; +$continue = promptUser('Continue','y'); +if($continue ne "y") { + exit; +} + +print "Please enter the root directory where Moodle is installed. \n"; +print "Example: /var/www/moodle \n"; +$moodleRoot = promptUser(''); + +print "Please enter the WSDL Path given in the server setup. \n"; +print "Example: http://myserver/problemserver_files/WSDL.wsdl\n"; +$wsdlPath = promptUser(''); |
From: Matt L. v. a. <we...@ma...> - 2007-09-11 23:36:54
|
Update of /webwork/cvs/system/wwmoodle/wwquestion/bin/setup In directory devel.webwork.rochester.edu:/tmp/cvs-serv72683/setup Log Message: Directory /webwork/cvs/system/wwmoodle/wwquestion/bin/setup added to the repository |
From: Matt L. v. a. <we...@ma...> - 2007-09-11 23:16:11
|
Log Message: ----------- Removed Files: ------------- wwmoodle/wwquestion/lang/en_utf8/help/webwork: code.html codecheck.html codeheader.html fileheader.html seed.html trials.html webwork.html Revision Data ------------- --- wwquestion/lang/en_utf8/help/webwork/webwork.html +++ /dev/null @@ -1,4 +0,0 @@ -<p align="center"><b>WeBWorK</b></p> - -<p>TODO describe your question type and how to edit it here. This help file is -linked to from the top of the question editing form for you question type.</p> |