I did not realize that when a person's classlist information is edited via the Classlist Editor that the permission level is reset to "Guest" by default. I am now locked out of my course and need to change my permission level back to "professor". I remember a discussion on this a number of years ago where Mike Gage had a file called "addAdmin" which could be used with "wwsh" to add an instructor to a course after it was created. I found Mike's code in the Archive, but I can't make it work. I'm guessing the newer version of WeBWorK is the reason for that. I have an up-to-date (as of August 2010) version of WeBWorK. I could try changing the database directly, but I'm hoping there is a way to do this without having to resort to messing with the database. Here is the code I am using for addAdmin.pl. This file is in the courses directory where I have been attempting to run the command: wwsh myCourse <addAdmin
(I have replaced "myCourse" with the name of the course I'm trying to get back into.)
Thanks -- rac
---------------------------addAdmin.pl---------------------------------------------
$db->addUser($db->newUser(user_id=>"admin_rc", first_name=>"Foo",
last_name=>"Bar",email_address=>"bar\@my.univ.edu",
student_id=>"admin_rc", status=>"C",section=>"",
recitation=>"",comment=>"administrator"));
$db->addPassword($db->newPassword(user_id=>"admin_rc",
password=>crypt("foobar", "dc")));
$db->addPermissionLevel($db->newPermissionLevel(user_id=>"admin_rc",
permission=>"10"));
exit;