WeBWorK Main Forum

add admin via wwsh

add admin via wwsh

by Tim Alderson -
Number of replies: 2

WW2.16 on Ubuntu 20.04.

I am trying to create an admin level user within an existing course. From the help I read it would seem that wwsh is the way to go.

When I invoke ./addadmin I do not seem to get any errors (see below), but afterwards there is still no admin account on the class list. [Also tried following up with ./putadmin].

Any help appreciated.

@webwork:$ wwsh Coursename ./addadmin
wwsh - The WeBWorK Shell
Available objects: $ce (WeBWorK::CourseEnvironment)
                   $db (WeBWorK::DB)
Available modules: Data::Dumper
courseID: Coursename and scriptFile:  ./addadmin
--------------------------------
--------------------------------
done

 



In reply to Tim Alderson

Re: add admin via wwsh

by Glenn Rice -

Make sure that you give the full path to the addadmin file, or give its path relative to the directory that you are running the script from.  So if you are in your home directory then you could run "wwsh Coursename /opt/webwork/webwork2/bin/addadmin".

With the next release of webwork the wwsh script will be a little more informative as to how the scriptFile argument is to be used.  If the script can not find the given file, then it will tell you so instead of just acting like it succeeded and giving no real information.