Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into rules-json
Browse files Browse the repository at this point in the history
Conflicts:
	core/controllers/editor_test.py
	core/templates/dev/head/baseSpec.js
	core/templates/dev/head/components/AnswerGroupEditorDirective.js
	core/templates/dev/head/components/RuleTypeSelectorDirective.js
	core/templates/dev/head/exploration_editor/EditorServices.js
	core/templates/dev/head/exploration_editor/main_tab/StateEditor.js
	core/templates/dev/head/exploration_editor/main_tab/StateEditorSpec.js
	core/templates/dev/head/player/AnswerClassificationServiceSpec.js
	core/tests/karma.conf.js
	feconf.py
  • Loading branch information
wxyxinyu committed Jun 14, 2016
2 parents 70ab4c4 + d76f7c5 commit 74e466b
Show file tree
Hide file tree
Showing 347 changed files with 14,250 additions and 5,983 deletions.
42 changes: 42 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Source files
# ============
*.pxd text eol=lf
*.py text eol=lf
*.py3 text eol=lf
*.pyw text eol=lf
*.pyx text eol=lf
*.sh text eol=lf
*.js text eol=lf
*.txt text eol=lf
*.css text eol=lf
*.html text eol=lf
*.md text eol=lf
*.yml text eol=lf
*.yaml text eol=lf
*.md text eol=lf
*.json text eol=lf
*.html text eol=lf
*.txt text eol=lf
*.xml text eol=lf
*.pegjs text eol=lf

# Misc files
# ==========
.jscsrc text eol=lf
.gitignore text eol=lf
.pylintrc text eol=lf
AUTHORS text eol=lf
CHANGELOG text eol=lf
CONTRIBUTORS text eol=lf
LICENSE text eol=lf
Vagrantfile text eol=lf


# Binary files
# ============
*.db binary
*.p binary
*.pkl binary
*.pyc binary
*.pyd binary
*.pyo binary
12 changes: 7 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,15 @@ branches:

env:
matrix:
- RUN_LINT=true
- RUN_FRONTEND_TESTS=true
- RUN_E2E_TESTS_EDITOR=true
- RUN_E2E_TESTS_MAIN_EDITOR=true
- RUN_E2E_TESTS_EDITOR_FEATURES=true
- RUN_E2E_TESTS_EXTENSIONS=true
- RUN_E2E_TESTS_LIBRARY=true
- RUN_E2E_TESTS_MISC=true
- RUN_BACKEND_TESTS=true REPORT_BACKEND_COVERAGE=false
- RUN_BACKEND_TESTS=true REPORT_BACKEND_COVERAGE=true
- RUN_LINT=true
- RUN_FRONTEND_TESTS=true
matrix:
allow_failures:
# The backend tests, with coverage, take too long to run, so we make this
Expand Down Expand Up @@ -72,7 +73,8 @@ install:
- source scripts/setup_gae.sh || exit 1

script:
- if [ $RUN_E2E_TESTS_EDITOR == 'true' ]; then bash scripts/run_e2e_tests.sh --suite="editor"; fi
- if [ $RUN_E2E_TESTS_MAIN_EDITOR == 'true' ]; then bash scripts/run_e2e_tests.sh --suite="mainEditor"; fi
- if [ $RUN_E2E_TESTS_EDITOR_FEATURES == 'true' ]; then bash scripts/run_e2e_tests.sh --suite="editorFeatures"; fi
- if [ $RUN_E2E_TESTS_EXTENSIONS == 'true' ]; then bash scripts/run_e2e_tests.sh --suite="extensions"; fi
- if [ $RUN_E2E_TESTS_LIBRARY == 'true' ]; then bash scripts/run_e2e_tests.sh --suite="library"; fi
- if [ $RUN_E2E_TESTS_MISC == 'true' ]; then bash scripts/run_e2e_tests.sh --suite="misc"; fi
Expand All @@ -96,4 +98,4 @@ cache:

