After talking with my advisor, we came to the conclusion there would be no way to continue with the project without implementing the api. The only way to authenticate users and pull data (such as cardbooks) is through methods included in the ERIC API.
So, currently, I'm discussing how to use this API with the developer of this API. So far, I was able to implement the PHP scripts that create the necessary databases and tables.
Right now, it turns out the developer has to manually add some info into the game server to add my application and give access. Therefore, I have to migrate everything to my webserver. This should be easy since it's all managed by git.
Monday, January 21, 2019
Monday, January 14, 2019
(1-14) More PHP
This week, I mainly focused on trying to implement the ERIC API, and further developing the site.
I learned to make a completely dynamic web page using php. I could have a php script running, and based on the results of certain functions, change the layout of my site. For example, if the student logs in, and I detect the student's role is 'student', I could append '<div id=student>student stuff</div>' rather than a teachers '<div id=teacher></div>' to a $content variable, then simply echo that variable at the end of the script.
After hours and hours of trying to get the ERIC API to work, I felt it would be more time-effective if I kept the login process I already implemented, and manually issue cards and rewards to students through the use of a TA.
I'm going to talk to my advisor about this, and my next blog post will contain the decision we come up with.
I learned to make a completely dynamic web page using php. I could have a php script running, and based on the results of certain functions, change the layout of my site. For example, if the student logs in, and I detect the student's role is 'student', I could append '<div id=student>student stuff</div>' rather than a teachers '<div id=teacher></div>' to a $content variable, then simply echo that variable at the end of the script.
After hours and hours of trying to get the ERIC API to work, I felt it would be more time-effective if I kept the login process I already implemented, and manually issue cards and rewards to students through the use of a TA.
I'm going to talk to my advisor about this, and my next blog post will contain the decision we come up with.
Sunday, January 6, 2019
(1-6) MySQL
This week, I continued to speak to the developer of the ERIC API. However, due to the different time zones, the conversation is occurring slowly. Therefore, I have not been able to make much progress with the API.
Instead, I spent the week finalizing the database layout, and learned how to interface with the database with PHP. The database contains 7 tables.
Students (contains name, canvas uuid, and the game server uuid.
This table has a many-to-many relationship with a table called achievements, which contains name, description, and imgpath. This new table is called earned_achievements. Students also has a many-to-many relationship with a table called rewardcriteria, which contains numerous criteria for various rewards. The new table is called earned_rewards. Lastly, there are 2 more tables containing data involving sharing achievements to social media.
With php, I used mysqli to read and alter database data.
Additionally, I inquired with the man in charge of NMT's canvas account about the possibility of obtaining a developer account. However, he declined and said it would create a security vulnerability with the school's canvas account. Without a Canvas account, I wont be able to do two things.
1) I wont be able to develop an LTI plugin. This plugin would be able to be easily included in any class page, and make editing and displaying data much easier due to all student/class data readily available, rather than having to have a standalone site make API calls.
2) I won't be able to simply have students log in, authorize my app, and simply use their client id and secret.
The only workaround I can think of would be the following. I will have a student sign up for my site. They would create a username and password, then be redirected to their settings page, in which the would manually generate a token I can use to obtain data. By using and storing this token, I believe I should be able to do what we need to do. However, I do not think this will be a valid long-term development option. Therefore, it will be an ongoing goal to obtain a development license.
My goals for the following week will be the following.
1) Continue trying to implement the ERIC API.
2) Further develop the layout of the site.
3) Further finalize the database due to the aforementioned roadblock.
Instead, I spent the week finalizing the database layout, and learned how to interface with the database with PHP. The database contains 7 tables.
Students (contains name, canvas uuid, and the game server uuid.
This table has a many-to-many relationship with a table called achievements, which contains name, description, and imgpath. This new table is called earned_achievements. Students also has a many-to-many relationship with a table called rewardcriteria, which contains numerous criteria for various rewards. The new table is called earned_rewards. Lastly, there are 2 more tables containing data involving sharing achievements to social media.
With php, I used mysqli to read and alter database data.
Additionally, I inquired with the man in charge of NMT's canvas account about the possibility of obtaining a developer account. However, he declined and said it would create a security vulnerability with the school's canvas account. Without a Canvas account, I wont be able to do two things.
1) I wont be able to develop an LTI plugin. This plugin would be able to be easily included in any class page, and make editing and displaying data much easier due to all student/class data readily available, rather than having to have a standalone site make API calls.
2) I won't be able to simply have students log in, authorize my app, and simply use their client id and secret.
The only workaround I can think of would be the following. I will have a student sign up for my site. They would create a username and password, then be redirected to their settings page, in which the would manually generate a token I can use to obtain data. By using and storing this token, I believe I should be able to do what we need to do. However, I do not think this will be a valid long-term development option. Therefore, it will be an ongoing goal to obtain a development license.
My goals for the following week will be the following.
1) Continue trying to implement the ERIC API.
2) Further develop the layout of the site.
3) Further finalize the database due to the aforementioned roadblock.
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.
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.
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.
- The requesting site converts the student's login into a UUID.
- The student gets redirected to the eric module on the site being requested.
- The student logs into that site and grants the requesting site permissions in the ERIC module.
- The ERIC API randomly generates a code that is sent back to the requesting site, and a connection is made.
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.
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.
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.
Subscribe to:
Posts (Atom)