Forum archive 2000-2006

christelle scharff - webwork 2 - create and delete course

by Arnold Pizer -
Number of replies: 0
 webwork 2 - create and delete course topic started 12/31/2005; 3:32:51 PMlast post 1/3/2006; 3:41:21 PM
 christelle scharff - webwork 2 - create and delete course  12/31/2005; 3:32:51 PM (reads: 507, responses: 2) Hi, I am not sure where this error comes from and need your help... I created a course without admin. How can I add an admin to this course after it is created? I wanted then to delete this course but got the following error message: An error occured while deleting the course WeBWorK_Test_Course: sql_single: failed to execute SQL statement 'DROP TABLE WeBWorK_Test_Course_problem_user;': Unknown table 'WeBWorK_Test_Course_problem_user' DBD::mysql::db do failed: Unknown table 'WeBWorK_Test_Course_problem_user' at /opt/webwork/lib/WeBWorK/Utils/CourseManagement/sql_single.pm line 410. Thanks in advance, Christelle <| Post or View Comments |>

 Sam Hathaway - Re: webwork 2 - create and delete course  1/3/2006; 2:13:18 PM (reads: 650, responses: 0) Hi, I'm assuming that you created the course without adding/specifying instructors for it. In other words, if you were using the web interface, you didn't select the "Add WeBWorK administrators to new course" option or fill in the user information "To add an additional instructor to the new course", and if you were using the command-line utility, you didn't specify the --professors option. Is this correct? There is no easy way to add an instructor to a webwork course once it's been created except though the Classlist Editor, which requires instructor access. If you have expertise in editing MySQL databases directly, you could change the permission level of an existing user in the WeBWorK_Test_Course_permission table to 10. You can also just remove the course directory and database tables and try again. Drop the following database tables, if they exist: WeBWorK_Test_Course_userWeBWorK_Test_Course_passwordWeBWorK_Test_Course_permissionWeBWorK_Test_Course_keyWeBWorK_Test_Course_setWeBWorK_Test_Course_problemWeBWorK_Test_Course_set_userWeBWorK_Test_Course_problem_user Anyway... This looks like it could be a bug in WeBWorK, or at least a failure to deal with some kind of error condition, but I need more information from you to figure it out. What method did you use to create the course? Did you use the "Course Administration" web interface, or the addcourse command-line utility? When creating the course, did you select sql_single as the database layout, or some other layout? Did you get any errors or warnings while creating the course? Do any of the above-listed WeBWorK_Test_Course_ tables actually exist in your webwork database? Is the error replicable? If you create another course with no instructors, does the same thing happen? How about a course with instructors? It would also help if I could see a copy of your system's global.conf file and the course.conf file for WeBWorK_Test_Course. Thanks. -sam <| Post or View Comments |>

 Michael Gage - Re: webwork 2 - create and delete course  1/3/2006; 3:41:21 PM (reads: 623, responses: 0) It's also possible that the database for the course wasn't created, even though the directory for the course was created. That's not supposed to happen anymore, if one of these can't be created then the other is not supposed to be created either, but it's possible that we missed a case. Which version of the software are you using? Is it up-to-date with the CVS, say within a few months? With direct access to the server, there is another way to add an instructor that might be useful: I have a file, called addAdmin with the contents: ##################################$db->addUser($db->newUser(user_id=>"admin", first_name=>"Foo", last_name=>"Bar",email_address=>"bar\@my.univ.edu", student_id=>"admin", status=>"C",section=>"", recitation=>"",comment=>"administrator"));$db->addPassword($db->newPassword(user_id=>"admin",password=>crypt("foobar", "dc")));$db->addPermissionLevel($db->newPermissionLevel(user_id=>"admin",permission=>"10"));exit; ##################################### In .../webwork2/bin there is a script: wwshwhich brings up a shell for accessing the webwork database.I use the command:wwsh myCourse