-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
59 lines (39 loc) · 1.78 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
INTRO
This script emulates the My.UCLA IEI url updater service. This is used to test
features that update the IEI urls, but don't want to actually call the real
service.
INSTALLATION
1. Please create the database and table specified in install.sql
2. Create a MySQL user account that can access and update the given table.
3. Copy the config.sample.php into config.php and fill in the values for the
MySQL user account.
4. Done. You might want to create an .htaccess file to ip-restrict access to
the script: http://www.udel.edu/topics/internet/WWW/restricting.html
5. If you want to test the script, please install PHPunit and run the test suite
http://www.phpunit.de/manual/3.7/en/installation.html
ex. pear config-set auto_discover 1
pear install --force --alldeps pear.phpunit.de/PHPUnit
USAGE
When someone is making an update the script expects the following GET parameters:
name - name of person making update
email - email of person making update
term - course term
srs - course srs
url - course url, expects no http:// or https://
Returns an html document with one of the following messages:
Status: Update Successful.
Status: Unable to Connect to SQL Servers!
Status: Unauthorized Access!
Status: Update Unsuccessful. SQL Update Failed.
Status: Update Unsuccessful. Invalid Course.
When someone wants to find the url for a given course the script expects the
following GET parameters:
term - course term
srs - course srs
Returns url back (will not have http:// or https://)
TESTING
There is a test_script.php provided that will attempt to try to do several
operations. To run the script, please execute it via the web browser. But be
sure to turn on the debugging variable in the test script.
CAVEATS
The SQL install file has only been tested to work for MySQL databases.