Commit graph

1182 commits

Author SHA1 Message Date
Scott Erickson
429f50e1c6 Untie CourseInstance creation from prepaids, tie them to classrooms instead 2015-11-03 11:18:44 -08:00
Nick Winter
c6bb5b5329 Improve indexing for /editor/level and editor/thang 2015-11-03 09:32:59 -08:00
Scott Erickson
27d423a410 Add Classroom server model and endpoints 2015-11-02 17:07:23 -08:00
Scott Erickson
513c7e7a07 Add POST /db/prepaid/:id/redeemers 2015-11-02 15:23:08 -08:00
Scott Erickson
7a237d27c2 Add redeemers.userID index to prepaids collection 2015-11-02 13:35:47 -08:00
Scott Erickson
c3735ba0eb Add exhausted property to prepaid model
It is true when redeemers.length >= maxRedeemers
2015-11-02 13:06:58 -08:00
Nick Winter
caab006c5e Merge pull request #3149 from dillonforrest/master
Change visible references of 'HipChat' to 'Slack'.
2015-11-02 10:32:48 -08:00
Scott Erickson
fa4355f946 Add programming language to options in course instances 2015-10-30 15:56:43 -07:00
dillon
b5d92d5c26 Change 'Slack' back to 'HipChat' in multicore and server. 2015-10-30 15:26:18 -07:00
Nick Winter
da9567f85f Add Wakka Maul to simulation rotation 2015-10-30 09:45:07 -07:00
Nick Winter
acdfe7c1c4 Use level instead of levelID for getHistogramData to hit the index we already have 2015-10-30 09:25:58 -07:00
dillon
493d302a0d Change visible references of 'HipChat' to 'Slack'. 2015-10-30 00:07:58 -07:00
Matt Lott
8b254164c9 Free course enrollment for admins 2015-10-29 14:09:19 -07:00
Nick Winter
6f3bd848a9 Do user level sessions sort post-fetch\n\nOtherwise it would blow Mongo's sort memory limits if done during the query on large sessions fetches like on my user page, and we don't need to sort then anyway 'cause we're grabbing all the sessions. 2015-10-29 05:44:54 -07:00
Scott Erickson
9e04d425cc Levels link in ControlBarView goes to last visited course instance page for course levels 2015-10-27 17:04:07 -07:00
Nick Winter
110ee58b71 Fix 3126: campaigns not respecting i18n-coverage query 2015-10-22 06:42:42 -07:00
Nick Winter
e15b30893f Note tournament end, undo tournament simulation bias 2015-10-15 06:32:52 -07:00
Scott Erickson
cbf6032c68 Merge branch 'origin/spritesheets' 2015-10-14 15:03:34 -07:00
Nick Winter
d814ea9e22 Remove erroneous 256 from user handler 2015-10-14 06:02:00 -07:00
Scott Erickson
39bddb889e Have LayerAdapter use prerendered spritesheets (unfinished) 2015-10-13 16:43:56 -07:00
Nick Winter
d776809e1c Update Hour of Code student flow and tracking, remove signup requirement 2015-10-13 08:12:07 -07:00
Scott Erickson
66650452b2 Merge remote-tracking branch 'origin/master' 2015-10-12 16:47:59 -07:00
Scott Erickson
919e0605e9 Add spriteSheets to ThangType, export modal to Thang Editor
Units can be exported as rastered sprite sheets. This is the first part of the project,
the second part will be having the game use them.
2015-10-12 16:47:48 -07:00
Matt Lott
2d8d107a58 Update Handler admin get query params
Unclear how this was supposed to work before these changes.
2015-10-09 14:26:04 -07:00
Nick Winter
5dde55c1f3 Add premium server recognition for Brazil 2015-10-09 08:05:34 -07:00
Matt Lott
1c1a5d4295 /courses student mode when _ppc present 2015-10-08 06:10:12 -07:00
Matt Lott
ce4afe187a Update course invite email subject and body with course name 2015-10-07 17:24:28 -07:00
Matt Lott
3eb450631a 🐛Restrict course level progress to course levels 2015-10-07 16:58:59 -07:00
Matt Lott
d95cbc0627 Course instance redeem API returns 200 for double redeem
If a user has already redeemed course prepaid code, return 200 and the
related course instances.  Simplifies client-side experience.
2015-10-07 15:14:26 -07:00
Matt Lott
32441f1c8d Only generate lowercase prepaid codes
Will be easier to make them case-insensitive later if needed.
2015-10-07 14:06:09 -07:00
Matt Lott
75b9cb50d9 Add /courses prepaid code query var
Update invite students link to go to /courses
2015-10-06 12:30:22 -07:00
Cat Sync
d09711be37 Added test for parallel subscription redeems, more informative redeem error messages, more robust prepaid update when redeeming 2015-10-06 15:23:47 -04:00
Matt Lott
9c7345fed0 Redeem course prepaid code on /courses page
Completes #54270566052118
2015-10-06 11:20:57 -07:00
Scott Erickson
ff69bb8c89 Add course level session creation permission checking to level_handler 2015-10-06 11:08:03 -07:00
Scott Erickson
3a90356f59 Add class invite system 2015-10-05 16:01:32 -07:00
Matt Lott
5095eac4ac Purchase prepaid on course instance creation
Updating purchase prepaid API to support courses.
Refactoring the prepaid server code.

