Speech:CreateWikiExperiment.pl

Summary
Title:

createWikiExperiment.pl

Author:

Morgan Gaythorpe

Location:

mnt/main/scripts/user/createWikiExperiment.pl

Usage:

Grabs the next available experiment number. A new wiki page is created for the experiment and a link to that page is added to the Speech:Exps list of experiments. There are a number of steps involved to make this script work. The script connects to the foss.unh.edu server and attempts to login with the given username and password. The scripts gets a login token and passes it back to the server to create a connection with the user logged in. The script then gets an edit token to allow the user to make changes to the wiki. Next the next free experiment number is received and stored. Afterwards the user enters the author's name and a brief description of the experiment they wish to create. The script then creates the new experiment entry on the Speech:Exps page. Finally the script creates the new experiment's own page with the information provided by the user. This script used the HTTP::Response, HTTP:Cookies, and LWP::UserAgent modules to function in addition to the information provided by the MediaWiki API

Notes:


 * The user's password is visible when he or she enters it in.


 * The Speech:Exps page must not close the last div tag on the current semester's section. The script appends any new experiments to the end of the page and closing the div tag will break the page's formatting. Removing the div tag on the last section does not prevent the section from collapsing or expanding and does not cause any known errors.