| … | |
… | |
| 5 | ## newpassword.pl takes as arguments the course, loginname and newpassword |
5 | ## newpassword.pl takes as arguments the course, loginname and newpassword |
| 6 | ## e.g. newpassword.pl demoCourse dummy 000-00-0000 |
6 | ## e.g. newpassword.pl demoCourse dummy 000-00-0000 |
| 7 | |
7 | |
| 8 | ## NOTE: this should only be run by the professor |
8 | ## NOTE: this should only be run by the professor |
| 9 | |
9 | |
|
|
10 | BEGIN { |
|
|
11 | my $useLibDir = '.'; |
|
|
12 | if ($0 =~ m|^(/.*)/|) { $useLibDir = $1; } |
|
|
13 | elsif ($0 =~ m|^(\..*)/|) { $useLibDir = $1; } |
|
|
14 | elsif ($0 =~ m|^(.+)/|) { $useLibDir = "./$1"; } |
|
|
15 | unshift @INC, $useLibDir; |
|
|
16 | } |
|
|
17 | |
| 10 | use lib '.'; use webworkInit; # WeBWorKInitLine |
18 | use webworkInit; # WeBWorKInitLine |
| 11 | use Global; |
19 | use Global; |
| 12 | use Auth; |
20 | use Auth; |
| 13 | |
21 | |
| 14 | $course = $ARGV[0]; |
22 | $course = $ARGV[0]; |
| 15 | $login_name = $ARGV[1]; |
23 | $login_name = $ARGV[1]; |