Thursday, April 17, 2014

Week 13: App Development!

The learning modules have officially proved excessively difficult, so now that we know how to hook up an app with a simple URL to Canvas, we branched out to program an app on our own!

This week we wrote a simple piece of code in Python using the SymPy interface to generate "random" (within an integer range) polynomials and check the roots of the polynomial entered by the user.


The code works great in Terminal, but now we need to actually access it in a web form in order to take user input from a webpage. To do this, we first had to enable Python in apache (we used these instructions).

Next, we need to be able to use our Python code in an HTML form. We found this tutorial on how to embed Python in HTML using Jinja to accomplish this goal, but we'll see how intuitive it is.


We also want to incorporate MathJax into our program to display the polynomials (and any other functions we might want to add to our app functionality in the future) more elegantly.

Goals for next week:

  1. Ensure Python is enabled in apache
  2. Work through Jinja tutorial



Thursday, April 10, 2014

Week 12: Sometimes Ignorance Really is Bliss

Updating my system to 10.9 worked! Whatever bugs were in OS 10.8 somehow did not transfer over to 10.9.  Once updated, I re-worked through all the steps to set up apache and php again and any local server launch was successful:



Sometimes the solution to knocking your head against a wall is just to paint over it.

Now that we've got both a functional default and personal server, we started working with the OAuth library that we got from the Canvas forum to see if we could finally verify the signatures from the Canvas modules.

We were able to hook the library up to our server and connect it to the LTI module. 


Unfortunately, we keep getting a "could not establish context" error when running through the modules, so we posted in the forum for some advice. 


The forum led us here where we connected our 'app' to our test course and added it to a test module. 




Success!

So we have now "established context" in the scope of our course, but have yet to figure out how that ties in to the Learning Modules.  Back to the forum!

Alternatively, we considered different learning modules or attempting to program our app on our own without the modules, but it seems every path presents its own unique roadblocks and challenges. 

Goals for this week:
  1. Find out how Course/App connection is tied to the Canvas Learning Modules
  2. Explore alternatives to the modules (programming app solo, or finding alternate LTI materials)


Sunday, April 6, 2014

Week 11: Forms and 403's

This week our goal was to get some code working on our local server and eventually start creating an app that could process the encryption parameters sent to us from the Canvas test modules.

Using the tutorials from here and here, we were able to create a very basic web form and have it appear on our local test-website.local:


Unfortunately, once we had a test website working, we were no longer able to access the default local server on my operating system (Mac OSX). 


We think this has something to do with how we enabled apache and cgi, but we made so many changes without going through bash that it's harder to step backward and error check.  We tried changing the permissions via the terminal, but still no luck:


Even more mind-boggling is that the permissions work on my mentor's system even though we made all the same changes. We tried re-working through several tutorials: hereherehere, and here to enable apache without any success.  Our final hope is to update my operating system to 10.9, which will reset apache, and just start again from scratch (feels like the case of the missing bracket all over again). We're also going to try posting our error to apple.stackexchange and see if we can get some more detailed feedback.

On the app front, I wrote a short bit of code that will hopefully seek out the necessary parameters and write them to a file: 


Unfortunately, we have no way to test this code until we get our server up-and-running properly. What a world!

Goals for next week:



  1. Update operating system in order reset apache2 and cgi
  2. Test and tweak app to gather necessary Canvas parameters