before_cache:
# Delete python bytecode to prevent cache rebuild.
- find third_party -name "*.pyc" -print -delete
- find third_party -name "*.pyc" -print -delete
9 changes: 9 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ Alex Gower <alexanderpgower@gmail.com>
Allan Zhou <allan.zhou@berkeley.edu>
Andrew Low <kahkhang@gmail.com>
Andrey Mironyuk <andmir92@yahoo.com>
Anmol Shukla <anmol.shkl@gmail.com>
Arun Kumar <arunkumarm1995@gmail.com>
Avijit Gupta <526avijit@gmail.com>
Barnabas Makonda <barnabasmakonda@gmail.com>
Ben Targan <ben.targan@gmail.com>
BJ Voth <bjvoth86@gmail.com>
Bolaji Fatade <bjfatade@gmail.com>
Brenton Briggs <briggs.brenton@gmail.com>
Charisse De Torres <midorijikan@gmail.com>
Expand All @@ -36,8 +38,11 @@ Jasper Deng <jasper.deng@gmail.com>
Jaysinh Shukla <jaysinhp@gmail.com>
Jérôme (zolk232) <zolk232@gmail.com>
Jerry Chen <jerry.c@berkeley.edu>
John Glennon <yeeons@gmail.com>
Joshua Cano <joshua.m.cano@gmail.com>
Joshua Lusk <luskjh@g.cofc.edu>
Karen Rustad <karen.rustad@gmail.com>
Kathryn Patterson <katp@wegrok.net>
Kenneth Ho <a0125364@u.nus.edu>
Kerry Wang <kerryxwang@gmail.com>
Kevin Lee <leekevin@berkeley.edu>
Expand All @@ -57,18 +62,22 @@ Philip Hayes <philiphayes9@gmail.com>
Prasanna Patil <prasannapatil08@gmail.com>
Raine Hoover <raine.hoover@gmail.com>
Rajat Patwa <razat249@gmail.com>
Rajendra Kadam <rajendrakadam249@gmail.com>
Reto Brunner <brunnre8@gmail.com>
Richard Cho <won0089@gmail.com>
Samara Trilling <samara.trilling@gmail.com>
Santos Hernandez <hernandz@stanford.edu>
Sanyam Khurana <sanyam.khurana01@gmail.com>
Satwik Kansal <satwikkansal@gmail.com>
Scott Junner <scott.junner@gmail.com>
Sebastian Zangaro <szangaro@gmail.com>
Seth Beckman <beckmanseth@gmail.com>
Shafqat Dulal <shafqat.dulal@gmail.com>
Shouvik Roy <vicks4uster@gmail.com>
Sourav Badami <souravbadami@gmail.com>
Sreenivasulu Giritheja <s.giritheja@gmail.com>
Tarashish Mishra <sunu0000@gmail.com>
Timothy Cyrus <tim.h.cyrus@gmail.com>
Travis Shafer <tdtshafer@gmail.com>
Tuguldur Baigalmaa <philoniare@gmail.com>
Umesh Singla <umeshksingla@gmail.com>
Expand Down
88 changes: 87 additions & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,92 @@ This file contains a summary of changes to the Oppia code base. For a full chang

https://github.com/oppia/oppia/commits/master

v2.3.0 (7 Jun 2016)
-------------------
Site-wide features:
* Add suppport for internationalization.
* Add title and meta descriptions.
* Fix #1845: add a warning if the user has disabled JavaScript.
* Fix #1900: correctly close the sidebar menu on mobile.
* Fix #1842: prevent the profile avatar dropping off the top of the page on small screens.

Splash/About pages:
* Add new About, Teach and Get Involved pages.
* Reverse the text and update the images in the lower half of the splash page.
* Redirect to the creator dashboard if the user logs in from the splash page.
* Use absolute paths for images on the splash page.

Library page:
* Add a recently-published group to the library index page.
* Add a top-rated group to the library index page.
* Add a banner and text to the top of the library index page.
* Add a footer to the library index page.
* Filter null explorations from showing up in the library index page.
* Fix #1456: create summary tiles for collections.
* Fix #1860: elongate exploration summary tiles to allow two lines of the exploration title to show.
* Fix #1840: fix the oval around the contributor icons in the exploration summary tiles.
* Remove avatars from the exploration summary tiles due to latency issues.
* Remove the on-hover indicator from the library carousel scroll button.
* Fix #1864: fix carousel behaviour when the user clicks on the scroll button multiple times in rapid succession.
* Fix #1911: fix incorrect carousel shadow height.
* Fix #1918: Prevent the site feedback button from being hidden in the library index page.
* Add new subject icons for Spanish and Gaulish.

