Parent Directory
|
Revision Log
Instructor pages now only let instructors view and edit the database. phew. NOTE that there are new directives in global.conf.dist. You won't be able to use the professor pages until you've made that change. Also, I added new template escapes and updated the barebones and ur templates. -Dennis
1 package WeBWorK::ContentGenerator::Instructor::UserList; 2 use base qw(WeBWorK::ContentGenerator::Instructor); 3 4 =head1 NAME 5 6 WeBWorK::ContentGenerator::Instructor::UserList - Entry point for User-specific data editing 7 8 =cut 9 10 use strict; 11 use warnings; 12 use CGI qw(); 13 14 sub initialize { 15 my ($self, $setID) = @_; 16 my $r = $self->{r}; 17 my $authz = $self->{authz}; 18 my $user = $r->param('user'); 19 20 unless ($authz->hasPermissions($user, "assign_problem_sets")) { 21 $self->{submitError} = "You are not authorized to assign problem sets"; 22 return; 23 } 24 25 if (defined $r->param('assignToAll')) { 26 $self->assignSetToAllUsers($setID); 27 } 28 } 29 30 sub body { 31 my ($self, $setID) = @_; 32 my $r = $self->{r}; 33 my $authz = $self->{authz}; 34 my $user = $r->param('user'); 35 36 return CGI::em("You are not authorized to access the Instructor tools.") unless $authz->hasPermissions($user, "access_instructor_tools"); 37 38 39 print CGI::start_form({method=>"post", action=>$r->uri}); 40 print $self->hidden_authen_fields; 41 print CGI::submit({name=>"assignToAll", value=>"Assign to All Users"}); 42 print CGI::end_form(); 43 44 return ""; 45 } 46 47 1;
| aubreyja at gmail dot com | ViewVC Help |
| Powered by ViewVC 1.0.9 |