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: dpvc v. a. <we...@ma...> - 2005-06-05 23:19:59
|
Log Message: ----------- Fix some incorrect calls when the promoting types to higher precedence object types. Modified Files: -------------- pg/lib: Value.pm pg/lib/Value: Complex.pm Formula.pm Revision Data ------------- Index: Value.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/Value.pm,v retrieving revision 1.36 retrieving revision 1.37 diff -Llib/Value.pm -Llib/Value.pm -u -r1.36 -r1.37 --- lib/Value.pm +++ lib/Value.pm @@ -443,7 +443,7 @@ # sub compare_string { my ($l,$r,$flag) = @_; - if ($l->promotePrecedence($r)) {return $r->compare($l,!$flag)} + if ($l->promotePrecedence($r)) {return $r->compare_string($l,!$flag)} $l = $l->stringify; $r = $r->stringify if Value::isValue($r); if ($flag) {my $tmp = $l; $l = $r; $r = $tmp} return $l cmp $r; Index: Complex.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/Value/Complex.pm,v retrieving revision 1.14 retrieving revision 1.15 diff -Llib/Value/Complex.pm -Llib/Value/Complex.pm -u -r1.14 -r1.15 --- lib/Value/Complex.pm +++ lib/Value/Complex.pm @@ -159,7 +159,7 @@ sub compare { my ($l,$r,$flag) = @_; - if ($l->promotePrecedence($r)) {return $r->power($l,!$flag)} + if ($l->promotePrecedence($r)) {return $r->compare($l,!$flag)} $r = promote($r); if ($flag) {my $tmp = $l; $l = $r; $r = $tmp} my ($a,$b) = (@{$l->data}); Index: Formula.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/Value/Formula.pm,v retrieving revision 1.25 retrieving revision 1.26 diff -Llib/Value/Formula.pm -Llib/Value/Formula.pm -u -r1.25 -r1.26 --- lib/Value/Formula.pm +++ lib/Value/Formula.pm @@ -45,6 +45,16 @@ sub blank {$pkg->SUPER::new('')} # +# with() changes tree element not formula itself +# (maybe the wrong choice?) +# +sub with { + my $self = shift; my %hash = @_; + foreach my $id (keys(%hash)) {$self->{tree}{$id} = $hash{$id}} + return $self; +} + +# # Get the type from the tree # sub typeRef {(shift)->{tree}->typeRef} @@ -106,7 +116,7 @@ # sub dot { my ($l,$r,$flag) = @_; - if ($l->promotePrecedence($r)) {return $r->compare($l,!$flag)} + if ($l->promotePrecedence($r)) {return $r->dot($l,!$flag)} return bop('.',@_) if $l->type eq 'Vector' && Value::isValue($r) && $r->type eq 'Vector'; Value::_dot(@_); @@ -139,7 +149,7 @@ # sub atan2 { my ($l,$r,$flag) = @_; - if ($l->promotePrecedence($r)) {return $r->compare($l,!$flag)} + if ($l->promotePrecedence($r)) {return $r->atan2($l,!$flag)} if ($flag) {my $tmp = $l; $l = $r; $r = $tmp} Parser::Function->call('atan2',$l,$r); } |
From: dpvc v. a. <we...@ma...> - 2005-06-05 23:10:33
|
Log Message: ----------- Fixed a bug with Matrix->perl() method that would cause an extra level of nesting in constant matrices. Modified Files: -------------- pg/lib: Value.pm Revision Data ------------- Index: Value.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/Value.pm,v retrieving revision 1.35 retrieving revision 1.36 diff -Llib/Value.pm -Llib/Value.pm -u -r1.35 -r1.36 --- lib/Value.pm +++ lib/Value.pm @@ -465,14 +465,16 @@ # sub perl { my $self = shift; my $parens = shift; my $matrix = shift; - my $class = $self->class; my $mtype = $class eq 'Matrix'; + my $class = $self->class; + my $mtype = $class eq 'Matrix'; $mtype = -1 if $mtype & !$matrix; my $perl; my @p = (); foreach my $x (@{$self->data}) { if (Value::isValue($x)) {push(@p,$x->perl(0,$mtype))} else {push(@p,$x)} } @p = ("'".$self->{open}."'",@p,"'".$self->{close}."'") if $class eq 'Interval'; if ($matrix) { - $perl = '['.join(',',@p).']'; + $perl = join(',',@p); + $perl = '['.$perl.']' if $mtype > 0; } else { $perl = $class.'('.join(',',@p).')'; $perl = '('.$perl.')' if $parens == 1; |
From: jj v. a. <we...@ma...> - 2005-06-05 20:27:27
|
Log Message: ----------- Fixed typo Modified Files: -------------- webwork-modperl/lib/WeBWorK/DB/Record: Password.pm Revision Data ------------- Index: Password.pm =================================================================== RCS file: /webwork/cvs/system/webwork-modperl/lib/WeBWorK/DB/Record/Password.pm,v retrieving revision 1.5 retrieving revision 1.6 diff -Llib/WeBWorK/DB/Record/Password.pm -Llib/WeBWorK/DB/Record/Password.pm -u -r1.5 -r1.6 --- lib/WeBWorK/DB/Record/Password.pm +++ lib/WeBWorK/DB/Record/Password.pm @@ -39,7 +39,7 @@ password )} -sub SQL_TYPE {qw( +sub SQL_TYPES {qw( BLOB TEXT )} |
From: dpvc v. a. <we...@ma...> - 2005-06-04 13:52:40
|
Log Message: ----------- Avoid possible infinite loop with length and typeref calls. Modified Files: -------------- pg/lib: Value.pm pg/lib/Value: Complex.pm Formula.pm List.pm Matrix.pm Point.pm Real.pm Union.pm Vector.pm Revision Data ------------- Index: Value.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/Value.pm,v retrieving revision 1.34 retrieving revision 1.35 diff -Llib/Value.pm -Llib/Value.pm -u -r1.34 -r1.35 --- lib/Value.pm +++ lib/Value.pm @@ -326,7 +326,7 @@ # sub value {return @{(shift)->{data}}} # the value of the object (as an array) sub data {return (shift)->{data}} # the reference to the value -sub length {return (shift)->typeRef->{length}} # the number of coordinates +sub length {return scalar(@{(shift)->{data}})} # the number of coordinates sub type {return (shift)->typeRef->{name}} # the object type sub entryType {return (shift)->typeRef->{entryType}} # the coordinate type # Index: Real.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/Value/Real.pm,v retrieving revision 1.14 retrieving revision 1.15 diff -Llib/Value/Real.pm -Llib/Value/Real.pm -u -r1.14 -r1.15 --- lib/Value/Real.pm +++ lib/Value/Real.pm @@ -72,6 +72,7 @@ # Return the real number type # sub typeRef {return $Value::Type{number}} +sub length {1} # # return the real number Index: Complex.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/Value/Complex.pm,v retrieving revision 1.13 retrieving revision 1.14 diff -Llib/Value/Complex.pm -Llib/Value/Complex.pm -u -r1.13 -r1.14 --- lib/Value/Complex.pm +++ lib/Value/Complex.pm @@ -73,6 +73,7 @@ # Return the complex type # sub typeRef {return $Value::Type{complex}} +sub length {2} sub isZero {shift eq "0"} sub isOne {shift eq "1"} Index: List.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/Value/List.pm,v retrieving revision 1.14 retrieving revision 1.15 diff -Llib/Value/List.pm -Llib/Value/List.pm -u -r1.14 -r1.15 --- lib/Value/List.pm +++ lib/Value/List.pm @@ -43,7 +43,6 @@ # # Return the proper data # -sub length {return scalar(@{shift->{data}})} sub typeRef { my $self = shift; return Value::Type($self->class, $self->length, Value::Type($self->{type},1)); Index: Union.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/Value/Union.pm,v retrieving revision 1.12 retrieving revision 1.13 diff -Llib/Value/Union.pm -Llib/Value/Union.pm -u -r1.12 -r1.13 --- lib/Value/Union.pm +++ lib/Value/Union.pm @@ -51,7 +51,6 @@ # # Return the appropriate data. # -sub length {return scalar(@{shift->{data}})} sub typeRef { my $self = shift; return Value::Type($self->class, $self->length, $self->data->[0]->typeRef); Index: Vector.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/Value/Vector.pm,v retrieving revision 1.15 retrieving revision 1.16 diff -Llib/Value/Vector.pm -Llib/Value/Vector.pm -u -r1.15 -r1.16 --- lib/Value/Vector.pm +++ lib/Value/Vector.pm @@ -57,11 +57,6 @@ } # -# The number of coordinates -# -sub length {return scalar(@{shift->{data}})} - -# # Try to promote arbitary data to a vector # sub promote { Index: Formula.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/Value/Formula.pm,v retrieving revision 1.24 retrieving revision 1.25 diff -Llib/Value/Formula.pm -Llib/Value/Formula.pm -u -r1.24 -r1.25 --- lib/Value/Formula.pm +++ lib/Value/Formula.pm @@ -48,6 +48,7 @@ # Get the type from the tree # sub typeRef {(shift)->{tree}->typeRef} +sub length {(shift)->{tree}->typeRef->{length}} sub isZero {(shift)->{tree}{isZero}} sub isOne {(shift)->{tree}{isOne}} Index: Matrix.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/Value/Matrix.pm,v retrieving revision 1.17 retrieving revision 1.18 diff -Llib/Value/Matrix.pm -Llib/Value/Matrix.pm -u -r1.17 -r1.18 --- lib/Value/Matrix.pm +++ lib/Value/Matrix.pm @@ -95,11 +95,6 @@ return @M; } # -# The number of rows in the matrix (for n x m) -# or the number of entries in a 1 x n matrix -# -sub length {return scalar(@{shift->{data}})} -# # Recursively get the dimensions of the matrix. # Returns (n) for a 1 x n, or (n,m) for an n x m, etc. # Index: Point.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/Value/Point.pm,v retrieving revision 1.13 retrieving revision 1.14 diff -Llib/Value/Point.pm -Llib/Value/Point.pm -u -r1.13 -r1.14 --- lib/Value/Point.pm +++ lib/Value/Point.pm @@ -58,11 +58,6 @@ } # -# The number of coordinates -# -sub length {return scalar(@{shift->{data}})} - -# # Try to promote arbitrary data to a point # sub promote { |
From: dpvc v. a. <we...@ma...> - 2005-06-04 13:52:01
|
Log Message: ----------- Remove unneeded comment. Modified Files: -------------- pg/lib/Value: Interval.pm Revision Data ------------- Index: Interval.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/Value/Interval.pm,v retrieving revision 1.17 retrieving revision 1.18 diff -Llib/Value/Interval.pm -Llib/Value/Interval.pm -u -r1.17 -r1.18 --- lib/Value/Interval.pm +++ lib/Value/Interval.pm @@ -84,7 +84,6 @@ ($a,$b) = Value::toFormula($formula,$a,$b); $formula->{tree} = $formula->{context}{parser}{List}->new($formula,[$a,$b],0, $formula->{context}{parens}{$open},$Value::Type{number},$open,$close); -# return $formula->eval if scalar(%{$formula->{variables}}) == 0; return $formula; } |
From: dpvc v. a. <we...@ma...> - 2005-06-03 22:05:19
|
Log Message: ----------- Added a ->with() method that lets you set fields of a Parser object as you create it. For example: $f = Formula("sqrt(x)")->with(limits=>[0,3]); or ANS(Formula("(x+1)/x")->with(checkUndefinedPoints=>1,test_at=>[[0]])->cmp); or ANS($f->with(test_points=>[[0],[1],[2]])->cmp); Modified Files: -------------- pg/lib: Value.pm Revision Data ------------- Index: Value.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/Value.pm,v retrieving revision 1.33 retrieving revision 1.34 diff -Llib/Value.pm -Llib/Value.pm -u -r1.33 -r1.34 --- lib/Value.pm +++ lib/Value.pm @@ -42,6 +42,8 @@ granularity => 1000, resolution => undef, max_adapt => 1E8, + checkUndefinedPoints => 0, + max_undefined => undef, }, ); @@ -289,6 +291,15 @@ } # +# Easy method for setting parameters of an object +# +sub with { + my $self = shift; my %hash = @_; + foreach my $id (keys(%hash)) {$self->{$id} = $hash{$id}} + return $self; +} + +# # Return a type structure for the item # (includes name, length of vectors, and so on) # |
From: dpvc v. a. <we...@ma...> - 2005-06-03 19:16:03
|
Log Message: ----------- Better control over number of points that can be undefined, and new ability to specify required test points plus additional random ones. (Previously, if you set the test points, no random points were generated.) For example: $f = Formula("(x^2-1)/(x-1)"); $f->{test_at} = [[1]]; # test at x=1 plus random points as opposed to $f->{test_points} = [[-1],[0],[1]]; which tests only the points x = -1, x = 0 and x = 1. Modified Files: -------------- pg/lib/Value: Formula.pm Revision Data ------------- Index: Formula.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/Value/Formula.pm,v retrieving revision 1.23 retrieving revision 1.24 diff -Llib/Value/Formula.pm -Llib/Value/Formula.pm -u -r1.23 -r1.24 --- lib/Value/Formula.pm +++ lib/Value/Formula.pm @@ -158,9 +158,9 @@ # Get the test points and evaluate the functions at those points # ## FIXME: Check given points for consistency - my $points = $l->{test_points} || $r->{test_points} || $l->createRandomPoints; - my $lvalues = $l->{test_values} || $l->createPointValues($points,1); - my $rvalues = $r->createPointValues($points,0,$l->{checkUndefinedPoints}); + my $points = $l->{test_points} || $l->createRandomPoints(undef,$l->{test_at}); + my $lvalues = $l->{test_values} || $l->createPointValues($points,1,1); + my $rvalues = $r->createPointValues($points,0,1,$l->{checkUndefinedPoints}); # # Note: $l is bigger if $r can't be evaluated at one of the points return 1 unless $rvalues; @@ -198,7 +198,7 @@ $cmp = $lvalues->[$i] <=> $rvalues->[$i]; return $cmp if $cmp; } - $l->{domainMismatch} = $domainError; + $l->{domainMismatch} = $domainError; # return this value } # @@ -207,7 +207,7 @@ sub createPointValues { my $self = shift; my $points = shift || $self->{test_points} || $self->createRandomPoints; - my $showError = shift; + my $showError = shift; my $cacheResults = shift; my @vars = $self->{context}->variables->variables; my @params = $self->{context}->variables->parameters; my @zeros = (0) x scalar(@params); @@ -223,8 +223,11 @@ } push @{$values}, (defined($v)? Value::makeValue($v): $UNDEF); } - $self->{test_points} = $points; - $self->{test_values} = $values; + if ($cacheResults) { + $self->{test_points} = $points; + $self->{test_values} = $values; + } + return $values; } # @@ -258,7 +261,7 @@ # sub createRandomPoints { my $self = shift; - my $num_points = @_[0]; + my ($num_points,$include) = @_; my $cacheResults = !defined($num_points); $num_points = int($self->getFlag('num_points',5)) unless defined($num_points); $num_points = 1 if $num_points < 1; @@ -271,10 +274,14 @@ my $seedRandom = $self->{context}->flag('random_seed')? 'PGseedRandom' : 'seedRandom'; my $getRandom = $self->{context}->flag('random_seed')? 'PGgetRandom' : 'getRandom'; my $checkUndef = scalar(@params) == 0 && $self->getFlag('checkUndefinedPoints',0); - my $maxUndef = $self->getFlag('max_undefined',$num_points); + my $max_undef = $self->getFlag('max_undefined',$num_points); $self->$seedRandom; my $points = []; my $values = []; my $num_undef = 0; + if ($include) { + push(@{$points},@{$include}); + push(@{$values},@{$self->createPointValues($include,1,$cacheResults,$self->{checkundefinedPoints})}); + } my (@P,@p,$v,$i); my $k = 0; while (scalar(@{$points}) < $num_points+$num_undef && $k < 10) { @P = (); $i = 0; @@ -284,7 +291,7 @@ } $v = eval {&$f(@P,@zeros)}; if (!defined($v)) { - if ($k == 0 && $checkUndef) { + if ($checkUndef && $num_undef < $max_undef) { push @{$points}, [@P]; push @{$values}, $UNDEF; $num_undef++; @@ -298,7 +305,7 @@ } Value::Error("Can't generate enough valid points for comparison") if $k; - return ($points,$values) if defined(@_[0]); + return ($points,$values) unless $cacheResults; $self->{test_values} = $values; $self->{test_points} = $points; } @@ -382,7 +389,7 @@ # Get coefficient matrix of adaptive parameters # and value vector for linear system # - my ($p,$v) = $l->createRandomPoints($d,1); + my ($p,$v) = $l->createRandomPoints($d); my @P = (0) x $d; my ($f,$F) = ($l->{f},$r->{f}); my @A = (); my @b = (); foreach my $i (0..$d-1) { |
From: dpvc v. a. <we...@ma...> - 2005-06-02 22:52:19
|
Log Message: ----------- Modified the Formula answer checker to allow checking of points where the functions are undefined (i.e., attempt to check that the domains agree). This can be enabled by setting the checkundefinedPoints flag in the Context(), or in the formula itself. Test points where the function is undefined will be retained and the student's answer will have to be undefined at the same points. If the points are selected at random, the points where the function is undefined are kept in addition to the ones where it is defined, so the required number of test points where the function IS defined will still need to be found. The number of undefined points can be up to the number of defined points. This number can be reduced by setting the max_undefined flag. If you want to guarantee that a specific undefined point be tested, you can provide that point using the test_points field of the formula. For example: Context()->flags->set(checkUndefinedPoints=>1); $f = Formula("(x^2-1)/(x-1)"); $f->{test_points} = [[-1],[0],[1],[2]]; ANS($f->cmp); will guarantee that the singularity at x=1 is tested, so the answer x+1 will not be marked as correct. If an answer matches at all the test points where the functions are both defined, but some of the undefind points differ between the two functions, the answer checker will generate an error message indicating that the domains of the functions don't agree. (This is ONLY generated with the functions match except for that.) This can be controlled by setting the showDomainErrors flag in the formula's cmp() call: ANS($f->cmp(showDomainErrors=>0)); The default is to show these errors. Modified Files: -------------- pg/lib/Value: Formula.pm AnswerChecker.pm Revision Data ------------- Index: AnswerChecker.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/Value/AnswerChecker.pm,v retrieving revision 1.43 retrieving revision 1.44 diff -Llib/Value/AnswerChecker.pm -Llib/Value/AnswerChecker.pm -u -r1.43 -r1.44 --- lib/Value/AnswerChecker.pm +++ lib/Value/AnswerChecker.pm @@ -748,19 +748,24 @@ return ( Value::Union::cmp_defaults($self,@_), typeMatch => Value::Formula->new("(1,2]"), + showDomainErrors => 1, ) if $self->type eq 'Union'; my $type = $self->type; $type = ($self->isComplex)? 'Complex': 'Real' if $type eq 'Number'; $type = 'Value::'.$type.'::'; - return (&{$type.'cmp_defaults'}($self,@_), upToConstant => 0) - if defined(%$type) && $self->type ne 'List'; + return ( + &{$type.'cmp_defaults'}($self,@_), + upToConstant => 0, + showDomainErrors => 1, + ) if defined(%$type) && $self->type ne 'List'; return ( Value::List::cmp_defaults($self,@_), removeParens => $self->{autoFormula}, typeMatch => Value::Formula->new(($self->createRandomPoints(1))[1]->[0]{data}[0]), + showDomainErrors => 1, ); } @@ -800,7 +805,8 @@ 'C0|' . $context->{_variables}->{pattern}; $context->update; $context->variables->add('C0' => 'Parameter'); my $f = Value::Formula->new('C0')+$self; - for ('limits','test_points','test_values','num_points','granularity','resolution') + for ('limits','test_points','test_values','num_points','granularity','resolution', + 'checkUndefinedPoints','max_undefined') {$f->{$_} = $self->{$_} if defined($self->{$_})} $cmp->ans_hash(correct_value => $f); Parser::Context->current(undef,$current); @@ -831,7 +837,12 @@ sub cmp_postprocess { my $self = shift; my $ans = shift; return unless $ans->{score} == 0 && !$ans->{isPreview}; - return if $ans->{ans_message} || !$ans->{showDimensionHints}; + return if $ans->{ans_message}; + if ($self->{domainMismatch} && $ans->{showDomainErrors}) { + $self->cmp_Error($ans,"The domain of your function doesn't match that of the correct answer"); + return; + } + return if !$ans->{showDimensionHints}; my $other = $ans->{student_value}; return if $ans->{ignoreStrings} && (!Value::isValue($other) || $other->type eq 'String'); return unless $other->type =~ m/^(Point|Vector|Matrix)$/; Index: Formula.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/Value/Formula.pm,v retrieving revision 1.22 retrieving revision 1.23 diff -Llib/Value/Formula.pm -Llib/Value/Formula.pm -u -r1.22 -r1.23 --- lib/Value/Formula.pm +++ lib/Value/Formula.pm @@ -5,6 +5,8 @@ package Value::Formula; my $pkg = 'Value::Formula'; +my $UNDEF = bless {}, "UNDEF"; + use strict; use vars qw(@ISA); @ISA = qw(Parser Value); @@ -158,7 +160,7 @@ ## FIXME: Check given points for consistency my $points = $l->{test_points} || $r->{test_points} || $l->createRandomPoints; my $lvalues = $l->{test_values} || $l->createPointValues($points,1); - my $rvalues = $r->createPointValues($points); + my $rvalues = $r->createPointValues($points,0,$l->{checkUndefinedPoints}); # # Note: $l is bigger if $r can't be evaluated at one of the points return 1 unless $rvalues; @@ -186,15 +188,17 @@ } # - # Look through the two lists to see if they are equal. + # Look through the two lists of values to see if they are equal. # If not, return the comparison of the first unequal value # (not good for < and >, but OK for ==). # + my $domainError = 0; foreach $i (0..scalar(@{$lvalues})-1) { + if (ref($lvalues->[$i]) eq 'UNDEF' ^ ref($rvalues->[$i]) eq 'UNDEF') {$domainError = 1; next} $cmp = $lvalues->[$i] <=> $rvalues->[$i]; return $cmp if $cmp; } - return 0; + $l->{domainMismatch} = $domainError; } # @@ -208,15 +212,16 @@ my @params = $self->{context}->variables->parameters; my @zeros = (0) x scalar(@params); my $f = $self->{f}; $f = $self->{f} = $self->perlFunction(undef,[@vars,@params]) unless $f; + my $checkUndef = scalar(@params) == 0 && (shift || $self->getFlag('checkUndefinedPoints',0)); my $values = []; my $v; foreach my $p (@{$points}) { $v = eval {&$f(@{$p},@zeros)}; - if (!defined($v)) { + if (!defined($v) && !$checkUndef) { return unless $showError; Value::Error("Can't evaluate formula on test point (".join(',',@{$p}).")"); } - push @{$values}, Value::makeValue($v); + push @{$values}, (defined($v)? Value::makeValue($v): $UNDEF); } $self->{test_points} = $points; $self->{test_values} = $values; @@ -265,18 +270,27 @@ my $f = $self->{f}; $f = $self->{f} = $self->perlFunction(undef,[@vars,@params]) unless $f; my $seedRandom = $self->{context}->flag('random_seed')? 'PGseedRandom' : 'seedRandom'; my $getRandom = $self->{context}->flag('random_seed')? 'PGgetRandom' : 'getRandom'; + my $checkUndef = scalar(@params) == 0 && $self->getFlag('checkUndefinedPoints',0); + my $maxUndef = $self->getFlag('max_undefined',$num_points); $self->$seedRandom; - my $points = []; my $values = []; + my $points = []; my $values = []; my $num_undef = 0; my (@P,@p,$v,$i); my $k = 0; - while (scalar(@{$points}) < $num_points && $k < 10) { + while (scalar(@{$points}) < $num_points+$num_undef && $k < 10) { @P = (); $i = 0; foreach my $limit (@limits) { @p = (); foreach my $I (@{$limit}) {push @p, $self->$getRandom(@{$I})} push @P, $make[$i++]->make(@p); } $v = eval {&$f(@P,@zeros)}; - if (!defined($v)) {$k++} else { + if (!defined($v)) { + if ($k == 0 && $checkUndef) { + push @{$points}, [@P]; + push @{$values}, $UNDEF; + $num_undef++; + } + $k++; + } else { push @{$points}, [@P]; push @{$values}, Value::makeValue($v); $k = 0; # reset count when we find a point |
From: dpvc v. a. <we...@ma...> - 2005-06-02 19:55:00
|
Log Message: ----------- Fixed an accidental hard-coded operation from always being "add" to being the correct operation when promoting the operations to an object of higher precedence. (But since formulas are normally the highest precedence, this will never have occurred.) Modified Files: -------------- pg/lib/Value: Formula.pm Revision Data ------------- Index: Formula.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/Value/Formula.pm,v retrieving revision 1.21 retrieving revision 1.22 diff -Llib/Value/Formula.pm -Llib/Value/Formula.pm -u -r1.21 -r1.22 --- lib/Value/Formula.pm +++ lib/Value/Formula.pm @@ -64,7 +64,8 @@ # sub bop { my ($bop,$l,$r,$flag) = @_; - if ($l->promotePrecedence($r)) {return $r->add($l,!$flag)} + my $call = $$Value::context->{method}{$bop}; + if ($l->promotePrecedence($r)) {return $r->$call($l,!$flag)} if ($flag) {my $tmp = $l; $l = $r; $r = $tmp} my $formula = $pkg->blank; my $parser = $formula->{context}{parser}; my $vars = {}; |
From: Arnie P. v. a. <we...@ma...> - 2005-06-02 18:24:48
|
Log Message: ----------- Make all sorts case insensitive Modified Files: -------------- webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor: StudentProgress.pm Revision Data ------------- Index: StudentProgress.pm =================================================================== RCS file: /webwork/cvs/system/webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor/StudentProgress.pm,v retrieving revision 1.14 retrieving revision 1.15 diff -Llib/WeBWorK/ContentGenerator/Instructor/StudentProgress.pm -Llib/WeBWorK/ContentGenerator/Instructor/StudentProgress.pm -u -r1.14 -r1.15 --- lib/WeBWorK/ContentGenerator/Instructor/StudentProgress.pm +++ lib/WeBWorK/ContentGenerator/Instructor/StudentProgress.pm @@ -291,9 +291,9 @@ return lc($a->{email_address}) cmp lc($b->{email_address}) if $sort_method_name eq 'email_address'; return $b->{score} <=> $a->{score} if $sort_method_name eq 'score'; return $b->{index} <=> $a->{index} if $sort_method_name eq 'index'; - return $a->{section} cmp $b->{section} if $sort_method_name eq 'section'; - return $a->{recitation} cmp $b->{recitation} if $sort_method_name eq 'recitation'; - return $a->{user_id} cmp $b->{user_id} if $sort_method_name eq 'user_id'; + return lc($a->{section}) cmp lc($b->{section}) if $sort_method_name eq 'section'; + return lc($a->{recitation}) cmp lc($b->{recitation}) if $sort_method_name eq 'recitation'; + return lc($a->{user_id}) cmp lc($b->{user_id}) if $sort_method_name eq 'user_id'; if ($sort_method_name =~/p(\d+)/) { my $left = $b->{problemData}->{$1} ||0; my $right = $a->{problemData}->{$1} ||0; @@ -412,7 +412,7 @@ $correct_answers_for_problem{$probID} = 0 unless defined($correct_answers_for_problem{$probID}); - my $probValue = $problemRecord->value; + my $probValue = $problemRecord->value; ## This doesn't work - Fix it # set default problem value here $probValue = 1 unless defined($probValue) and $probValue ne ""; # FIXME?? set defaults here? @@ -499,7 +499,7 @@ || lc($a->{first_name}) cmp lc($b->{first_name}) || - $a->{user_id} cmp $b->{user_id} + lc($a->{user_id}) cmp lc($b->{user_id}) } @augmentedUserRecords; @@ -532,7 +532,7 @@ defined($ternary_sort_method_name) ?", then by $display_sort_method_name{$ternary_sort_method_name}":'', defined($primary_sort_method_name) ?'.':'', ; - # calculate secondary and ternary sort methods parameters if appropiate + # calculate secondary and ternary sort methods parameters if appropriate my %past_sort_methods = (); %past_sort_methods = (secondary_sort => "$primary_sort_method_name",) if defined($primary_sort_method_name); %past_sort_methods = (%past_sort_methods, ternary_sort => "$secondary_sort_method_name",) if defined($secondary_sort_method_name); |
From: Mike G. v. a. <we...@ma...> - 2005-06-02 16:39:02
|
Log Message: ----------- Allows connection of WeBWorK with Moodle via SOAP. This feature is still under development. Modified Files: -------------- webwork-modperl/conf: webwork.apache-config.dist Revision Data ------------- Index: webwork.apache-config.dist =================================================================== RCS file: /webwork/cvs/system/webwork-modperl/conf/webwork.apache-config.dist,v retrieving revision 1.7 retrieving revision 1.8 diff -Lconf/webwork.apache-config.dist -Lconf/webwork.apache-config.dist -u -r1.7 -r1.8 --- conf/webwork.apache-config.dist +++ conf/webwork.apache-config.dist @@ -44,8 +44,14 @@ my $webwork_courses_dir = $ce->{webwork_courses_dir}; eval "use lib '$pg_dir/lib'"; die $@ if $@; -eval "use WebworkWebservice";die $@ if $@; #FIXME, is there another way to initialize this? +########################################## # allows Webservice access to WeBWorK +########################################## + +eval "use WebworkWebservice";die $@ if $@; #FIXME, is there another way to initialize this? +eval "use RQP"; die $@ if $@; + +########################################## $WeBWorK::SeedCE{webwork_dir} = $webwork_dir; @@ -105,6 +111,23 @@ Order Allow,Deny Allow from All </Location> + ########## RQP installation ########## + +#<Location /rqp> +# SetHandler perl-script +# PerlHandler Apache::SOAP +# PerlSetVar dispatch_to "RQP" +# PerlSetVar options "compress_threshold => 10000" +# Order Allow,Deny +# Allow from All +#</Location> + +<Location /rqp> + SetHandler perl-script + PerlHandler MySOAP + Order Allow,Deny + Allow from All +</Location> ########## SOAP installation ############ <Location /mod_soap> |
From: Arnie P. v. a. <we...@ma...> - 2005-06-02 15:20:45
|
Log Message: ----------- 1. Don't put any spaces before any numerical data in .csv output. Excel doesn't have a problem with this but other spreadsheets do according to Mike. 2. Keep backups of all totals files and never overwrite a backup. The File Manager can be used to delete any unwanted backups. Arnie Modified Files: -------------- webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor: Scoring.pm Revision Data ------------- Index: Scoring.pm =================================================================== RCS file: /webwork/cvs/system/webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor/Scoring.pm,v retrieving revision 1.42 retrieving revision 1.43 diff -Llib/WeBWorK/ContentGenerator/Instructor/Scoring.pm -Llib/WeBWorK/ContentGenerator/Instructor/Scoring.pm -u -r1.42 -r1.43 --- lib/WeBWorK/ContentGenerator/Instructor/Scoring.pm +++ lib/WeBWorK/ContentGenerator/Instructor/Scoring.pm @@ -465,8 +465,8 @@ $scoringData[6][$totalsColumn+1] = "index" ; } for (my $user = 0; $user < @sortedUserIDs; $user++) { - $scoringData[7+$user][$totalsColumn] = sprintf("%4.1f",$userStatusTotals{$user}); - $scoringData[7+$user][$totalsColumn+1] = sprintf("%4.0f",100*$userSuccessIndex{$user}) if $scoringItems->{successIndex}; + $scoringData[7+$user][$totalsColumn] = sprintf("%.1f",$userStatusTotals{$user}); + $scoringData[7+$user][$totalsColumn+1] = sprintf("%.0f",100*$userSuccessIndex{$user}) if $scoringItems->{successIndex}; } } $WeBWorK::timer->continue("End set $setID") if defined($WeBWorK::timer); @@ -502,8 +502,8 @@ $studentTotal += ($score =~/^\s*[\d\.]+\s*$/)? $score : 0; } - $scoringData[$i][0] =sprintf("%4.1f",$studentTotal); - $scoringData[$i][1] =($totalPoints) ?sprintf("%4.1f",100*$studentTotal/$totalPoints) : 0; + $scoringData[$i][0] =sprintf("%.1f",$studentTotal); + $scoringData[$i][1] =($totalPoints) ?sprintf("%.1f",100*$studentTotal/$totalPoints) : 0; } $scoringData[0] = ['','']; $scoringData[1] = ['summary', '%score']; @@ -595,6 +595,18 @@ } } + # Before writing a new totals file, we back up an existing totals file keeping any previous backups. + # We do not backup any other type of scoring files (e.g. ful or scr). + + if (($filename =~ m|(.*)/(.*_totals)\.csv$|) and (-e $filename)) { + my $scoringDir = $1; + my $short_filename = $2; + my $i=1; + while(-e "${scoringDir}/${short_filename}_bak$i.csv") {$i++;} #don't overwrite existing backups + my $bakFileName ="${scoringDir}/${short_filename}_bak$i.csv"; + rename $filename, $bakFileName or warn "Unable to rename $filename to $bakFileName"; + } + open my $fh, ">", $filename or warn "Unable to open $filename for writing"; foreach my $row (@csv) { my @rowPadded = (); |
From: Arnie P. v. a. <we...@ma...> - 2005-06-01 17:24:17
|
Log Message: ----------- Add the line Any changes made below will be reflected in the set for ALL students. to the top of the Hmwk Set Editor page Arnie Modified Files: -------------- webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor: ProblemSetList.pm Revision Data ------------- Index: ProblemSetList.pm =================================================================== RCS file: /webwork/cvs/system/webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor/ProblemSetList.pm,v retrieving revision 1.80 retrieving revision 1.81 diff -Llib/WeBWorK/ContentGenerator/Instructor/ProblemSetList.pm -Llib/WeBWorK/ContentGenerator/Instructor/ProblemSetList.pm -u -r1.80 -r1.81 --- lib/WeBWorK/ContentGenerator/Instructor/ProblemSetList.pm +++ lib/WeBWorK/ContentGenerator/Instructor/ProblemSetList.pm @@ -398,6 +398,8 @@ ########## print action forms + print CGI::p(CGI::b("Any changes made below will be reflected in the set for ALL students.")) if $editMode; + print CGI::start_table({}); print CGI::Tr({}, CGI::td({-colspan=>2}, "Select an action to perform:")); |
From: Arnie P. v. a. <we...@ma...> - 2005-06-01 15:07:10
|
Log Message: ----------- Sorting to three levels is obtained by clicking on headings. Arnie Modified Files: -------------- webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor: StudentProgress.pm Revision Data ------------- Index: StudentProgress.pm =================================================================== RCS file: /webwork/cvs/system/webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor/StudentProgress.pm,v retrieving revision 1.13 retrieving revision 1.14 diff -Llib/WeBWorK/ContentGenerator/Instructor/StudentProgress.pm -Llib/WeBWorK/ContentGenerator/Instructor/StudentProgress.pm -u -r1.13 -r1.14 --- lib/WeBWorK/ContentGenerator/Instructor/StudentProgress.pm +++ lib/WeBWorK/ContentGenerator/Instructor/StudentProgress.pm @@ -271,7 +271,10 @@ my $root = $ce->{webworkURLs}->{root}; my $setStatsPage = $urlpath->newFromModule($urlpath->module,courseID=>$courseName,statType=>'sets',setID=>$setName); - my $sort_method_name = $r->param('sort'); + my $primary_sort_method_name = $r->param('primary_sort'); + my $secondary_sort_method_name = $r->param('secondary_sort'); + my $ternary_sort_method_name = $r->param('ternary_sort'); + my @studentList = $db->listUsers; my @index_list = (); # list of all student index @@ -281,7 +284,7 @@ my %number_of_students_attempting_problem = (); # the number of students attempting this problem. my %correct_answers_for_problem = (); # the number of students correctly answering this problem (partial correctness allowed) my $sort_method = sub { - my ($a,$b) = @_; + my ($a,$b,$sort_method_name) = @_; return 0 unless defined($sort_method_name); return lc($a->{last_name}) cmp lc($b->{last_name}) if $sort_method_name eq 'last_name'; return lc($a->{first_name}) cmp lc($b->{first_name}) if $sort_method_name eq 'first_name'; @@ -486,8 +489,12 @@ $WeBWorK::timer->continue("end mainloop") if defined($WeBWorK::timer); @augmentedUserRecords = sort { - &$sort_method($a,$b) + &$sort_method($a,$b,$primary_sort_method_name) + || + &$sort_method($a,$b,$secondary_sort_method_name) || + &$sort_method($a,$b,$ternary_sort_method_name) + || lc($a->{last_name}) cmp lc($b->{last_name}) || lc($a->{first_name}) cmp lc($b->{first_name}) @@ -520,22 +527,34 @@ Click heading to sort table. ", CGI::br(), CGI::br(), - defined($sort_method_name) ?" Entries are sorted by $display_sort_method_name{$sort_method_name}.":"", + defined($primary_sort_method_name) ?" Entries are sorted by $display_sort_method_name{$primary_sort_method_name}":'', + defined($secondary_sort_method_name) ?", then by $display_sort_method_name{$secondary_sort_method_name}":'', + defined($ternary_sort_method_name) ?", then by $display_sort_method_name{$ternary_sort_method_name}":'', + defined($primary_sort_method_name) ?'.':'', + ; + # calculate secondary and ternary sort methods parameters if appropiate + my %past_sort_methods = (); + %past_sort_methods = (secondary_sort => "$primary_sort_method_name",) if defined($primary_sort_method_name); + %past_sort_methods = (%past_sort_methods, ternary_sort => "$secondary_sort_method_name",) if defined($secondary_sort_method_name); + + # continue with outputing of table + print CGI::start_table({-border=>5,style=>'font-size:smaller'}), CGI::Tr(CGI::td( {-align=>'left'}, - ['Name'.CGI::br().CGI::a({"href"=>$self->systemLink($setStatsPage,params=>{sort=>'first_name' })},'First'). - ' '.CGI::a({"href"=>$self->systemLink($setStatsPage,params=>{sort=>'last_name' })},'Last').CGI::br(). - CGI::a({"href"=>$self->systemLink($setStatsPage,params=>{sort=>'email_address' })},'Email'), - CGI::a({"href"=>$self->systemLink($setStatsPage,params=>{sort=>'score'})},'Score'), + ['Name'.CGI::br().CGI::a({"href"=>$self->systemLink($setStatsPage,params=>{primary_sort=>'first_name', %past_sort_methods})},'First'). + ' '.CGI::a({"href"=>$self->systemLink($setStatsPage,params=>{primary_sort=>'last_name', %past_sort_methods })},'Last').CGI::br(). + CGI::a({"href"=>$self->systemLink($setStatsPage,params=>{primary_sort=>'email_address', %past_sort_methods })},'Email'), + CGI::a({"href"=>$self->systemLink($setStatsPage,params=>{primary_sort=>'score', %past_sort_methods})},'Score'), 'Out'.CGI::br().'Of', - CGI::a({"href"=>$self->systemLink($setStatsPage,params=>{sort=>'index'})},'Ind'), + CGI::a({"href"=>$self->systemLink($setStatsPage,params=>{primary_sort=>'index', %past_sort_methods})},'Ind'), 'Problems'.CGI::br().$problem_header, - CGI::a({"href"=>$self->systemLink($setStatsPage,params=>{sort=>'section'})},'Section'), - CGI::a({"href"=>$self->systemLink($setStatsPage,params=>{sort=>'recitation'})},'Recitation'), - CGI::a({"href"=>$self->systemLink($setStatsPage,params=>{sort=>'user_id'})},'Login Name'), + CGI::a({"href"=>$self->systemLink($setStatsPage,params=>{primary_sort=>'section', %past_sort_methods})},'Section'), + CGI::a({"href"=>$self->systemLink($setStatsPage,params=>{primary_sort=>'recitation', %past_sort_methods})},'Recitation'), + CGI::a({"href"=>$self->systemLink($setStatsPage,params=>{primary_sort=>'user_id', %past_sort_methods})},'Login Name'), ]) - ); + ), + ; foreach my $rec (@augmentedUserRecords) { my $fullName = join("", $rec->{first_name}," ", $rec->{last_name}); @@ -555,10 +574,7 @@ } print CGI::end_table(); - - - return ""; } |
From: Sam H. v. a. <we...@ma...> - 2005-06-01 05:24:56
|
Log Message: ----------- test of logging Modified Files: -------------- CVSROOT: loginfo Revision Data ------------- Index: loginfo =================================================================== RCS file: /webwork/cvs/system/CVSROOT/loginfo,v retrieving revision 1.16 retrieving revision 1.17 diff -Lloginfo -Lloginfo -u -r1.16 -r1.17 --- loginfo +++ loginfo @@ -26,5 +26,3 @@ #DEFAULT (echo ""; id; echo %{sVv}; date; cat) >> $CVSROOT/CVSROOT/commitlog ALL /usr/local/bin/activitymail -cdpf %{sVv} -t "ope...@li..." -u "`/usr/local/bin/activitymail-from`" #ALL /usr/local/bin/activitymail -cdpf %{sVv} -t "ope...@li..." -u "we...@ma..." - -#test |
From: <we...@ma...> - 2005-06-01 05:24:42
|
Log Message: ----------- start using activitymail-from script again Modified Files: -------------- CVSROOT: loginfo Revision Data ------------- Index: loginfo =================================================================== RCS file: /webwork/cvs/system/CVSROOT/loginfo,v retrieving revision 1.15 retrieving revision 1.16 diff -Lloginfo -Lloginfo -u -r1.15 -r1.16 --- loginfo +++ loginfo @@ -24,7 +24,7 @@ #DEFAULT (echo ""; id; echo %s; date; cat) >> $CVSROOT/CVSROOT/commitlog # or #DEFAULT (echo ""; id; echo %{sVv}; date; cat) >> $CVSROOT/CVSROOT/commitlog -#ALL /usr/local/bin/activitymail -cdpf %{sVv} -t "ope...@li..." -u "`/usr/local/bin/activitymail-from`" -ALL /usr/local/bin/activitymail -cdpf %{sVv} -t "ope...@li..." -u "we...@ma..." +ALL /usr/local/bin/activitymail -cdpf %{sVv} -t "ope...@li..." -u "`/usr/local/bin/activitymail-from`" +#ALL /usr/local/bin/activitymail -cdpf %{sVv} -t "ope...@li..." -u "we...@ma..." #test |
From: <we...@ma...> - 2005-05-31 19:55:33
|
Log Message: ----------- Allow periods in set names. This has been tested for a while without ill effects. Such sets already exist - they can be created in the Library Browser, but when they were exported, they could not be re-imported. Modified Files: -------------- webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor: ProblemSetList.pm Revision Data ------------- Index: ProblemSetList.pm =================================================================== RCS file: /webwork/cvs/system/webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor/ProblemSetList.pm,v retrieving revision 1.79 retrieving revision 1.80 diff -Llib/WeBWorK/ContentGenerator/Instructor/ProblemSetList.pm -Llib/WeBWorK/ContentGenerator/Instructor/ProblemSetList.pm -u -r1.79 -r1.80 --- lib/WeBWorK/ContentGenerator/Instructor/ProblemSetList.pm +++ lib/WeBWorK/ContentGenerator/Instructor/ProblemSetList.pm @@ -82,7 +82,7 @@ use CGI qw(); use WeBWorK::Utils qw(readFile listFilesRecursive cryptPassword sortByName); -use constant HIDE_SETS_THRESHOLD => 50; +use constant HIDE_SETS_THRESHOLD => 500; use constant DEFAULT_PUBLISHED_STATE => 1; use constant ONE_WEEK => 60*60*24*7; @@ -1395,7 +1395,7 @@ my $setName = ''; - if ($fileName =~ m|^set([\w-]+)\.def$|) { + if ($fileName =~ m|^set([.\w-]+)\.def$|) { $setName = $1; } else { warn qq{The setDefinition file name must begin with <CODE>set</CODE>}, |
From: <we...@ma...> - 2005-05-31 16:56:06
|
Log Message: ----------- On web page, display a pretty sort_mthod_name. E.g. remove underscores. Arnie Modified Files: -------------- webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor: StudentProgress.pm Revision Data ------------- Index: StudentProgress.pm =================================================================== RCS file: /webwork/cvs/system/webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor/StudentProgress.pm,v retrieving revision 1.12 retrieving revision 1.13 diff -Llib/WeBWorK/ContentGenerator/Instructor/StudentProgress.pm -Llib/WeBWorK/ContentGenerator/Instructor/StudentProgress.pm -u -r1.12 -r1.13 --- lib/WeBWorK/ContentGenerator/Instructor/StudentProgress.pm +++ lib/WeBWorK/ContentGenerator/Instructor/StudentProgress.pm @@ -298,7 +298,16 @@ } }; - + my %display_sort_method_name = ( + last_name => 'last name', + first_name => 'first name', + email_address => 'email address', + score => 'score', + index => 'success indicator', + section => 'section', + recitation => 'recitation', + user_id => 'login name', + ); ############################################################### # Print tables ############################################################### @@ -511,7 +520,7 @@ Click heading to sort table. ", CGI::br(), CGI::br(), - defined($sort_method_name) ?" Entries are sorted by $sort_method_name":"", + defined($sort_method_name) ?" Entries are sorted by $display_sort_method_name{$sort_method_name}.":"", CGI::start_table({-border=>5,style=>'font-size:smaller'}), CGI::Tr(CGI::td( {-align=>'left'}, ['Name'.CGI::br().CGI::a({"href"=>$self->systemLink($setStatsPage,params=>{sort=>'first_name' })},'First'). |
From: <we...@ma...> - 2005-05-27 17:43:05
|
Log Message: ----------- pad entries with appended (rather than prepended) spaces so that sorting will work properly in Excel, etc. Arnie Modified Files: -------------- webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor: Scoring.pm Revision Data ------------- Index: Scoring.pm =================================================================== RCS file: /webwork/cvs/system/webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor/Scoring.pm,v retrieving revision 1.41 retrieving revision 1.42 diff -Llib/WeBWorK/ContentGenerator/Instructor/Scoring.pm -Llib/WeBWorK/ContentGenerator/Instructor/Scoring.pm -u -r1.41 -r1.42 --- lib/WeBWorK/ContentGenerator/Instructor/Scoring.pm +++ lib/WeBWorK/ContentGenerator/Instructor/Scoring.pm @@ -691,7 +691,8 @@ my ($self, $string, $padTo) = @_; $string = '' unless defined $string; my $spaces = $padTo - length $string; - return " "x$spaces.$string; +# return " "x$spaces.$string; + return $string." "x$spaces; } sub maxLength { |
From: <we...@ma...> - 2005-05-27 16:36:07
|
Log Message: ----------- The sorting order in scoring files is now never random. It is by last name, then first name, and then by user_id and is case insensitive. Before it was by last name only and case sensitive. Arnie Modified Files: -------------- webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor: Scoring.pm Revision Data ------------- Index: Scoring.pm =================================================================== RCS file: /webwork/cvs/system/webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor/Scoring.pm,v retrieving revision 1.40 retrieving revision 1.41 diff -Llib/WeBWorK/ContentGenerator/Instructor/Scoring.pm -Llib/WeBWorK/ContentGenerator/Instructor/Scoring.pm -u -r1.40 -r1.41 --- lib/WeBWorK/ContentGenerator/Instructor/Scoring.pm +++ lib/WeBWorK/ContentGenerator/Instructor/Scoring.pm @@ -64,7 +64,13 @@ next unless $User; $Users{$User->user_id} = $User; } - my @sortedUserIDs = sort { $Users{$a}->last_name cmp $Users{$b}->last_name } + my @sortedUserIDs = sort { + lc($Users{$a}->last_name) cmp lc($Users{$b}->last_name) + || + lc($Users{$a}->first_name) cmp lc($Users{$b}->first_name) + || + lc($Users{$a}->user_id) cmp lc($Users{$b}->user_id) + } keys %Users; #my @userInfo = (\%Users, \@sortedUserIDs); $WeBWorK::timer->continue("done pre-fetching users") if defined($WeBWorK::timer); |
From: <we...@ma...> - 2005-05-27 04:03:15
|
Log Message: ----------- changed a substitution call so that the directory path is recalculated every time listLib is called. Before the substitution pattern was calculated only when the child first started up and this caused bad problems if a new call to listLib had a different library than the one used when the child was initialized. -- Mike Modified Files: -------------- webwork2/lib/WebworkWebservice: LibraryActions.pm Revision Data ------------- Index: LibraryActions.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WebworkWebservice/LibraryActions.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -Llib/WebworkWebservice/LibraryActions.pm -Llib/WebworkWebservice/LibraryActions.pm -u -r1.3 -r1.4 --- lib/WebworkWebservice/LibraryActions.pm +++ lib/WebworkWebservice/LibraryActions.pm @@ -116,8 +116,7 @@ my $name = $File::Find::name; my @out=(); if ($name =~/\S/ ) { - $name =~ s|^$dirPath/*||o; # cut the first directory - # $name =~ s|^\w*\/||; # cut the set name + $name =~ s|^$dirPath/*||; # cut the first directory push(@outListLib, "$name") if $name =~/\.pg/; } |
From: <we...@ma...> - 2005-05-26 18:20:14
|
Log Message: ----------- Allow sorting by first name, last name, or email address. Also default sorting is by last name, then by first name, then by user_id where as before it was by last name only. Modified Files: -------------- webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor: StudentProgress.pm Revision Data ------------- Index: StudentProgress.pm =================================================================== RCS file: /webwork/cvs/system/webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor/StudentProgress.pm,v retrieving revision 1.11 retrieving revision 1.12 diff -Llib/WeBWorK/ContentGenerator/Instructor/StudentProgress.pm -Llib/WeBWorK/ContentGenerator/Instructor/StudentProgress.pm -u -r1.11 -r1.12 --- lib/WeBWorK/ContentGenerator/Instructor/StudentProgress.pm +++ lib/WeBWorK/ContentGenerator/Instructor/StudentProgress.pm @@ -283,6 +283,9 @@ my $sort_method = sub { my ($a,$b) = @_; return 0 unless defined($sort_method_name); + return lc($a->{last_name}) cmp lc($b->{last_name}) if $sort_method_name eq 'last_name'; + return lc($a->{first_name}) cmp lc($b->{first_name}) if $sort_method_name eq 'first_name'; + return lc($a->{email_address}) cmp lc($b->{email_address}) if $sort_method_name eq 'email_address'; return $b->{score} <=> $a->{score} if $sort_method_name eq 'score'; return $b->{index} <=> $a->{index} if $sort_method_name eq 'index'; return $a->{section} cmp $b->{section} if $sort_method_name eq 'section'; @@ -473,9 +476,16 @@ } $WeBWorK::timer->continue("end mainloop") if defined($WeBWorK::timer); - @augmentedUserRecords = sort { &$sort_method($a,$b) - || - lc($a->{last_name}) cmp lc($b->{last_name} ) } @augmentedUserRecords; + @augmentedUserRecords = sort { + &$sort_method($a,$b) + || + lc($a->{last_name}) cmp lc($b->{last_name}) + || + lc($a->{first_name}) cmp lc($b->{first_name}) + || + $a->{user_id} cmp $b->{user_id} + } + @augmentedUserRecords; # construct header @@ -497,22 +507,24 @@ 'or 0 if there are no attempts.' ), CGI::br(), - "Click on student's name to see the student's version of the problem set; + "Click on student's name to see the student's version of the problem set. Click heading to sort table. ", CGI::br(), CGI::br(), - defined($sort_method_name) ?" sort method is $sort_method_name":"", + defined($sort_method_name) ?" Entries are sorted by $sort_method_name":"", CGI::start_table({-border=>5,style=>'font-size:smaller'}), CGI::Tr(CGI::td( {-align=>'left'}, - [CGI::a({"href"=>$self->systemLink($setStatsPage,params=>{sort=>'name' })},'Name'), - CGI::a({"href"=>$self->systemLink($setStatsPage,params=>{sort=>'score'})},'Score'), - 'Out'.CGI::br().'Of', - CGI::a({"href"=>$self->systemLink($setStatsPage,params=>{sort=>'index'})},'Ind'), - 'Problems'.CGI::br().$problem_header, - CGI::a({"href"=>$self->systemLink($setStatsPage,params=>{sort=>'section'})},'Section'), - CGI::a({"href"=>$self->systemLink($setStatsPage,params=>{sort=>'recitation'})},'Recitation'), - CGI::a({"href"=>$self->systemLink($setStatsPage,params=>{sort=>'user_id'})},'Login Name'), - ]) + ['Name'.CGI::br().CGI::a({"href"=>$self->systemLink($setStatsPage,params=>{sort=>'first_name' })},'First'). + ' '.CGI::a({"href"=>$self->systemLink($setStatsPage,params=>{sort=>'last_name' })},'Last').CGI::br(). + CGI::a({"href"=>$self->systemLink($setStatsPage,params=>{sort=>'email_address' })},'Email'), + CGI::a({"href"=>$self->systemLink($setStatsPage,params=>{sort=>'score'})},'Score'), + 'Out'.CGI::br().'Of', + CGI::a({"href"=>$self->systemLink($setStatsPage,params=>{sort=>'index'})},'Ind'), + 'Problems'.CGI::br().$problem_header, + CGI::a({"href"=>$self->systemLink($setStatsPage,params=>{sort=>'section'})},'Section'), + CGI::a({"href"=>$self->systemLink($setStatsPage,params=>{sort=>'recitation'})},'Recitation'), + CGI::a({"href"=>$self->systemLink($setStatsPage,params=>{sort=>'user_id'})},'Login Name'), + ]) ); |
From: <we...@ma...> - 2005-05-26 18:15:04
|
Log Message: ----------- test of logging Modified Files: -------------- CVSROOT: loginfo Revision Data ------------- Index: loginfo =================================================================== RCS file: /webwork/cvs/system/CVSROOT/loginfo,v retrieving revision 1.14 retrieving revision 1.15 diff -Lloginfo -Lloginfo -u -r1.14 -r1.15 --- loginfo +++ loginfo @@ -27,3 +27,4 @@ #ALL /usr/local/bin/activitymail -cdpf %{sVv} -t "ope...@li..." -u "`/usr/local/bin/activitymail-from`" ALL /usr/local/bin/activitymail -cdpf %{sVv} -t "ope...@li..." -u "we...@ma..." +#test |
From: Sam H. <sh...@de...> - 2005-05-26 18:14:46
|
Log Message: ----------- We're waiting on Hoss to recover the /usr/local/bin/activitymail-from script from backup. In the mean time, I've set the from address to we...@ma..., which is allowed by SourceForge. Modified Files: -------------- CVSROOT: loginfo Revision Data ------------- Index: loginfo =================================================================== RCS file: /webwork/cvs/system/CVSROOT/loginfo,v retrieving revision 1.13 retrieving revision 1.14 diff -Lloginfo -Lloginfo -u -r1.13 -r1.14 --- loginfo +++ loginfo @@ -24,4 +24,6 @@ #DEFAULT (echo ""; id; echo %s; date; cat) >> $CVSROOT/CVSROOT/commitlog # or #DEFAULT (echo ""; id; echo %{sVv}; date; cat) >> $CVSROOT/CVSROOT/commitlog -ALL /usr/local/bin/activitymail -cdpf %{sVv} -t "ope...@li..." -u "`/usr/local/bin/activitymail-from`" +#ALL /usr/local/bin/activitymail -cdpf %{sVv} -t "ope...@li..." -u "`/usr/local/bin/activitymail-from`" +ALL /usr/local/bin/activitymail -cdpf %{sVv} -t "ope...@li..." -u "we...@ma..." + |
From: Arnie P. <ap...@de...> - 2005-05-26 15:14:16
|
Log Message: ----------- (1) problem numbers are left alligned (2) problem values are listed (3) no special message is given if problem value is 0 Modified Files: -------------- webwork-modperl/lib/WeBWorK/ContentGenerator: ProblemSet.pm Revision Data ------------- Index: ProblemSet.pm =================================================================== RCS file: /webwork/cvs/system/webwork-modperl/lib/WeBWorK/ContentGenerator/ProblemSet.pm,v retrieving revision 1.60 retrieving revision 1.61 diff -Llib/WeBWorK/ContentGenerator/ProblemSet.pm -Llib/WeBWorK/ContentGenerator/ProblemSet.pm -u -r1.60 -r1.61 --- lib/WeBWorK/ContentGenerator/ProblemSet.pm +++ lib/WeBWorK/ContentGenerator/ProblemSet.pm @@ -278,6 +278,7 @@ CGI::th("Name"), CGI::th("Attempts"), CGI::th("Remaining"), + CGI::th("Worth"), CGI::th("Status"), ); @@ -365,14 +366,17 @@ $status = 'unknown(FIXME)' if $@; # use a blank if problem status was not defined or not numeric. # FIXME -- this may not cover all cases. - my $msg = ($problem->value) ? "" : "(This problem will not count towards your grade.)"; +# my $msg = ($problem->value) ? "" : "(This problem will not count towards your grade.)"; - return CGI::Tr(CGI::td({-nowrap=>1, -align=>"center"}, [ - $interactive, - $attempts, - $remaining, - $status . " " . $msg, - ])); + return CGI::Tr( + CGI::td({-nowrap=>1, -align=>"left"},$interactive), + CGI::td({-nowrap=>1, -align=>"center"}, + [ + $attempts, + $remaining, + $problem->value, + $status, + ])); } 1; |