Exploration editor:
* Add functionality for autosaving drafts.
* Allow jumping to a particular state in preview mode.
* Prompt for missing metadata fields just before publication.
* Streamline the saving flow for the various state properties.
* Refactor the parameter metadata computation into a separate service.
* Fix #1877: prevent the 'add new response' modal from exiting when a creator clicks outside it.
* Fix #1829: in the history tab, reduce the space between the committer's username and the exploration version.
* Fix #1894: prevent the category dropdown list from unnecessarily scrolling to the bottom.
* Remove the underline button from the rich-text editor toolbar.
* Remove the "nominate exploration" button from the editor settings page.
* Remove the 'missing objective' warning.

Collection editor:
* Introduce a new collection editor (currently in beta).

Creator dashboard:
* Rename 'My Explorations' to 'Creator Dashboard'.
* Fix #1954: add collection tiles to the creator dashboard.
* Fix #1696: introduce a modal for choosing which type of activity to create.
* Fix #1705: remove the old exploration creation modal.

Learner page:
* Fix #1489: make the learner view responsive.
* Fix #1881: remove unnecessary scroll bar.
* Fix #1814: remove unnecessary button styling and arrows in the tutor card.
* Fix #1815: place the tutor avatar above the supplemental card.
* Fix #1818: show the help card at the bottom of the viewport if the interaction is too tall.
* Fix jerky animation for showing previous answers.
* Fix #1816: fix single-card to double-card animation.
* Fix #1817: center the animation at the Oppia avatar position.

Interactions:
* ItemSelectionInput:
- Fix #1766: correctly initialize the notEnoughSelections flag.

Profile page:
* Fix #1793: allow the user to click on their profile image in order to edit it in their Preferences page.
* Fix #1826: show subject interests properly in Firefox.

Infrastructure and tests:
* Improve application performance by disabling debug data.
* Fix #1540: add tests for detecting bad patterns.
* Add a one-off test case to check the computation of exploration contributor summaries.
* Support setting CHROME_BIN to the Chromium browser path in Unix-based systems.
* Fix #1394: fix Python version check in setup.sh.
* Fix #1848: set the appropriate http_proxy environment variable if the user is on Vagrant.
* Increase the default memory in the Vagrantfile to 2048MB.
* Fix #1836: add a .gitattributes file to set proper EOL terminators.
* Tighten CSRF payload checks to correctly handle empty request data.
* Fix #1757: divide e2e tests into separate suites.
* Fix #1779: split e2e tests into separate suites on Travis-CI.
* Protractor bugfix: scroll to the top of the page before clicking on the state graph.


v2.2.0 (7 May 2016)
-------------------
Overall site design and navigation:
Expand Down Expand Up @@ -35,7 +121,7 @@ Editor page:
* Fix a bug in getEditorTabContext() that resulted in incorrect detection of the editor preview mode.
* Fix #1788: correctly align parameter input fields in Firefox.

Learner:
Learner page:
* Fix #1497: ensure that the inter-paragraph spacing behaves correctly.
* Fix #1678: prevent share links from being squashed in the information card.

Expand Down
30 changes: 24 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ Thanks for your interest in contributing code or design help to the Oppia projec
## Setting things up

