Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Problem

Students needed a way to download SPSS keys automatically ( by themselves ) through a system - website. Each and every student can have one key. 

Solution

We created 2 tables in the 'extras' database with the names spss_keys and spss_users_activate.

In the spss_keys we store all the SPSS keys and in the spss_users_activate all the users that got a key.


SQL of tables creation:

CREATE TABLE spss_keys (

id INT NOT NULL AUTO_INCREMENT,

spsskey VARCHAR(25),

userid VARCHAR(150),

last_activation DATETIME,

license_expiration_date DATETIME,

activated INT,

PRIMARY KEY (id)

);

CREATE TABLE spss_users_activate (

id INT NOT NULL AUTO_INCREMENT,

userid VARCHAR(20),

key_id int(10),

PRIMARY KEY (id)

);


In order to upload keys into the spss_keys you need to use the script located in https://courses.unic.ac.cy/pages/spss/add_keys.php 


Figure1: Add keys


You need to upload a csv file with all the keys along with the key expiration date and with a value of 0 meaning the key is not activated yet.


Figure2: CSV Example 1

Figure2.1: CSV Example 2





Things to consider



Notes

Database used: extras 

RDS cluser: vle-rds-cluster.cluster-cowwxdckesl7.eu-west-1.rds.amazonaws.com

Table names: spss_keys, spss_users_activate



  • No labels