User:Pravinpatil/GSOC

Personal Info
Name:Pravin Patil Project:Theming Academic Background: I am a fourth year student studying at International Institute of Information and Technology, Hyderabad, India pursuing BTech in Computer Science and Engineering. Location:My hometown is in Maharashtra and I study in Hyderabad,India. Timezone: IST (UTC +5:30) Working Hours: My working hours are very flexible. If situation asks for I will even work on weekends. Github Account

CV: ResumeLink

Contact Info
Email: pravinpatil3009@gmail.com IRC nick: pravinpatil (freenode) WikiEducator username: Pravinpatil

Goal

 * Wikieducator has various courses offered by multiple organizations.
 * Currently all courses have same stylesheet and javascript used. (i.e default set by mediawiki instance)
 * Aim is to have flexibility to provide personalize style for each course.
 * This way every individual course can have its own custom theme and javascript functionality.
 * Creation of Iframe friendly skin for wikieducator site for use of embedding on various educational sites.

Output
The following would be the set of deliverable available after the project completion :


 * Modification/creation of 2 or more extensions that shall provide above functionality.
 * Course instructor/faculty will need to include an extension tag (only once) for eg : 
 * The change of theme will be reflected across all course pages belonging to that particular course.
 * Iframe friendly skin that can be used by courses which can be easily embedded into other websites.

Basic WorkFlow/Steps
'''Currently available extensions for modifying page css and javascript insertion '''
 * 1) PageCss
 * 2) * Problems : This extension does not work correctly with more recent versions of MediaWiki
 * 3) AddScriptCss
 * 4) *Parser hook to add per-page CSS using the tag
 * 5) *This extension has dependency on Stubmanager.Need to install channel PEAR,otherwise the extension won't work.
 * 6) CSS
 * 7) * This extension provides functionality to add css via file upload. Also the css can be included within the tag itself.
 * 8) * A parser-function for adding CSS files, article or inline rules to articles.
 * 9) * This is compatible with latest versions of mediawiki. (As wikieducator will be updating to v1.23, this extension is better option)
 * 10) * We will reuse the code of this extension to style individual pages. We are using this because this extension already takes care of data URI even in IE6/7 browsers (verifyCSSLoad.js file)
 * 11) * One problem may arise while updating the extension,as some functions might be deprecated in future version of CSS extension.This has to taken into consideration. All necessary changes will be incorporated if such problem arises in future.
 * 12) AddScript
 * 13) *This extension will be used to upload javascript files to wikipages.
 * 14) *There are some issues (solution given) Link : Issues
 * 15) *Need to take care of malicious scripts that users may try to upload. This might compromise user credentials.
 * 16) *Only specific set of user roles will be given permission to upload js files to the filesystem.
 * 17) *XSS attacks is handled by this extension.
 * 18) *Modern browsers will intelligently strip '/../' along with the parent dir when found in fetched URLs.

'''Wikieducator extension that aggregate course pages: '''
 * 1) Collections
 * 2) This will help us to get all pages within a course.
 * 3) Every article is included within a book namespace for that course. All the course books in turn are present in books category on wikieducator.

Step for implementing theming across all course pages of a particular course

 * 1) We need the instructor to add a tag. How will this be achieved ?
 * 2) * Tag syntax will be of type . This way we need stylesheet to be loaded for all pages in collection "collection_name". Problems may arise as to which path to provide in filename, either the ones that are uploaded on the wikieducator (relative path) or files from external links. There are problems of XSS attacks which might expose user credentials. These issues are addressed in mediawiki forums and can be appropriately handled.
 * 3) * Collection page has one section which can be manually edited and other section where all pages within that book are displayed. We need the user to add the tag to the manually editable space, which will be passed to the parser. All pages within that book will be retrieved and according header scripts will be added.
 * 4) We need to implement hooks (this is if we use CSS extension)
 * 5) * ParserFirstCallInit -> This shall initiate which hook to use for rendering.Lets name it wgGetCollectionPages
 * 6) ** wgGetCollectionPages -> This hook shall get all pages within the given category/collection.
 * 7) ** We will first check for file extensions for .css and .js files,get file locations. These files must be in protected namespace.
 * 8) * ParserAfterTidy -> For all the pages we collected above we will add scripts (.css and .js) to their headers.
 * 9) **This hook is commonly used to re-introduce content that was earlier embedded by an extension during page rendering, either encoded or represented by a marker, by searching for it and replacing it with HTML content. Such a techniques allows MediaWiki extensions to output HTML that isn't mangled by the parse
 * 10) ** $text variable for this hook contain all the html output for the page. We will be adding scripts to the head tag.
 * 11) ** Things that need to be handled are path of files, whether it is present in db, or its an external link. Prevention of data injection by using data URI. (This is already handled by CSS extension)
 * 12) If we use AddScript extension, then both css and javascript can be handled by this extension itself.
 * 13) *But this extension does not allow for css provided on the page itself(no file upload).
 * 14) *This extension can be merged with CSS extension. This way both functionality can be achieved,but this requires lot of looking into documentation and talk with creators of these extensions.
 * 15) Last but not the least there might be some existing bugs present within these specified extensions which I will need to address so that extension does not break the site in specific cases.

