From: Mike G. v. a. <we...@ma...> - 2005-12-26 22:06:28
|
Log Message: ----------- The major change is to replace Sets assigned to user by UserDetail.pm. (Originally written by Rob Van Dam and completed by Mike Gage.) It has undergone a significant amount of testing, but has not yet been used in a course. We can back out of these changes before creating a release if problems are found. Modified Files: -------------- webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor: Index.pm ProblemSetDetail.pm UserList.pm Revision Data ------------- Index: ProblemSetDetail.pm =================================================================== RCS file: /webwork/cvs/system/webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail.pm,v retrieving revision 1.30 retrieving revision 1.31 diff -Llib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail.pm -Llib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail.pm -u -r1.30 -r1.31 --- lib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail.pm +++ lib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail.pm @@ -1062,12 +1062,12 @@ courseID => $courseID, setID => $setID)); my $editSetsAssignedToUserURL = $self->systemLink( $urlpath->newFromModule( - "WeBWorK::ContentGenerator::Instructor::SetsAssignedToUser", + "WeBWorK::ContentGenerator::Instructor::UserDetail", courseID => $courseID, userID => $editForUser[0])) if $forOneUser; my $setDetailPage = $urlpath -> newFromModule($urlpath->module, courseID => $courseID, setID => $setID); - my $setDetailURL = $self->systemLink($setDetailPage,authen=>0); + my $setDetailURL = $self->systemLink($setDetailPage); my $userCountMessage = CGI::a({href=>$editUsersAssignedToSetURL}, $self->userCountMessage($setUserCount, $userCount)); @@ -1083,10 +1083,10 @@ my @userLinks = (); foreach my $userID (@editForUser) { my $u = $db->getUser($userID); - my $line = $u->last_name.", ".$u->first_name." ".$u->user_id." "; + my $line = $u->last_name.", ".$u->first_name." (".$u->user_id."). Assigned to "; my $editSetsAssignedToUserURL = $self->systemLink( $urlpath->newFromModule( - "WeBWorK::ContentGenerator::Instructor::SetsAssignedToUser", + "WeBWorK::ContentGenerator::Instructor::UserDetail", courseID => $courseID, userID => $u->user_id)); $line .= CGI::a({href=>$editSetsAssignedToUserURL}, $self->setCountMessage($db->countUserSets($u->user_id), $setCount)); Index: UserList.pm =================================================================== RCS file: /webwork/cvs/system/webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor/UserList.pm,v retrieving revision 1.74 retrieving revision 1.75 diff -Llib/WeBWorK/ContentGenerator/Instructor/UserList.pm -Llib/WeBWorK/ContentGenerator/Instructor/UserList.pm -u -r1.74 -r1.75 --- lib/WeBWorK/ContentGenerator/Instructor/UserList.pm +++ lib/WeBWorK/ContentGenerator/Instructor/UserList.pm @@ -549,7 +549,11 @@ print CGI::p("Showing ", scalar @Users, " out of ", scalar @allUserIDs, " users."); print CGI::p("If a password field is left blank, the student's current password will be maintained.") if $passwordMode; - + if ($editMode) { + + + print CGI::p('<b>Click</b> on the login name to <b>edit individual problem set data</b>, (e.g. due dates) for these students.'); + } $self->printTableHTML(\@Users, \@PermissionLevels, \%prettyFieldNames, editMode => $editMode, passwordMode => $passwordMode, @@ -1497,7 +1501,7 @@ params => {effectiveUser => $User->user_id} ); - my $setsAssignedToUserURL = $self->systemLink($urlpath->new(type=>'instructor_sets_assigned_to_user', + my $setsAssignedToUserURL = $self->systemLink($urlpath->new(type=>'instructor_user_detail', args=>{courseID => $courseName, userID => $User->user_id }), @@ -1556,9 +1560,20 @@ } } # User ID (edit mode) or Assigned Sets (otherwise) - if ($editMode or $passwordMode) { + if ( $passwordMode) { # straight user ID push @tableCells, CGI::div({class=>$statusClass}, $User->user_id); + } elsif ($editMode) { + # straight user ID + my $userDetailPage = $urlpath->new(type =>'instructor_user_detail', + args =>{ + courseID => $courseName, + userID => $User->user_id, #FIXME eventually this should be a list?? + } + ); + my $userDetailUrl = $self->systemLink($userDetailPage,params =>{}); + push @tableCells, CGI::a({href=>$userDetailUrl}, $User->user_id); + } else { # "edit sets assigned to user" link #push @tableCells, CGI::a({href=>$setsAssignedToUserURL}, "Edit sets"); Index: Index.pm =================================================================== RCS file: /webwork/cvs/system/webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor/Index.pm,v retrieving revision 1.50 retrieving revision 1.51 diff -Llib/WeBWorK/ContentGenerator/Instructor/Index.pm -Llib/WeBWorK/ContentGenerator/Instructor/Index.pm -u -r1.50 -r1.51 --- lib/WeBWorK/ContentGenerator/Instructor/Index.pm +++ lib/WeBWorK/ContentGenerator/Instructor/Index.pm @@ -80,7 +80,7 @@ defined param $r "sets_assigned_to_user" and do { if ($nusers == 1) { - $module = "${ipfx}::SetsAssignedToUser"; + $module = "${ipfx}::UserDetail"; $args{userID} = $firstUserID; $params{fromTools} = 1; } else { @@ -363,11 +363,11 @@ ), CGI::Tr({class=>"ButtonRow"}, [ CGI::td([ - CGI::submit("sets_assigned_to_user", "View/edit")." all sets for one <b>user</b>", + CGI::submit("sets_assigned_to_user", "View/edit")." all sets for one <b>user</b>(set dates, scores)", CGI::submit("users_assigned_to_set", "View/edit")." all users for one <b>set</b>", ]), CGI::td([ - CGI::submit("edit_users", "Edit"). " selected <b>users</b>", + CGI::submit("edit_users", "Edit"). " class list data for selected <b>users</b>", CGI::submit("edit_sets", "Edit"). " one <b>set</b>" . " ". "or ".CGI::submit("prob_lib","add problems")." to one <b>set</b>", ]), |