Completes #54270567235517
2015-10-01 15:23:20 -07:00
Cat Sync
d4b9860c33 Send hipchat message for prepaid purchase 2015-09-30 15:13:33 -04:00
Matt Lott
c6caafb7cd Remove extra Stripe call in sub prepaid redeem 2015-09-25 14:06:51 -07:00
Matt Lott
928f72e2cf Merge branch 'prepaid-v2' into master 2015-09-25 10:28:27 -07:00
Nick Winter
b4f500333f Assign pt-BR or zh-HANS for those domains 2015-09-18 08:38:12 -07:00
Nicholas Winter
bce3b94a85 Fix #2970: Turn admin off by default on localhost 2015-09-14 09:39:48 -07:00
Matt Lott
b68e5e209b Update course details page 2015-09-12 22:02:03 -07:00
Nicholas Winter
3eeb9a6a26 Reset some stuff for Ace of Coders and Robot Ragnarok. Put multiplayer link back now that we have two good mirror match levels and aren't listing the old arenas. 2015-09-12 06:54:14 -07:00
Nick Winter
4d68080c4c Bumped up Ace of Coders simulations for the tournament. 2015-09-09 21:54:22 -07:00
Nick Winter
b13504eeb5 Watching out for finding a null session when getting two games. 2015-09-09 08:59:33 -07:00
Nick Winter
b1fd171a27 Opening up the ladder tab view by hiding the FB/G+ ladder column for now. Adding submitted dates to the leaderboards. 2015-09-08 06:44:26 -07:00
Nick Winter
0d2d1ddad0 A couple mirror match ladder tweaks. Made programmableMethods other code languages use proper code formatting. 2015-09-07 18:00:48 -07:00
Nick Winter
98b0bcfc75 Fixed playback victory message for spectate mode. Spectate mode now opens in new tabs. 2015-09-03 15:05:10 -07:00
Matt Lott
58880b23af Add description to tower payment messages 2015-09-03 13:35:24 -07:00
Matt Lott
9131d8668f Course enroll page
Will add a prepaid purchase once the prepaid-v2 branch is merged into
master.
2015-09-03 11:04:52 -07:00
Michael Schmatz
be80b1e355 Add Sao Paulo database condition 2015-09-02 12:33:48 -04:00
Matt Lott
8de00767b3 Initial courses object model 2015-08-29 07:15:39 -07:00
Nick Winter
d412a7d5ee Fixed blank duel stats bar in single player, oops. Handling getTwoGames from non-logged-in users. 2015-08-28 10:45:07 -07:00
Matt Lott
e10c5d9646 Allow year sub purchases on top of monthly subs
Monthly sub is cancelled, terminal sub of 1 year + remaining month is
added.
2015-08-27 09:45:10 -07:00
Matt Lott
5faeb82d17 Extend terminal sub with year sub purchase 2015-08-27 09:45:10 -07:00
Matt Lott
264767e9e8 Add HipChat msg for Stripe payments 2015-08-26 15:37:58 -07:00
Matt Lott
761402b117 Add hipchat msg for year sub sale 2015-08-26 15:31:22 -07:00
Matt Lott
9c492a2d4b 🐛Increment gems for year sale purchase 2015-08-24 10:54:06 -07:00
Matt Lott
9e222d0873 Add subscription sale
Give a discount for purchasing a year
New sale button on subscribe modal
New subscription sale landing page
2015-08-21 11:19:39 -07:00
Nick Winter
256b19d331 More improvements and fixes for league ladder pages. 2015-08-21 03:28:25 -07:00
Nick Winter
96b838da03 Fixed league-based simulation randomness. 2015-08-20 05:54:10 -07:00
Nick Winter
da0b7d3e64 Merge pull request #2955 from codecombat/leagues
Leagues!
2015-08-19 15:34:54 -07:00
Nick Winter
f4d796a717 More ladder page support for leagues. Linking to clan league pages from clans pages. 2015-08-19 15:30:37 -07:00
Matt Lott
0fee075470 🐛Fix sponsored subscription error logging bug 2015-08-17 15:49:49 -07:00
Nick Winter
6f2b1b2a41 Added back an index we need on LevelSession, but in code this time instead of just from the shell as 'weird query index'. 2015-08-15 12:44:19 -07:00
Nick Winter
32ca453dec Added /play/ladder/levelID/clan/clanID clan-specific ladder pages. 2015-08-15 06:45:38 -07:00
Nick Winter
bda2483738 Added league-based ladder game simulation. 2015-08-15 05:38:47 -07:00
Nick Winter
f757f220be Refactored scoring.coffee into separate files per route plus a scoringUtils file, and cleaned up a few of the verbose methods. 2015-08-13 11:17:38 -07:00
Matt Lott
05a9013164 Remove deprecated prepaid schema properties 2015-08-13 11:13:15 -07:00
Matt Lott
9c39bf7656 Update prepaids to support multiple redeemers for a single code
Will remove deprecated properties after updating production.
2015-08-12 15:51:18 -07:00
David Liu
7d64087e29 Fix the headless simulator
Shims `lscache`, support io.js < v3.0.0. Make simulating `one-game`
possible.

