Commit graph

625 commits

Author SHA1 Message Date
Scott Erickson
7bab895dee Generalize new I18N view system
Previously, when diplomats submit translations, the system
would try to figure out whether it should be a 'patch' or a 'change',
and then would either create a patch for an admin or artisan to
review and accept or reject, or would apply the changes immediately
and they would be live. This was done as a compromise between
getting translations live quickly, but also preventing already-translated
text from getting overwritten without oversight.

But having the client handle this added logical complexity. So
this makes all diplomats submit patches, no matter what. The server
is then in charge of deciding if it should auto-accept the patch or not.
Either way, a patch is created.

There was also much refactoring. This commit includes:

* Update jsondiffpatch so changes within array items are handled correctly
* Refactor posting patches to use the new auto-accepting logic, and out of Patch model
* Refactor POST /db/patch/:handle/status so that it doesn't rely on handlers
* Refactor patch stat handling to ensure auto-accepted patches are counted
* Refactor User.incrementStat to use mongodb update commands, to avoid race conditions
* Refactor Patch tests
2016-09-09 10:59:26 -07:00
Matt Lott
3dcfa2cc8a A/b test default language in home product 2016-09-02 15:33:29 -07:00
Scott Erickson
77e45072a5 Remove justPlayCourses heuristic, replace with isStudent, remove old HomeView 2016-09-01 10:41:43 -07:00
Scott Erickson
652c5237aa Fix updateI18NCoverage, handles i18n objects with nothing to translate, fix #2630 2016-08-30 14:17:40 -07:00
Scott Erickson
cf9d082ffa Have client check for achievement updates 2016-08-29 16:32:42 -07:00
Matt Lott
f391030b44 Add hints test group distinction comments 2016-08-24 12:05:40 -07:00
Scott Erickson
7d9d42a23f Fix i18nCoverage bug
Sometimes, translations is undefined, so check that it exists
2016-08-23 13:33:51 -07:00
Scott Erickson
ef0547f72a Simplify applying licenses
In TeacherClassView, when a teacher assigns a paid course to any unenrolled
student, the view automatically enrolls those students, rather than requiring
the teacher to enroll those students manually first. Update copy throughout.

