Open serveit-ca opened 5 years ago
@serveit-ca We should discuss about how to track this data, my best option for is it a cura_user_tracking table? where we have ID(PK), user_id, program_id, exercise_id, timestamp. ?
FINAL SCHEMA PROPOSAL:
dev_cura_user_tracking id(int 11) - PK; user_id (int 11) - FK; event_type(int 1) - 0 Login event, 1 Program View Event, 2 Exercise View Event, 3 Program View Event. program_id (int 11) - FK; exercise_id (int 11) - FK; timestamp (TIMESTAMP);
the database structure looks great!
CREATE TABLE dev_cura_user_tracking( id int(11) AUTO_INCREMENT, user_id int(11), event_type int(1), program_id int(11), exercise_id int(11), event_timestamp TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (id));
@serveit-ca For the Corp Account Field in the user metrics page, we can only currently see if the user belongs to a corp by checking their groups and then if their groups belong to a corp, which also runs into the really weird scenario where a user is in 2 corps? You had a solution via the API.
Everything is done for this task, we just need to figure out how to have these API's fire correctly on both the website and app.
Commented out testing function on line 803 of test-wp-program as for some reason the database is seeing duplicate primary key entries upon trying to log a user in multiple times, the code works just fine when ran locally, both this exact unit test, and for the metrics page.
hey @SideonDeaka what is left on this ticket other than the integration with the app and the website pages.
Can you please start to do the integration of the website side of the application.
The pages we need to update with the api calls will be as follows:
[ ] http://curastream.test/view-program/ - This should call the view program api function
[x] http://curastream.test/my-programs/ -> This should call the User Login API Function
[ ] @serveit-ca will need to do the JQuery Integration for the view Exericise item on the page http://curastream.test/view-program/
[ ] @serveit-ca will need to the view exercise libration integration with jQuery http://curastream.test/exercise-library/
[ ] @serveit-ca will need to do the view exercise integration for the Jquery for the app page http://curastream.test/exercise-library-app/
Create three API Endpoints which have the following capabilities
For each of these endpoints we want the following items to be recorded
User Reporting page We want a page created in the Curastream plugin which will display the end user activtity The following columns will be needed