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 ################################################################################ 2 # WeBWorK mod_perl (c) 2000-2002 WeBWorK Project 3 # $Id$ 4 ################################################################################ 5 6 package WeBWorK::ContentGenerator::Instructor::Index; 7 use base qw(WeBWorK::ContentGenerator::Instructor); 8 9 =head1 NAME 10 11 WeBWorK::ContentGenerator::Instructor::Index - Menu interface to the Instructor pages 12 13 =cut 14 15 use strict; 16 use warnings; 17 use CGI qw(); 18 19 sub title { 20 my $self = shift; 21 return "Instructor tools for ".$self->{ce}->{courseName}; 22 } 23 24 sub body { 25 my $self = shift; 26 my $r = $self->{r}; 27 my $ce = $self->{ce}; 28 my $db = $self->{db}; 29 my $authz = $self->{authz}; 30 my $courseName = $ce->{courseName}; 31 my $authen_args = $self->url_authen_args(); 32 my $user = $r->param('user'); 33 my $prof_url = $ce->{webworkURLs}->{oldProf}; 34 my $full_url = "$prof_url?course=$courseName&$authen_args"; 35 my $userEditorURL = "users/?" . $self->url_args; 36 my $problemSetEditorURL = "sets/?" . $self->url_args; 37 38 return CGI::em("You are not authorized to access the Instructor tools.") unless $authz->hasPermissions($user, "access_instructor_tools"); 39 40 return 41 CGI::p("\n". 42 CGI::a({href=>$userEditorURL}, "Users"). " - View and edit data and settings for users of $courseName" . CGI::br(). "\n". 43 CGI::a({href=>$problemSetEditorURL}, "Problem Sets"). " - View and edit settings for problem sets in $courseName".CGI::br()."\n" 44 )."\n".CGI::hr()."\n". 45 CGI::p( 46 CGI::b("NOTE: ") . 47 "The Instructor Tools in this preview release of WeBWorK 48 2.0 are not stable or complete. If you need reliable and 49 stable course editing features, than at this time you 50 will need to use the Professor tools from WeBWorK 1.8 51 or earlier. Use the links below to go to the Professor 52 pages of your system's WeBWorK 1.x installation." 53 )."\n". 54 CGI::ul( 55 CGI::li( 56 CGI::a({-href=>$full_url}, "Go to Professor pages") 57 ). 58 CGI::li( 59 CGI::a({-href=>$full_url, -target=>"_new"}, "Open Professor pages in new window") 60 ) 61 ); 62 } 63 64 1; 65 66 __END__ 67 68 =head1 AUTHOR 69 70 Written by Dennis Lambe Jr., malsyned (at) math.rochester.edu 71 72 =cut
| aubreyja at gmail dot com | ViewVC Help |
| Powered by ViewVC 1.0.9 |