Also add back (smaller) padding to progress dots in TeacherClassView.
2016-08-23 10:43:31 -07:00
Matt Lott
61be34a0f4 Sort courses in teacher ux
Closes #3870
2016-08-22 11:18:26 -07:00
Matt Lott
b647252956 Update /courses UI 2016-08-17 14:15:52 -07:00
Nick Winter
8ec17265dc Give China server all free levels but hide paid levels (#3855)
* Give China server all free levels but hide paid levels

* Don't prompt to buy gmes on free-only server on insufficient gems for item/hero purchases
2016-08-17 10:00:56 -07:00
Matt Lott
84e3ee270a Add primer level support to classroom Ux
Exclude levels if classroom.aceConfig.language == level.primerLanguage

Closes #3856
2016-08-16 16:52:17 -07:00
Scott Erickson
e9c7edb6be Fix populate i18n to also populate thang component configs 2016-08-15 11:54:04 -07:00
Phoenix Eliot
e91a15338e Add View Project buttons to /courses 2016-08-11 16:38:14 -07:00
Scott Erickson
d679700966 Disable SuperModel retrying
Seems to be causing issues when requests retry with different parameters,
for example:

https://github.com/codecombat/codecombat/blob/master/app/views/NewHomeView.coffee#L42-L45

This retries without the original GET parameters and returns a 403 as a result.
2016-08-11 09:44:36 -07:00
Phoenix Eliot
a4f48bbc17 Add tests for SuperModel load retrying
Clear timeouts after each test
2016-08-10 15:28:33 -07:00
Phoenix Eliot
d3db19dee3 Report timeout problems, and fix retries
Fix getting model URLs
2016-08-10 15:28:25 -07:00
Scott Erickson
f4c0e4144e Add some comments and a TODO for the supermodel retrying system 2016-08-05 13:23:44 -07:00
Nick Winter
6917843018 Add a couple animations to defaultActions while game-dev lazy rendering isn't working 2016-08-03 13:32:49 -07:00
phoenixeliot
5dc3ebe9b1 Include other timeout error codes for good measure 2016-08-02 14:25:14 -07:00
phoenixeliot
36449bb6b6 Account for both types of timeouts in retry logic 2016-08-02 14:18:26 -07:00
phoenixeliot
eaaea6f08b Retry models when they time out 2016-08-02 13:42:56 -07:00
phoenixeliot
a47bdc084a Allow admins to become teachers 2016-07-28 15:28:31 -07:00
Scott Erickson
34310642c7 Add destudent and deteacher buttons to AdministerUserModal 2016-07-25 16:09:24 -07:00
Matt Lott
9962ff83d4 Level editor play classroom options 2016-07-23 21:03:19 -07:00
Scott Erickson
b1c69b686c Add admin button to update course content for classrooms 2016-07-21 15:16:17 -07:00
phoenixeliot
b1277dc95f Merge branch 'game-dev-levels' 2016-07-21 10:14:22 -07:00
Matt Lott
1f1132ecf8 Prioritize displaying first/last names over username 2016-07-18 12:38:29 -07:00
phoenixeliot
4e449fea3b Fix gplus/fb signin and tests 2016-07-18 11:41:18 -07:00
phoenixeliot
bb6262483f Allow username-only signup for classroom users
Address some code review feedback

Correct error code in test

Don't try to send emails to empty addresses

Add tests for subscriptions

Add tests for Next Steps email

Fix specs

Add reason for disabled test
2016-07-18 10:41:17 -07:00
Nick Winter
b64bcd9f02 Use shareable false/true/'project' for different levels of shareability 2016-07-15 23:26:43 -07:00
Nick Winter
5d26b03918 Add buttons to view game/web-dev levels to courses views 2016-07-15 21:57:04 -07:00
Nick Winter
5f95a4d158 Play game-dev levels without API restrictions. Show game button in CourseDetailsView only when appropriate. 2016-07-15 20:47:09 -07:00
Nick Winter
224ad54bdd View web dev levels. Add proper victory modal game/webpage share links. Fix playing game dev levels. Add generic change transition to all web-dev pages. 2016-07-15 20:03:12 -07:00
Scott Erickson
ab704a1cab Merge remote-tracking branch 'origin/web-dev-levels' into game-dev-levels
# Conflicts:
#	app/views/play/level/PlayLevelView.coffee
2016-07-15 16:01:57 -07:00
Scott Erickson
10ca59d10f Have CourseVictoryModal used for course-ladder levels 2016-07-15 15:54:22 -07:00
Nick Winter
1e89775486 Basic campaign mode victory modal hookup for web-dev levels 2016-07-15 09:53:16 -07:00
Scott Erickson
61caf3dcd3 Merge branch 'master' into game-dev-levels 2016-07-14 15:50:04 -07:00
Nick Winter
c5c831c211 Remove real-time multiplayer prototype code 2016-07-14 10:26:09 -07:00
Nick Winter
349ab24da7 First pass at adding 'web-dev' level type 2016-07-14 09:38:45 -07:00
Nick Winter
c0a70cb2ab Refactor level type checks for easy greppability (level.isType) 2016-07-14 08:58:43 -07:00
Nick Winter
87ed53b24b Merge branch 'master' into web-dev-levels 2016-07-14 08:26:27 -07:00
Scott Erickson
45c8c2006d Quick fix LevelSessions require error
In areas of the site that do not have lib/aether_utils, the require broke because it's
fetched only sometimes through the ModuleLoader.
2016-07-13 16:05:41 -07:00
Nick Winter
f88223b994 Fix spawning Hero kind ThangTypes in game-dev levels 2016-07-13 14:20:22 -07:00
Scott Erickson
d7a2219b16 Refactor PlayGameDevLevelView to use promises 2016-07-13 13:28:54 -07:00
Scott Erickson
1b7ac76b9f Add loading and playing to PlayGameDevLevelView 2016-07-13 11:43:25 -07:00
Nick Winter
872e83e9b7 Don't use course hero in verifier / level editor for type: 'course' level 2016-07-13 10:04:43 -07:00
Scott Erickson
b2bb129cbf Add realTimeInputEvents to world and gameUIState, with just mousedown events 2016-07-08 14:17:07 -07:00
Scott Erickson
af9f7201d0 Finish new CreateAccountModal 2016-07-07 15:56:41 -07:00
Scott Erickson
fe1598cab2 Implement multi-select, remove click-to-navigate from level editor 2016-06-28 09:20:05 -07:00