Quiz Game Install Instructions - University of Wisconsin Oshkosh

Quiz Game Install Instructions
POLK LIBRARY - UNIVERSITY OF WISCONSIN OSHKOSH
Updated: Mar. 14, 2014
Source Code: http://www.uwosh.edu/library/anvil/download
Index







MySQL - INSTALL STEPS
LINUX SERVER - INSTALL STEPS
SETTING UP THE CONFIGURATION FILE
HOW TO RUN THE APPLICATION
MISCELLANOUS RECOMMENDATIONS
USING D2L
AFTER INSTALLATION
MySQL - INSTALL STEPS
Prerequisites

MySQL and PhpMyAdmin
Steps
1. Login to PhpMyAdmin interface.
2. Create a database called "quizsmith" or whatever you'd prefer to call it.
3. Go to the Import tab…
4. Import the "initial.sql" file from the quizsmith.tar.gz in the Install directory.
5. If successful, you will see the following structure…
LINUX SERVER - INSTALL STEPS
Prerequisites

Linux Environment
o Any SSL package installed
Steps
1. In the server environment, through command line, go to where you would like to install
QuizSmith.
Example Commands
$ cd /home/yourname
2. Download the QuizSmith tar.gz to the server. Once downloaded, unpack it.
Example Commands
$ wget http://www.uwosh.edu/library/quizsmith/download/quizsmith.tar.gz
$ tar -xvf quizsmith.tar.gz
3. Go into the quizsmith Install directory and run the python installer.
- This will install a standalone non-system python instance.
- This will take between 5-10 minutes.
Example Commands
$ cd quizsmith/Install
$ sh installer.sh
SETTING UP THE CONFIGURATION FILE
1. On the linux server, in the "quizsmith" folder, you will see “production.ini”. You will have to
make configuration changes.
allow_local_registration = True (Default)
Options = True | False
This is enables local user registration. When enabled users can create new accounts.
virtual_path_ext = *empty* (Default)
Format = /path/to/extend/to
This extends the virtual path of the application to help map it correctly to any server url rewrite.
Depending on the server setup, you may need this.
fanstatic.base_url = *empty* (Default)
Format = https://www.campus.edu/to/root/of/game
This must be the absolute path to the root of the game. Helps map it correctly to any server url
rewrite. Depending on the server setup, you may need this.
sqlalchemy.url = mysql+pymysql://username:password@localhost:3306/quizgame (Default)
username = database username
password = database password
localhost = database url
3306 = database port
quizgame = database name
Replace the following sections with your database credentials.
d2l_on = False (Default)
Options = True | False
This is enables d2l package. D2L authentication will be enabled. If disabled, none of the d2l
settings are required.
d2l_append_email_address = @campus.edu (Default)
Format = *empty* or an email extension
D2L doesn’t always include the proper email extension for users.
d2l_domain = your.campus.edu (Default)
Format = *empty* or the root url of your D2L instance
This should point to the root of D2L instance.
d2l_version = 10.0 (Default)
Format = Number
The D2L API requires the version your D2L instance is running.
d2l_api_version = 1.0 (Default)
Format = Number
What version of the D2L API to use.
d2l_app_id = *empty* (Default)
You will need to contact D2L to get your API ID
d2l_app_key = *empth* (Default)
You will need to contact D2L to get your API Key
mail.host = out.mail.campus.edu (Default)
Your organizations mailer address. This allows emails to be sent.
mail.port = 25 (Default)
Your organizations mailer. This allows emails to be sent.
safe_uploads_ext = .pt,.html,.css,.js,.png,.jpg,.gif,.txt,.htaccess,.htc,.tff,.otf (Default)
List of allowed file types to be allowed in the theming.
host = 0.0.0.0 (Default)
IP of application. Recommended to keep at 0.0.0.0. This will listen on all interfaces.
port = 8080 (Default)
The port this application will run under.
url_scheme = https (Default)
Option = https | http
We highly recommend using https and setting up server restrictions to only run under https.
[handler_filelog] args = ('/home/yourname/quizsmith/event.log','a') (Default)
Make sure to change the path to point to your log file.
HOW TO RUN THE APPLICATION
1. To start the application, run the following command from the root of the application.
- The application will start “silently” in the background, there will be NO OUPUT.
- A lock.pid file will be created
- Look at the event.log file to see the startup information
Example Commands
$ sh startup.sh
2. To shutdown application run the following command from the root of the application.
- The lock.pid will be destroyed
- Look at the event.log file to see the shutdown information
Example Commands
$ sh shutdown.sh
3. Stopping a runaway startup? Go to the root of your application and kill the process.
Example Commands
$ ps aux | grep “pserve”
Outputs> yourname 1319 8.0 7.1 76940 36132 pts/0 Sl …. (more data)
$ kill -9 1319
$ rm lock.pid
MISCELLANOUS RECOMMENDATIONS
Nightly/Weekly application restarts.
1. We recommend this application be restarted at least once a week. To do this, create a cronjob.
Example Commands (This will restart the application at 6am each morning)
$ cronjob -e
> 0 6 * * * sh /home/yourname/quizsmith/shutdown.sh
> 1 6 * * * sh /home/yourname/quizsmith/startup.sh
HTTPS - Enforcing Secure Layer
1. We recommend enforcing HTTPS always especially if you are using this for student assessment
or grading. This can be done through apache rules. We recommend asking your server admin
to create a rule that will enforce all http connections to https.
Using D2L
D2l is disabled by default. If you wish to use the D2L module, you will need to do the following steps.
1. Contact D2L and request an API Key and ID. Here are the instructions on how to go about
getting your API account http://docs.valence.desire2learn.com/basic/firstlist.html#id1
2. When you receive your D2L keys, add them to the D2L section of the configure file.
AFTER INSTALLATION
Server Rewrite
1. One server rewrite rule will have to be setup by your server admin to point from a URL
to the application at localhost:port
i. QuizSmith will run at localhost:port on the server. The rewrite will connect
http://www.yourdomain.com/path/game to the running localhost server.
QuizSmith Default Login
User: [email protected]
Pass: admin123
Import Game Modules
1. Download any game content module you’d like to add to your application from the Polk
Library website.
2. In the “Manage Trivia Content” section of QuizSmith, go to Categories.
3. Click the “Import Category” button and upload a pre-made module.
Exporting Game Modules
1. In the “Manage Trivia Content” section of QuizSmith, go to Categories.
2. Go into the category you wish to export.
3. Click the “Export” button.