Posts Tagged ‘curl’
Week – 6
Progress:
Finally the most important feature of my module is implemented and that is to allow instructors to directly import CC packages of OpenLearn in ATutor. For implementation of this feature I used existing code for importing packages and modified it to include cURL for file download. And here are the activities of this week:
- Implementation of import functionality
- Changes in code for “Update Now” option for Admin
- Modified parsing code to make it safe for insertion in MySQL
- Implemented Paginator for navigation of search results
- Changes in UI
Now some more details:
My mentor Greg found some bugs in the “Update Now” option and informed me. When I tested it, I found that when I modified parsing code I forgot to modify “Update Now” code. So I modified the updating code to include changes. And when I was testing parsing code I found that there are total 567 records in OL repository and I am getting only 565 records in table so I found that some records were not being inserted because there were special characters in them. So I included addslashes() function to make it safe for MySQL and on the retrieving side I added stripslashes() function to get original data. Search engine’s results are always displayed using paginator. Therefore I needed to include one in my code. I used existing paginator of ATutor for this purpose. I also modified UI to make it key board navigable and look like accordion. I have used modified version of accordion for this purpose because jQuery has keyboard navigation problems.
Week – 5
Progress:
This week has been the most confusing week of my journey till now. During this week I tried to implement “import” functionality which will allow instructors to directly import OpenLearn courses to ATutor.
During this week I carried out following activities:
- Download cc package to temporary location.
Status – Completed
- Upload downloaded package to ATutor using cURL
Status – In progress
- Change the way results are displayed such that they are key board navigable and looks like accordion
Status – Completed
Direct import using URLs of OpenLearn units is not allowed in ATutor because OpenLearn uses cookies and ATutor’s code is written for simple file downloads. So I need to implement import feature such that it uses ATutor’s existing code of import and still allows downloads using cookies. For this I have chosen two steps approach in which first I will download cc packages to a temporary location and later this cc package will be uploaded to ATutor.