Tested on Linux with Node.js v0.10.40 and v0.12.7; as well as io.js
v2.5.0.

It still won't work with io.js v3.0.0 because `webworker-threads`
doesn't compile properly, so that's another problem.
2015-08-10 18:12:53 -07:00
Nick Winter
cd0c252b14 Disabled some logging now that chinaVersion appears to be working. 2015-08-08 12:26:20 -07:00
Matt Lott
0768b533e2 Subs dashboard perf
Caching older (at least 16 days) Stripe invoices in analytics
collection, which will be updated once a day via the analytics server
cron job.
2015-07-31 16:19:40 -07:00
Nick Winter
fc0a6513f3 Fixing some bugs in the geoip and language detection stuff. 2015-07-31 14:32:32 -07:00
Matt Lott
822d25984f Merge pull request #2910 from trotod/fix-clan-details-style
Fix clan details style
2015-07-29 10:22:36 -07:00
Matt Lott
f89bb8ac0f Subs dashboard perf
Update sub sponsors API to use payments collection before users
collection to whittle down potential sponsors.
2015-07-28 09:11:55 -07:00
Nick Winter
e43addf55b Debugging chinaVersion inconsistencies. 2015-07-27 11:35:20 -07:00
David Liu
b5d7791e84 Custom hero portraits
Though missing the raider and necromancer from the spritesheet
2015-07-26 12:40:55 -07:00
Nick Winter
899aae5798 Consolidated extra resources. 2015-07-10 14:20:25 -07:00
Matt Lott
7620ba00ad 🐛Remove stripe_invoices API caching 2015-07-09 13:28:55 -07:00
Matt Lott
c25c5e8f97 Improve sub_sponsors API perf 2015-07-09 13:16:57 -07:00
Matt Lott
b6724b9d8d bug:Fix subscriptions API variable naming collision 2015-07-09 12:21:32 -07:00
Matt Lott
6831355649 🐛Fix subs dashboard monthly churn and perf
Use Stripe events API to calculate monthly churn.
Move Stripe API page handling to the client.
2015-07-08 17:34:34 -07:00
Nick Winter
b0c7b50761 Added programming concept tags to campaign and level editor. 2015-06-30 11:27:58 -07:00
Nick Winter
270340a79f Removed Learnable. 2015-06-24 09:18:13 -07:00
Matt Lott
b12b7e8ca4 Add user deletion date
Fixes #2734
2015-06-18 15:17:56 -07:00
Matt Lott
72e458cc80 Unsubscribe deleted users
Fixes #2733
2015-06-18 15:02:19 -07:00
Matt Lott
d4d4d7bb25 🐛Fix sub handler error typo 2015-06-18 15:02:19 -07:00
Matt Lott
5c240d89cd Cancel recipient subscriptions immediately 2015-06-17 16:35:30 -07:00
Nick Winter
f7eaf91bae Hopefully making Systems editable by Artisans. 2015-06-14 12:49:45 -07:00
Matt Lott
32b10b33e4 Update gem charge statement descriptors
Shown on bank statements and credit bills.
2015-06-05 14:58:44 -07:00
Matt Lott
e46613bf7f Update trial request hipchat msg
Link to trial-requests approval page.
2015-06-05 11:27:53 -07:00
Matt Lott
d7cddcb136 Teacher trial subscription form
Add a teacher survey form for applying for a free trial subscription
for evaluation purposes.
Add an admin trial requests review page, where admins can approve/deny
requests.
2015-06-05 06:48:19 -07:00
Imperadeiro98
a85e6fb695 Removed unnecessary full stop 2015-06-02 21:34:01 +01:00
Matt Lott
9828bd5d1d Sponsored sub cleanup on unsubscribe
Sponsored subscriptions can be partially set up when the incremental
subscription charge fails.  This cleans up the sponsored subscriptions
when one of the recipient subscriptions is cancelled.

