NAME

addcourse - add a course

SYNOPSIS

 addcourse [options] COURSEID

DESCRIPTION

Add a course to the courses directory. The required directories will be created. Optionally, a database can be populated with users. Also, one or more users can be granted professor privileges.

OPTIONS

--db-layout=LAYOUT

The specified database layout will be used in place of the default specified in global.conf.

If --db-layout is set to gdbm, the following options are valid:

--global-user=USERID

Specifies that the user ID of the global user will be USERID, overriding the value set in database.conf. Applicable only to courses using the gdbm database layout.

If --db-layout is set to sql, the following options are valid:

--sql-host=HOST

Specifies the hostname of the SQL server on which to create the course database. If not specified, the default for your RDBMS will be used.

--sql-port=PORT

Specifies the port of the SQL server on which to create the course database. If not specified, the default for your RDBMS will be used.

--sql-user=USER

Specifies the username to use when connecting to the SQL server to create the course database. This user must have CREATE, DELETE, FILE, INSERT, SELECT, and UPDATE privileges, WITH GRANT OPTION.

--sql-pass=PASS

Specifies the password to use when connecting to the SQL server.

--sql-db=DBNAME

Specifies the name of the database to create. (This is usually ``webwork_COURSENAME'', but can be overridden by changing the database layout in global.conf.)

--sql-wwhost=WWHOST

Specifies the host from which the webwork database users will be allowed to connect. (if --sql-host is set to localhost, this should be set to localhost too.)

--users=FILE

The users listed in the comma-separated text file FILE will be added to the user list of the new course. The format of this file is the same as user lists exported from WeBWorK.

--professors=USERID[,USERID]...

Each USERID, if it is present in the new course's user list, will be granted professor privileges (i.e. a permission level of 10). Requires --users.

--templates-from=COURSEID

If specified, the contents of the specified course's templates directory are used to populate the new course's templates directory.

COURSEID

The name of the course to create.

AUTHOR

Written by Sam Hathaway, hathaway at users.sourceforge.net.