Parent Directory
|
Revision Log
Changed the "probset editor" link to "probset list" -Dennis
1 package WeBWorK::ContentGenerator::Instructor; 2 use base qw(WeBWorK::ContentGenerator); 3 4 =head1 NAME 5 6 WeBWorK::ContentGenerator::Instructor - Abstract superclass for the Instructor pages 7 8 =cut 9 10 use strict; 11 use warnings; 12 use CGI qw(); 13 14 sub links { 15 my $self = shift; 16 17 # keep the links from the parent 18 my $pathString = ""; 19 20 21 my $ce = $self->{ce}; 22 my $db = $self->{db}; 23 my $userName = $self->{r}->param("user"); 24 my $courseName = $ce->{courseName}; 25 my $root = $ce->{webworkURLs}->{root}; 26 my $permLevel = $db->getPermissionLevel($userName)->permission(); 27 my $key = $db->getKey($userName)->key(); 28 return "" unless defined $key; 29 30 # new URLS 31 my $classList = "$root/$courseName/instructor/userList/?". $self->url_authen_args(); 32 my $addStudent = "$root/$courseName/instructor/addStudent/?". $self->url_authen_args(); 33 my $problemSetList = "$root/$courseName/instructor/problemSetList/?". $self->url_authen_args(); 34 35 if ($permLevel > 0 ) { 36 $pathString .="<hr>"; 37 $pathString .= CGI::a({-href=>$classList}, "Class editor") . CGI::br(); 38 $pathString .= ' '.CGI::a({-href=>$addStudent}, "Add Student") . CGI::br(); 39 $pathString .= CGI::a({-href=>$problemSetList}, "ProbSet list") . CGI::br(); 40 } 41 return $self->SUPER::links() . $pathString; 42 } 43 44 1;
| aubreyja at gmail dot com | ViewVC Help |
| Powered by ViewVC 1.0.9 |