1. Please sign the CLA so that we can accept your contributions. If you're contributing as an individual, use the [individual CLA](https://goo.gl/forms/AttNH80OV0). If your company owns the copyright to your contributions, a company representative should sign the [corporate CLA](https://goo.gl/forms/xDq9gK3Zcv).
2. Create a new, empty folder called `opensource/` in your computer's home folder. Navigate to it (`cd opensource`), then [fork and clone](https://help.github.com/articles/fork-a-repo/) the Oppia repo so that it gets downloaded into `opensource/oppia`. Then follow the appropriate installation instructions ([Linux](https://github.com/oppia/oppia/wiki/Installing-Oppia-%28Linux%29), [Mac OS](https://github.com/oppia/oppia/wiki/Installing-Oppia-%28Mac-OS%29), [Windows](https://github.com/oppia/oppia/wiki/Installing-Oppia-%28Windows%29)).
3. Update your GitHub notification settings:
2. Fill in the [Oppia contributor survey](http://goo.gl/forms/wz1x3bFfpF) to let us know what your interests are. (You can always change your responses later.)
3. Join the [oppia-dev@](https://groups.google.com/forum/#!forum/oppia-dev) mailing list, and say hi on the [gitter](https://gitter.im/oppia/oppia-chat) chat channel!
4. While you're waiting for a reply, create a new, empty folder called `opensource/` in your computer's home folder. Navigate to it (`cd opensource`), then [fork and clone](https://help.github.com/articles/fork-a-repo/) the Oppia repo so that it gets downloaded into `opensource/oppia`. Then follow the appropriate installation instructions ([Linux](https://github.com/oppia/oppia/wiki/Installing-Oppia-%28Linux%29), [Mac OS](https://github.com/oppia/oppia/wiki/Installing-Oppia-%28Mac-OS%29), [Windows](https://github.com/oppia/oppia/wiki/Installing-Oppia-%28Windows%29)).
5. Update your GitHub notification settings:
* Go to your settings page (click the Settings option under the profile menu in the top right), then go to 'Notification center' and ensure that everything's as you want it.
* Go to the [Oppia repo](https://github.com/oppia/oppia), and click 'Watch' at the top right. Ensure that you're not 'ignoring' the repo, so that you'll be notified when someone replies to a conversation you're part of.
4. Fill in the [Oppia contributor survey](http://goo.gl/forms/wz1x3bFfpF) to let us know what your interests are. (You can always change your responses later.)
5. Join the [oppia-dev@](https://groups.google.com/forum/#!forum/oppia-dev) mailing list, and say hi on the [gitter](https://gitter.im/oppia/oppia-chat) chat channel!
6. (Optional) You may also want to set up [automatic auth](https://help.github.com/articles/set-up-git/#next-steps-authenticating-with-github-from-git) so you don't have to type in a username and password each time you commit a change.

## Getting in touch with the team
Expand All @@ -31,7 +31,7 @@ If you don't have an idea for something to do, try searching the issue tracker f
* **[TODO: design (UI/Interaction)](https://github.com/oppia/oppia/labels/TODO%3A%20design%20%28UI%2Finteraction%29)** means that the issue is suitable for new UI designers, interaction designers, artists and writers. In general, it means that UI design help is needed, and the deliverable would usually be a mockup, drawing, prototype or text that conveys what the feature should look like.
* **[TODO: design (usability)](https://github.com/oppia/oppia/labels/TODO%3A%20design%20%28usability%29)** means that the issue is suitable for new usability testers. In general, it means that we have one (or more) ideas or designs for a project, and usability testing/research is needed to find out which one to go with.

These issues, also tagged as 'starter projects', are usually local to a small part of the codebase. They tend to be easier, so they give you a chance to get your feet wet without having to understand the entire codebase. If you'd like some help finding an issue to work on, please don't hesitate to reach out to us at the [developers' mailing list](https://groups.google.com/forum/#!forum/oppia-dev) or the [Gitter chat room](https://gitter.im/oppia/oppia-chat).
These issues, also tagged as 'starter projects', are usually local to a small part of the codebase. They tend to be easier, so they give you a chance to get your feet wet without having to understand the entire codebase. If you'd like some help finding an issue to work on, please don't hesitate to reach out to us at the [developers' mailing list](https://groups.google.com/forum/#!forum/oppia-dev) or the [Gitter chat room](https://gitter.im/oppia/oppia-chat)! Also, if the issue you're working on has a grey label of the form "team-name (@team-lead)", please feel free to reach out to that team lead for help or advice on that issue -- they should be able to answer questions about that area of the codebase.

For reference, here are descriptions of what the other 'TODO' tags mean:
* **[TODO: tech (instructions)](https://github.com/oppia/oppia/labels/TODO%3A%20tech%20%28instructions%29)** means that the overall solution is generally known, but newcomers to the codebase may need additional instructions to be able to implement them. Adding instructions, such as where to make the necessary changes, will help move these issues to the `TODO: code` stage.
Expand All @@ -43,6 +43,8 @@ For reference, here are descriptions of what the other 'TODO' tags mean:

## Instructions for making a code change

**Working on your first Pull Request?** You can learn how from this free series: [How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github).

*If your change isn't trivial, please [talk to us](https://gitter.im/oppia/oppia-chat) before you start working on it -- this helps avoid duplication of effort, and allows us to offer advice and suggestions. For larger changes, it may be better to first create a short doc outlining a suggested implementation plan, and send it to the dev team for feedback.*

Our central development branch is `develop`, which should be clean and ready for release at any time. In general, all changes should be done as feature branches based off of `develop`. (In case you're interested, we mainly use the [Gitflow workflow](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow), which also incorporates `master`, `hotfix-` and `release-` branches -- but you don't need to worry about these.)
Expand All @@ -61,7 +63,7 @@ Here's how to make a one-off code change. (If you're working on a larger feature

3. **Make a commit to your feature branch.** Each commit should be self-contained and have a descriptive commit message that helps other developers understand why the changes were made.
* You can refer to relevant issues in the commit message by writing, e.g., "Fixes #105".
* In general, code should be formatted consistently with other code around it; we use Google's [Python](http://google-styleguide.googlecode.com/svn/trunk/pyguide.html) and [JavaScript](https://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml) style guides as a reference. If you use [Sublime Text](http://www.sublimetext.com/), consider installing the SublimeLinter, [SublimeLinter-jscs](https://github.com/SublimeLinter/SublimeLinter-jscs) and [SublimeLinter-pylint](https://github.com/SublimeLinter/SublimeLinter-pylint) plugins, following the instructions on their respective pages. Please also ensure that your code follows [these additional style rules](https://github.com/oppia/oppia/blob/develop/CONTRIBUTING.md#style-rules).
* In general, code should be formatted consistently with other code around it; we use Google's [Python](https://google.github.io/styleguide/pyguide.html) and [JavaScript](https://google.github.io/styleguide/javascriptguide.xml) style guides as a reference. If you use [Sublime Text](http://www.sublimetext.com/), consider installing the SublimeLinter, [SublimeLinter-jscs](https://github.com/SublimeLinter/SublimeLinter-jscs) and [SublimeLinter-pylint](https://github.com/SublimeLinter/SublimeLinter-pylint) plugins, following the instructions on their respective pages. Please also ensure that your code follows [these additional style rules](https://github.com/oppia/oppia/blob/develop/CONTRIBUTING.md#style-rules).
* Please ensure that the code you write is well-tested.
* Before making the commit, start up a local instance of Oppia and do some manual testing in order to check that you haven't broken anything! After that, ensure that the added code has no lint errors and passes all automated tests by running the presubmit script:

Expand Down Expand Up @@ -123,6 +125,16 @@ General
Python
- There should be two empty lines before any top-level class or function definition.
- Prefer string interpolation over concatenation -- e.g. prefer:
```
'My string %s' % varname
```
over
```
'My string ' + varname
```
- When indenting from an open parenthesis ('('), prefer indenting by 4 rather than indenting from the position of the parenthesis. For example, prefer:
```
Expand All @@ -144,6 +156,12 @@ over
the last DUPLICATE_EMAIL_INTERVAL_MINS.
"""
```
- Never use backslashes to end a line. It's hard to tell whether they're escaping newlines, spaces, or something else. Use parentheses instead to break the line up, e.g.:
```
my_variable = (
my_very_long_module_name.my_really_long_function_name())
```
JavaScript
- We are moving away from using underscores as prefixes for variable names, so, in the future, use `var localVariable` and not `var _localVariable`. Instead, we are adopting the convention that anything declared using `var` is private to the controller/service/etc. If you want a variable to be accessible to the controller, declare it on $scope instead.
Expand Down
Loading

0 comments on commit 74e466b

Please sign in to comment.