The Software

https://groups.inf.ed.ac.uk/cos/licences/

AFS Location: /afs/inf.ed.ac.uk/group/cos/html/licences/

Authorised Users

The script is cosign protected and currently only accessible to a manually maintained list of users. Users that can view the site are listed in an array in functions.php under method can_view()

Users that can add/edit/delete a licence are listed in an array in functions.php under method is_admin()

Users must be in group sysmans or group licences.

Adding a Licence

Admin Users Only

Licence Batch should be of the form: 1/5 (where 5 is the number of licences available) or site

Our_id is automatically generated from the Publisher and Product fields.

Once you have entered the Purchase Order number the date field should be automatically filled by reading the Orders Database. Dates should be of the form: mm-dd-yyyy

Editing a Licence

Admin Users Only

The script allows for inline editing of a Licence. Once you search for a licence to change you can edit the row by double clicking in the field you wish to change. The field should now change to a textbox. Once you have made your changes you should press Enter to save the change. You will receive a popup informing you of whether the change was successful.

Deleting a Licence

Admin Users Only

If you press the delete button you will be presented with 3 options:

  • Delete Single Row - Removes the current row ONLY.
  • Delete ALL Rows for ID: id - Removes the current row and all rows with the same our_id (in other words: the entire batch for that particular licence)
  • Cancel - Self explanatory

Diagnosing Problems

I recommend you use FireBug to monitor POST/GET requests through it's console to spot any errors.

All errors should be viewable in full from the file: /afs/inf.ed.ac.uk/group/cos/html/licences/logs/licenceslog

This will list any SQL errors that have occurred and should mention a filename and error code (specific to that file). You should then locate that error code in the specified file and be able to find out what has gone wrong from the description. I suggest that the best method of finding errors is to be verbose with your variables e.g.:

$doSomething = doSomething($withArguments);

print $doSomething;

Database

The database is hosted on pgresearch under the name licences. Sheila has the password for it.

Table: software_file

Description: This table contains data relating to each licence

  • line_id - A unique integer identifier for each licence
  • publisher
  • product
  • version
  • licence_key
  • purchase_order
  • our_id
  • purchase_date

Table: batch

Description: This table contains data relating to each batch of a licence

  • batch_id - A unique integer identifier for each batch of a licence
  • line_id - Creates the relationship between software_file and batch
  • batch - The id of a batch (will be less than or equal to total_batch)
  • allocated
  • total_batch - The amount of licences purchased for this piece of software
  • notes

-- ScottBarr - 25 May 2011

Topic revision: r3 - 06 Nov 2017 - 12:15:29 - LindseyBrown
 
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
This Wiki uses Cookies