There are 4 PHP files that drive the backbone of the 3 Gadgets
The later file holds all the functions required by the first 3 files.
The getPage.php file is called once a user issues a course search inside the Yedion gadget
the maxeBuble.php is called from the hourTable gadget during its loading in order to get the information shown on the hover bubles, it also brings the date of the first test of a course.
the getCourseData.php file, is used is called from the Yedion gadget, during its loading in order to get course data, such as the course name, course web site and course test date.
they all use functions located in the phpFunctions.php file, the list of functions and their description is given below
This very important function calls the university yedion page, with the course num and semester
then it filters all the garbage information, and returns an html code with the specific course data
in a way that each group is seperated from the rest by a <br> tag, and the information inside is seperated by spaces.
this data will be processed later on by the changeRowToArray function.
params: htmlData, recitationArray, lectureArray, semesterFilter, recitation(boolean flag)
This function parses a single row of data from the parseHtml function, it formats the data according to our agreed upon communication
protocol, and pushes the data to the lecture or recitation array according to the semesterFilter and recitation flag
This function returns the hebrew letter of the semester according to a given english letter
In order to save storage space, this function changes the hebrew letters to english letters, passing a hebrew letter in get format uses up 7 characters, changing it to a single english letter saves alot of room
This function takes a string and encodes it to UTF-8 format, we use this because the university works with ISO and google works with UTF8
This function takes an HTML text and gets all the site links (<a> tags) from that text, we use this because the university stores the course site
and the course test dates inside those tags
This function gets the output of the previous function and parses it to get the date of the test
This function gets the output from getSiteLinks and returns the course site (if exists) from it
params: recitationArray, lecturesArray
This function is used in the getBuble.php page to create a JSON object for the hourTable gadget in order for the later to create the cool bubles of the course information
params: htmlText, tagsList, tagsData(boolean flag)
this function parses an htmlText and strips from it a list of given tags, the tags data boolean states if to keep or not the data within the tags, this function is used in the parseHtml function to remove excess data