From: dpvc v. a. <we...@ma...> - 2008-01-25 23:46:02
|
Log Message: ----------- Add "disabled" previous and next buttons so that a student who clicks on the next button on the first problem and then clicks again (expecting another next) doesn't get "up" by accident. Modified Files: -------------- webwork2/lib/WeBWorK: ContentGenerator.pm webwork2/lib/WeBWorK/ContentGenerator: Problem.pm Revision Data ------------- Index: ContentGenerator.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/ContentGenerator.pm,v retrieving revision 1.192 retrieving revision 1.193 diff -Llib/WeBWorK/ContentGenerator.pm -Llib/WeBWorK/ContentGenerator.pm -u -r1.192 -r1.193 --- lib/WeBWorK/ContentGenerator.pm +++ lib/WeBWorK/ContentGenerator.pm @@ -549,7 +549,7 @@ # grab some interesting data from the request my $courseID = $urlpath->arg("courseID"); my $userID = $r->param('user'); - my $eUserID = $r->param("effectiveUser"); + my $eUserID = $r->param("effectiveUser"); my $setID = $urlpath->arg("setID"); my $problemID = $urlpath->arg("problemID"); @@ -1297,29 +1297,29 @@ my $r = $self->r; my $ce = $r->ce; my %args = %$args; - + my $auth = $self->url_authen_args; my $prefix = $ce->{webworkURLs}->{htdocs}."/images"; - + my @result; while (@links) { my $name = shift @links; my $url = shift @links; my $img = shift @links; my $html = - ($img && $args{style} eq "images") + ($img && $args{style} eq "images") ? CGI::img( - {src=>($prefix."/".$img.$args{imagesuffix}), + {src=>($prefix."/".$img.$args{imagesuffix}), border=>"", alt=>"$name"}) : $name; - unless($img && !$url) { +# unless($img && !$url) { ## these are now "disabled" versions in grey -- DPVC push @result, $url ? CGI::a({-href=>"$url?$auth$tail"}, $html) : $html; - } +# } } - + return join($args{separator}, @result) . "\n"; } @@ -1519,7 +1519,7 @@ sub hidden_authen_fields { my ($self) = @_; - return $self->hidden_fields("user", "effectiveUser", "key"); + return $self->hidden_fields("user", "effectiveUser", "key", "theme"); } =item hidden_proctor_authen_fields() @@ -1590,7 +1590,7 @@ sub url_authen_args { my ($self) = @_; - return $self->url_args("user", "effectiveUser", "key"); + return $self->url_args("user", "effectiveUser", "key", "theme"); } =item url_state_args() @@ -1728,6 +1728,7 @@ $params{user} = undef unless exists $params{user}; $params{effectiveUser} = undef unless exists $params{effectiveUser}; $params{key} = undef unless exists $params{key}; + $params{theme} = undef unless exists $params{theme}; } my $url; Index: Problem.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/ContentGenerator/Problem.pm,v retrieving revision 1.210 retrieving revision 1.211 diff -Llib/WeBWorK/ContentGenerator/Problem.pm -Llib/WeBWorK/ContentGenerator/Problem.pm -u -r1.210 -r1.211 --- lib/WeBWorK/ContentGenerator/Problem.pm +++ lib/WeBWorK/ContentGenerator/Problem.pm @@ -737,7 +737,7 @@ courseID => $courseID, setID => $setID, problemID => $prevID); push @links, "Previous Problem", $r->location . $prevPage->path, "navPrev"; } else { - push @links, "Previous Problem", "", "navPrev"; + push @links, "Previous Problem", "", "navPrevGrey"; } push @links, "Problem List", $r->location . $urlpath->parent->path, "navProbList"; @@ -747,7 +747,7 @@ courseID => $courseID, setID => $setID, problemID => $nextID); push @links, "Next Problem", $r->location . $nextPage->path, "navNext"; } else { - push @links, "Next Problem", "", "navNext"; + push @links, "Next Problem", "", "navNextGrey"; } my $tail = ""; |