Codementor Events

Google Summer of Code’ 18 with Oppia

Published Aug 24, 2018
Google Summer of Code’ 18 with Oppia

The Google Summer of Code, often abbreviated as GSoC, is an open source initiative taken by Google every year in which the student developers get to work on one of the open source projects during summer and get stipend for their work. This year I was fortunate enough to be a part of GSoC’ 18 under Oppia Foundation. Before diving into the depth of my project, let me take the opportunity to introduce myself: I’m Vibhor Agarwal, a third year Computer Science undergraduate, who loves to contribute to Open Source projects.


Oppia

Oppia is very special for me from the beginning itself since I love teaching from the childhood and have been interested in the noble cause of spreading education among the masses.

About the Project

Oppia is the community for both learners and creators where learners can learn lessons effectively and in an enjoyable way while creators can create the effective and engaging lessons. Being a community based on education, it’s super important that the quality of the content is not compromised at all. For the purpose of effective learning of the students, Oppia provides several interactions to interact with the students, provides students effective UI experience and allow different types of input based on the necessity of the question.

My project “New Interactions” aimed at implementing two new interactions- “Number with Units” and “Drag and Drop Sorting” interactions. These interactions will enhance the learning experience of the learners by interacting and helping them in gaining new skills.

Final Work

Number with Units interaction allows the learners to input value along with the mathematical units. The value can be either a real number or a fraction while units can be SI, non-SI or currency units like dollar, rupees, cents etc. This interaction aims at providing the complete understanding of the number (real or fraction) input with mathematical units by directly interacting with the learners. The interaction in the Learner view looks like:


Number with units interaction in Learner’s view

The input string is validated at every instant before the final submission of the answer to ensure that the learner enters the units in the correct format.


Validation of the answer entered by the learner

In the extreme cases when the learner may be stuck with writing the units, he can refer to the help table provided with the interaction by clicking on ‘Possible unit formats’ button.

Interactions are associated with the rules in Oppia. These rules are designed to validate the answer submitted by the learner and provide the appropriate feedback accordingly as and when required. Two rules are implemented for Number with Units interaction:


Rule Editor for Number with units interaction

  • Is equal to rule: This rule provides appropriate feedback to the learner when the learner submits the exactly same answer as the input provided by the creator of the lesson.
  • Is equivalent to rule: This rule provides appropriate feedback to the learner when the submitted answer is mathematically equivalent to the input provided by the creator of the lesson. Ex- (2 km and 2000 m), ($2 and 200 cents) are equivalent pairs.

Drag and Drop Sorting interaction allows the learner to drag and drop the items and arrange them in either ascending or descending order. This interaction aims at providing good understanding of arranging the things with the help of drag and drop interface. The draggable item can be an image, text, numeric input or a fraction, etc. The interaction in the Learner view looks like:


Drag and drop sorting interaction in Learner’s view

It is clear that out of the above items, 2/3 and 4/6 fractions are equivalent and should occupy the same position in the sequence in ascending order. So, they can be dropped so that they somewhat overlap each other as shown while other draggable items shown independently occupy different positions in the sequence.


Items after sorting

Four rules are implemented for Drag and Drop Sorting interaction that verify the submitted answer and provides appropriate feedback to the learner.

  • Is equal to ordering rule: This rule provides appropriate feedback to the learner when the submitted answer sequence exactly matches with the input provided by the lesson creator. The rule editor in the Creator view where the creator actually sets the input looks like:


Rule editor for ‘Is equal to ordering’ rule

  • Is equal to ordering with one item at incorrect position rule: This rule provides feedback when exactly one item in the submitted sequence is at the wrong position. Its rule editor is same as that of the rule above.
  • Has element X at position Y rule: This rule provides feedback when the selected element (say X) from the list of elements is at the position (say Y) in the submitted sequence as set by the creator while setting the rules for the interaction. The rule editor in the Creator view looks like:


Rule editor for ‘Has element X at position Y’ rule

  • Has element X before element Y rule: This rule provides feedback when the selected element (say X) from the list is before the another selected element (say Y) as choosen by the lesson creator. The rule editor looks like:


Rule editor for ‘Has element X before element Y’ rule

Milestones of the Project

Milestone 1:

Milestone 1.1

Milestone 1.2

Milestone 1.3

  • In this milestone, the two new rule specs, validation of these rules and frontend and protractor e2e tests for the interaction were added.
  • Finally, the basic version of the interaction was enabled allowing validation and verification of the mathematical units.
  • Pull Request: https://github.com/oppia/oppia/pull/5028

Milestone 2:

Milestone 2.1

Milestone 2.2

Milestone 2.3

Milestone 3:

Milestone 3.1

  • In this milestone, currency units (like dollar, rupees, cents etc.) were added for Number with Units interaction.
  • Help table for correct input format was also added in case the learner is stuck with writing valid units.
  • The final version of the Number with Units interaction was released on the Oppia’s main site.
  • Pull Requests: https://github.com/oppia/oppia/pull/5124; https://github.com/oppia/oppia/pull/5175

Milestone 3.2

Bug Fixes

Conclusions

Last but not the least, I would like to thank Google for providing this wonderful opportunity to contribute to the open source projects through GSoC, the whole Oppia community for accepting my proposal and helping me through out the program and most importantly, special thank you to my mentor- Prasanna Patil and org admin- Sean Lip who helped me in every way possible.

Well, I am happy that I learnt so much during this tenure of 3 months. I would like to thank entire Oppia community for this awesome learning experience and I promise to keep my associations with Oppia in the future as well.

References

Discover and read more posts from Vibhor Agarwal
get started
post commentsBe the first to share your opinion
Show more replies