Wednesday, December 26, 2018

(12-26) More PHP

This week, I successfully parsed the game server's data with PHP. Additionally, I did so using classes and other various OOP methods. The cards are now displayed as "cards" on my site.

I tried to embed the ERIC API into my site, but it was just too difficult to do on my own. I did not exactly know what files to call in what order, and there are about twenty of them, all doing things I'm not too familiar with (such as making ad editing a database, exchanging encryption/decryption keys, etc.).

I plan on spending the next week talking to the developer of the API and embedding it in my site. I also plan on finalizing the database, learning how to read and edit this database from PHP, finalizing the card display (more than one of the same card show a stack design, rather than two whole cards), and splitting my site into two parts - one part for the teacher, and one for the student.

Tuesday, December 18, 2018

(12-18) Databases and the ERIC API

This week, I began reading documentation on the ERIC API. ERIC stands for Educational Resource Information Communication, and it's purpose is to integrate two separate systems while allowing both systems to operate independently. To the best of my understanding, it's a replacement for the OAuth authentication system, for OAuth struggles when dealing with two apps with different authorization processes. The ERIC API has a pretty straightforward method of authenticating programs.
  1. The requesting site converts the student's login into a UUID.
  2. The student gets redirected to the eric module on the site being requested.
  3. The student logs into that site and grants the requesting site permissions in the ERIC module.
  4. The ERIC API randomly generates a code that is sent back to the requesting site, and a connection is made.
In the future, I will need to look through the source code of the ERIC API and find out how I can make it work with Canvas, for it was developed to be a plugin for Moodle.

Additionally, I have begun learning about databases. for in order to have our achievements work the way we want them to, we need to have a database with three separate tables. Table one will have a list of all the achievements, table two will have a list of all the users, and table 3 will have a list of achievements earned by users, sorted by some kind of UUID we will either develop on our own, or grab from the ERIC API. I have decided to use MySQL 5.7, so I have been reading up on the documentation and installing it on my server.

This next week, I will develop the achievement database, and begin implementing the ERIC API into our system.

Sunday, December 9, 2018

(12-9) Goals for Winter Break

I was not able to work too much on the project this week due to finals. When I can, I will continue reading on the Eric API, and continue where I left off next week when I am finished with school.

I will continue to work on this project full time during winter break. My goal is to have a complete, finished site before I submit my midterm CREU assignment. This site will be able to successfully pull, and accurately display, data from the other servers.

Additionally, I will begin development of the achievement database that will store each user's progress. I currently have no experience with databases, so it will be a learning experience.

To do so, however, I will need to fully implement the Eric API. This will be another goal to achieve over winter break.

Lastly, I would like to actually use data from Canvas to display "progress" a player has toward earning a new card.

Tuesday, December 4, 2018

(12-4) Achievements

This week, I embedded my site into the my canvas page, and I'm currently laying out all of the achievements I want to incorporate into the site. By determining what achievements I want, we'll know what information from the game server I will need to be provided.

Next week, I'll read further into the API we will use to link logins from canvas, to the game server, to my site. I'll also keep working on the site as a whole to make it less buggy, look nicer, and have an overall better user experience. For example, I read that it's possible to link an external CSS stylesheet from over the internet. Many sites do not actually write their own CSS - they use one of the many free ones professionals post on the internet.

I'm also still parsing through the very cryptic json data returned by the game server. This data is harder to parse through than the previous one for some reason. Using PHP's simpleXML function isn't "just working", so I have to figure out why.