Related to #2786
2015-05-28 16:56:13 -07:00
Nick Winter
bb17621b47 Don't let the server die when a sponsored subscription's sponsor can't be found. 2015-05-25 14:03:07 -07:00
Nick Winter
bebe2dde21 Adding a log to check out what's going on with updating of sponsored subscriptions. 2015-05-25 09:58:25 -07:00
Matt Lott
a8a55021b9 🐛Fix unpaid charges yield payments
Unpaid charges should not be recorded as successful payments in our
database.  Was happening when opening the buy gems modal again.
2015-05-19 11:41:11 -07:00
Nick Winter
6e8ff798a1 Fixed missing paren in c40b8b1e. 2015-05-19 10:56:12 -07:00
Nick Winter
c40b8b1e5d Not sending patch created emails to Nick/George/Scott. 2015-05-17 12:17:53 -07:00
Matt Lott
08eff2b489 🐛Fix admin dashboard invoice sorting
Bug was introduced by recent perf work.
2015-05-13 16:25:28 -07:00
Matt Lott
50f340ffbe Update admin dashboard
Caching invoices again, but using a different method.
2015-05-12 10:09:08 -07:00
Nick Winter
b7d1ab2b01 Not sending HipChat messages for level load errors. Not sending level load errors for level editor loads. Not sending more than one level load error report per session. 2015-05-11 18:53:42 -07:00
Matt Lott
6dc51e27e4 🐛Admin dashboard deleted users
Also disabling invoice caching to see if that is what causes invalid
sub end counts.
2015-05-11 10:37:44 -07:00
Matt Lott
dd35a1eb76 Include sponsored cancels in dashboard
Also includes free teacher sub cancels, which should be an
insignificant number.
2015-05-08 11:34:59 -07:00
Matt Lott
0353be4fc4 Add recent cancellations table to dashboard 2015-05-06 15:23:46 -07:00
Matt Lott
67ee4e99a7 Remove subscription API debugging code
This was being used to debug analytics event logging problems in
production.  Turned out to be a too many open files problem, unrelated
to this code.
2015-05-06 11:34:20 -07:00
Matt Lott
340713e721 Add subscription API debugging
Investigating elevated sub end counts in production over time from the
subscriptions API.
2015-05-06 11:34:20 -07:00
Matt Lott
a652b70728 Update admin dashboard conversion types 2015-05-04 17:38:34 -07:00
Matt Lott
1f7178bac7 Update analytics log collection index
Indexes already updated on live analytics database.
2015-05-02 18:28:47 -07:00
Matt Lott
afc3689dcc Optimize recent subs api 2015-05-01 16:08:12 -07:00
Matt Lott
1ac249565a Add debug logging to recent subs API
Unclear why this isn’t working in production.
2015-05-01 11:08:17 -07:00
Matt Lott
5305d80887 Add conversion info to admin dashboard 2015-05-01 09:37:47 -07:00
Nick Winter
35726bf41c Trying to handle when earned achievements aren't created via POST. 2015-04-30 09:06:41 -07:00
Nick Winter
a4964ea36e Reduced transactional email sends a bit. 2015-04-27 15:06:26 -07:00
Nick Winter
80af32180c Fixed #1638: detect and automatically report unrecoverable world loading errors, plus adding better instructions for checking dev console. We can't recover yet, but having eyes on it will hopefully give us better visibility on this kind of error. 2015-04-25 17:29:02 -07:00
Matt Lott
f41b0bd4dd Sort clan members list alphabetically 2015-04-24 14:22:00 -07:00
Matt Lott
1e688f1d61 Clan details view solution
Click on a level progression cell to observe the level session in a new
tab.
2015-04-23 14:31:21 -07:00
Matt Lott
59de47069a Add sponsored subs to admin dashboard 2015-04-23 13:34:43 -07:00
Matt Lott
502a47e912 Admin dashboard perf
Find subscription cancellations via events API instead of walking each
customer and their subscriptions.
2015-04-21 15:58:45 -07:00
Matt Lott
559b9533c4 🐛Fix clan name and description editing
#Fixes 2693
2015-04-21 14:12:01 -07:00
Matt Lott
4515c8f765 🐛Add user getClans undefined check 2015-04-21 11:22:17 -07:00
Matt Lott
0b10954018 🐛Fix clans details member levels 2015-04-21 10:08:51 -07:00
Matt Lott
474986f3cb Admin dashboard perf work
Cache invoices on app server, assume they are always fetched most
recent to least.
2015-04-20 17:10:41 -07:00
Matt Lott
c9a7f6773d Speed up clan details page
Only fetch level sessions and achievements for 200 members.
Display members with more data first.
Show average clan achievements instead of total achievements.
General css cleanup.
2015-04-20 16:20:52 -07:00
Matt Lott
a6fbaba469 Update clan query selectors 2015-04-20 15:18:05 -07:00
Matt Lott
c900310c8e Merge branch 'clans' 2015-04-20 14:42:48 -07:00
Matt Lott
f80a73ae9b Decouple clan type from dashboard details
Adding dashboardType field, private clans automatically set this to
‘premium’.
2015-04-20 14:04:22 -07:00
Nick Winter
cea5798b10 Fixed Clans DatabaseError without error giving the server heart attacks. 2015-04-20 09:09:42 -07:00
Nick Winter
f58d51d4a9 Fixed anonymous requests to get simulator leaderboards to not assume that you have a user. 2015-04-19 14:52:10 -07:00
Nick Winter
dc90481a5c Fixed #2458, I think. 2015-04-18 19:57:37 -07:00
Matt Lott
45c070209b Update private clans dashboard 2015-04-16 15:26:14 -07:00
Nick Winter
4de9071f1a Added a projection to Clans getMemberSessions to help with the gargantuan fetch running us out of memory. 2015-04-16 08:03:19 -07:00
Matt Lott
2b29e755fe Make clan name and description editable 2015-04-15 11:09:43 -07:00
Nick Winter
8649383a8c Fixed #2416: LadderTabView now shows hero portraits. 2015-04-13 16:17:22 -07:00
Nick Winter
e6cef389cd Simplified some of scoring.coffee and dramatically reduced the amount of database work recordTwoGames is doing. 2015-04-12 21:57:47 -07:00
Nick Winter
c40123f656 Removed a log. 2015-04-12 17:26:39 -07:00
Nick Winter
eb075b99a0 Fixed #2448 with better random session query distribution. 2015-04-12 11:34:19 -07:00
Matt Lott
4669d4cb0a Update admin subs dashboard
Break up lengthy server calls to reduce timeouts in production.
2015-04-11 10:36:03 -07:00
Nick Winter
f8beed9ce8 Fixed #2464. Well, let's see if it works. 2015-04-10 16:57:16 -07:00
Matt Lott
bc35a27750 Private clans server updates
Only return private clans in lists to owners.
Get for specific private clan still allowed.
Restrict create/join private clan to premium users.
2015-04-10 16:04:36 -07:00
Matt Lott
5c40221ab2 Update admin subs dashboard
Using invoices to aggregate totals which should provide a more accurate
growth rate.
2015-04-10 11:27:59 -07:00
Nick Winter
fc43803588 Fixed ladder match links in ladder update emails. 2015-04-10 08:17:51 -07:00
Nick Winter
9ee0400c18 Updated to just send out tell-a-parent emails, no tell-a-friend emails. 2015-04-08 21:48:21 -07:00
Nick Winter
98b749eb1b Making simulator stuff more efficient by using less bandwidth. 2015-04-08 12:00:23 -07:00
Nick Winter
f02a8b54f3 Fixed #2596. Stopped bless-brunch from using its cacheBuster feature. Set no-cache header for /db/model.type/slug so that we can use Cloudflare on /db/model.type/object-id. Fixed a coffeelint warning. 2015-04-07 19:03:35 -07:00
Matt Lott
3c755d39e6 Add recent subscribers to admin dashboard 2015-04-07 15:00:53 -07:00
Nick Winter
603f9f9a37 Fixed issue where some sessions would not grant proper leaderboard replay access. 2015-04-07 14:51:18 -07:00
Nick Winter
7f41ad6c52 Added OSTraining and Breakout Mentors resources. 2015-04-07 09:25:42 -07:00
Matt Lott
9d6e5fe20b Clan analytics
Hook up server-side operations.
2015-04-06 16:27:56 -07:00