I was trying to use wwsh and develop a script to add user and register the user for a particular course and set under the course.
Following is what my script is doing :
$db->addUser($db->newUser(
user_id=>"$uid", first_name=>"$first", last_name=>"$last",email_address=>"$eid", student_id=>"$sid", status=>"C",section=>"", recitation=>""));
$db->putPassword($db->newPassword(user_id=>"$uid",password=>crypt("myPassword", "liquid09")));
$db->putPermissionLevel($db->newPermissionLevel(user_id=>"$uid",permission=>"0"));
$db->addUserSet($db->newUserSet(user_id=>"$uid", set_id=>"$setid"));
but the last line apparently is assigning a set to the user but this doesn't seem to assign problems to the users and what I get in the logs is "there are no problems in the set" although there are problems and once I login to webwork and assign the courses manually through instructor tools it works fine.$db->putPassword($db->newPassword(user_id=>"$uid",password=>crypt("myPassword", "liquid09")));
$db->putPermissionLevel($db->newPermissionLevel(user_id=>"$uid",permission=>"0"));
$db->addUserSet($db->newUserSet(user_id=>"$uid", set_id=>"$setid"));
Can you help me with the code that I'm missing for assigning the problems in a set to the users?
Regards,
Rishi