Iframe friendly skin for wikieducator site
Tutorials for creation of skins for mediawiki are readily available.
 * 1) Creation of skin.php : Define layout of pages
 * 2) main.css : stlyesheet for Iframe friendly skin
 * 3) browser fixes file if required
 * 4) defining Commonly added terms
 * 5) *The XHTML code which opens (and eventually closes) the HTML output that will be sent to the client's browser.
 * 6) *The head element, which imports style-sheets, scripts, defines the page's meta data, and specifies the title to be displayed in the browser's title bar for the specific page being viewed.
 * 7) *The body opening tag. This tag opens the body element of the page and specifies what happens when the page loads or is double clicked if such handlers exist.
 * 8) *The site's name block.
 * 9) *The site's logo image.
 * 10) *The site's tag-line
 * 11) *Site Notice block.
 * 12) *User message notification block (if there is a need for it)
 * 13) *The user's toolbar.
 * 14) *Intrapage navigation block.
 * 15) *Search.
 * 16) *Toolbox.
 * 17) *Language links.
 * 18) *Page name.
 * 19) *Page subtitle.
 * 20) *Undelete notice.
 * 21) *Page contents.
 * 22) *Category links.
 * 23) *Page toolbar.
 * 24) *Footer.
 * 25) *Closing trail.

Changes in the system javascript so as to retain some features for embedding purposes. This needs to be discussed more.

Benefits to WikiEducator
Currently all courses have same theme which is default set by wikieducator mediawiki instance. My project will provide enhanced user experience.

For example this site shows a wiki page of a game.


 * Only trusted users will be able to change the theme of the course.
 * Rather than adding extension tag on every page, instructor only has to add tag once.
 * Theming will provide more functionality like jquery experience.
 * Users will be able to upload their stylesheet and javascript depending upon their requirements.
 * jQuery UI is a curated set of user interface interactions, effects, widgets, and themes built on top of the jQuery JavaScript Library
 * Iframe friendly bare skin will provide for embedding wikieducator content on other education sites.

Long Term Goals and Personal Development
A successful GSOC project not only serves the student but also the community. Next year more students join in based upon the organizations performance which depends upon the student they select for their projects.My long term goal is to become an active member of the wikieducator community. I am currently a student and still in my learning phase and its important for me to get familiar with team work and ethics.Open source gives contributors great powers with which comes great responsibilities. I am a hardworking guy and very professional indeed. I believe that working hard always pays off, and I always strive for it. Other than this, I am a very cool guy who wants to be a good programmer, and someday be a part of open source community started by me and of course be the CEO. But to achieve great things one needs to do great things, and that's what I am hoping to do.

Why I'm the best person for this project?
I have worked with open source community last year with Sigmah organization and know about the work ethics and responsibilities. Its very important to keep up the enthusiasm and hard work till the very end. Communication with mentors is very important so that they know about the status of our projects. I have been working for a college project which involved working with php and mysql for more than 2 years Site and its important to maintain documentation and status tracker for the work been done. I will be maintaining blogs for work done for every week so that its easy for mentors to keep track.

I am a fast learner and quickly get familiarized with documentation. Also I ask many questions which sometimes might be annoying but its a good way to do productive work.

.

Experience of MediaWiki
I have been working with mediawiki for past 2 months for my college project.Unfortunately I cannot share the codebase due to some legal terms.I am familiar with its codebase and its documentation. So for you to judge my mediawiki skills I have created 3 extensions that can be readily used. Link to MyExtensions

Other Open Source projects I've worked on
I started working with Sigmah community last year when selected for GSOC'13. I created 3 modules for them which facilitated Sigmah Private Support feature on their Drupal website and successfully completed it within time frame. I have been working with Drupal CMS for past 3 years and very much familiar with its architecture. Drupal is built using php,mysql,css and javascript by which I can say that I am well versed with the above languages and their usage. Link to GSOC'13 Project

Link to Sigmah commits

Other works

 * 1) Government of India Project : Socionity FormMaker (Code link Github )
 * 2) Pugmarks : Built a geographical location based application which accumulates meta data about a place by means of crowd sourcing.
 * 3) Teaching Assistant for System Structural Analysis and Design course Monsoon:2013

Post GSOC Plans
GSOC does not end in summer rather its a start of a new journey with the organization. With the 3 month period of communication, I will be acquainted with people of the wikieducator community, their issues,discussions.Any open source project needs to build up a large community of developers and users so as to establish itself in the market. This way the community grows. Once you become a member of open source community its my responsibility to keep working for them even without incentive.I hope to be an integral part of your community and keep working with members. I hope to become a mentor for your organization next year.

Other Commitments between 19th May - 18th August
I do not have any commitments for this summer neither I have undertaken any college project to work for this summer. I am willing to work on this project for the entire duration, giving 6-8 hours a week. I will be staying in college campus which shall facilitate my working for 40 hour a week. Moreover I have already started reading the documentation for implementing the theming project which will give me a considerable head start if I am selected.