[system] / trunk / webwork-modperl / bin / authedit Repository:
ViewVC logotype

Annotation of /trunk/webwork-modperl/bin/authedit

Parent Directory Parent Directory | Revision Log Revision Log


Revision 351 - (view) (download)

1 : sh002i 351 #!/usr/local/bin/perl
2 :    
3 :     ################################################################################
4 :     # WeBWorK mod_perl (c) 1995-2002 WeBWorK Team, Univeristy of Rochester
5 :     # $Id: authedit,v 1.1 2002-06-07 21:43:07 sh002i Exp $
6 :     ################################################################################
7 :    
8 :     use strict;
9 :     use warnings;
10 :     use Getopt::Std;
11 :     use WeBWorK::CourseEnvironment;
12 :     use WeBWorK::DB::Auth;
13 :    
14 :    
15 :     # -c course
16 :     # -u user
17 :    
18 :     # list
19 :     # add
20 :     # modify
21 :     # delete
22 :    
23 :     # -p password
24 :     # -m permission
25 :     # -k key
26 :    
27 :     our($opt_c, $opt_u);
28 :     getopt('c:u:');
29 :     my $task = shift @ARGV;
30 :     our($opt_p, $opt_m, $opt_k);
31 :     getopt('p:m:k:');
32 :    
33 :     my $courseEnv = WeBWorK::CourseEnvironment->new($ENV{WEBWORK_ROOT}, $opt_c);
34 :     my $db = WeBWorK::DB::Auth->new($courseEnv);
35 :    
36 :     if ($task eq 'list') {
37 :     foreach ($db->getUsers) {
38 :     print "$_:\t";
39 :     print $db->getPassword($_), "\t";
40 :     print $db->getPermissions($_), "\t";
41 :     print $db->getKey($_), "\n";
42 :     }
43 :     } elsif ($task eq 'add') {
44 :    
45 :     }
46 :    
47 :    
48 :    
49 :    
50 :    
51 :    
52 :    
53 :    
54 :    
55 :    
56 :    
57 :    
58 :    
59 :    
60 :    
61 :    
62 :    

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9