Commit graph

74 commits

Author SHA1 Message Date
Nick Winter
6b75fb0a76 Use old China server behavior for users who have paid in the past but aren't currently subscribed 2016-09-16 10:49:05 -07:00
Rob
8359c95489 Initial draft of clever integration. 2016-09-13 15:18:19 -07:00
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
Scott Erickson
1fb7996f6c Fix EarnedAchievement.upsertFor to handle achievements that had no rewards 2016-09-08 10:32:59 -07:00
Scott Erickson
2fe28852b4 More achievement tweaks
* Clients check updated achievements as well as new ones
* Clients do not wait to keep checking
* Update achievement points along with everything else in EarnedAchievement.upsertFor
* Fix various bugs
2016-09-06 09:37:02 -07:00
Rob
9888bb7cef Display info when connected to analytics mongo like we do for LS and main. 2016-09-02 16:00:50 -07:00
Rob
888d43fc5c Change how we connect to the analytics database. 2016-09-02 15:57:26 -07:00
Scott Erickson
cf9d082ffa Have client check for achievement updates 2016-08-29 16:32:42 -07:00
Scott Erickson
139efe4cf7 Implement POST /db/user/:handle/check-for-new-achievement, couple tweaks
* Enforce being logged in for POST /db/earned_achievement
* Extend timeout for race condition user tests
2016-08-29 14:53:51 -07:00
Scott Erickson
5c8b8832b3 Refactor and better test EarnedAchievement.createForAchievement 2016-08-29 14:52:50 -07:00
Scott Erickson
ae82875c57 Refactor post new level version handler, add failed save handling
When a new version is created, the latest version is updated, then
the new one is made. If making a new one fails (most commonly due to
a name conflict), the latest version is left in a broken state. Set up
the new middleware to revert changes to latest version in this case,
and update the level handler to use the middleware. Also added
warning logs if models do not have editableProperties or postEditableProperties
set.
2016-08-25 10:28:46 -07:00
Matt Lott
22e3f445c0 Add achievement hidden property 2016-08-24 07:37:11 -07:00
Nick Winter
bfa49cbbc6 Fix sending too much and not enough data on arena sessions 2016-08-23 16:02:03 -07:00
Matt Lott
61be34a0f4 Sort courses in teacher ux
Closes #3870
2016-08-22 11:18:26 -07:00
Scott Erickson
cdba1788e7 Tweak username-should-not-be-email error message 2016-08-22 11:02:40 -07:00
Matt Lott
05159ff7c2 Support course slugs that match course names
Must be backwards compatible until we update the course slugs.

Closes #3867
2016-08-19 16:05:37 -07:00
Scott Erickson
d4af931e05 Add course (name, description) translations 2016-08-18 10:10:18 -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
Scott Erickson
a5f18f88be Add script that migrates users with email-formatted usernames 2016-08-12 14:34:08 -07:00
phoenixeliot
94e3c5a2b5 Add first/last names to Account Settings 2016-08-01 14:12:35 -07:00
Scott Erickson
053ce34faf Prevent users from signing up with or changing to an email-like username 2016-07-25 16:33:48 -07:00
phoenixeliot
b1277dc95f Merge branch 'game-dev-levels' 2016-07-21 10:14:22 -07:00
Nick Winter
cb1021e013 Fix typo in game-dev-2 ordering 2016-07-18 22:27:20 -07:00
Matt Lott
1f1132ecf8 Prioritize displaying first/last names over username 2016-07-18 12:38:29 -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
dc6a1de9fa Ordering/labeling courses: CS1, CS2, GD1, WD1, CS3, etc 2016-07-16 00:33:10 -07:00
Nick Winter
c5c831c211 Remove real-time multiplayer prototype code 2016-07-14 10:26:09 -07:00
Nick Winter
c0a70cb2ab Refactor level type checks for easy greppability (level.isType) 2016-07-14 08:58:43 -07:00
Scott Erickson
0b1e1ddcb4 Merge branch 'game-dev-levels' 2016-07-12 11:00:29 -07:00
Rob
b2bdae274f Lets just use replica strings for level session connections. 2016-07-11 18:03:09 -07:00
Rob
88bd74a5a5 Add options for separate level session database and aux level session database. 2016-07-11 16:41:13 -07:00
Nick Winter
8c48e4fc14 Remove transpiledCode and screenshot from LevelSession 2016-07-08 17:04:24 -07:00
Scott Erickson
af9f7201d0 Finish new CreateAccountModal 2016-07-07 15:56:41 -07:00
phoenixeliot
e9b7543242 Start new CreateAccountModal 2016-07-07 15:56:41 -07:00
Scott Erickson
38d19a142a Add checks to keep User purchased.gems from becoming NaN
Also sought to more thoroughly protect earned.gems.
2016-06-20 16:44:07 -07:00
Rob
b4baad82b0 Don't set up the analytics log model in proxy mode. 2016-06-17 11:41:43 -07:00
Scott Erickson
0581ffde82 Clean server test logging 2016-06-17 10:35:22 -07:00
Rob
41f062fce8 Don't make log collection plural. 2016-06-09 17:38:36 -07:00
Rob
3a9f0adba8 Switch to using actual node server to receive log events 2016-06-09 17:00:35 -07:00
phoenixeliot
c191f63c15 Revert all of my sendwithus changes
Revert "Fix more sendwithus things"

This reverts commit 9d4215d99d.

Revert "Fix some missed sendwithus changes"

This reverts commit 08bc32e005.

Revert "Fix email tests"

This reverts commit fcb2ce8504.

Revert "Use SendWithUs versioning"

This reverts commit 81d9e19221.
2016-06-06 16:54:15 -07:00
phoenixeliot
9d4215d99d Fix more sendwithus things 2016-06-06 16:48:21 -07:00
phoenixeliot
08bc32e005 Fix some missed sendwithus changes 2016-06-06 16:38:20 -07:00
Matt Lott
abc42298c6 Delay MailChimp subscribing after account creation by 30min 2016-05-31 12:30:36 -07:00
Matt Lott
4bb3ac1f0a Replace Anoner with Anonymous
Closes #3686
2016-05-26 16:54:24 -07:00
Matt Lott
6246ac0955 Send request licenses emails to Close.io sales contact 2016-05-25 16:03:08 -07:00
Scott Erickson
f0fa88206d Add Enrollment start/end dates, remove self-serve
* Refactor several related endpoints and views
* Redesign EnrollmentView, add TeacherContactModal
* Add "Enrollment Status" tab to TeacherClassView
* Delete PurchaseCoursesView and related files
* Style-flatten RemoveStudentModal
* Fix error handling in ActivateLicensesModal
* TeacherCoursesView loads faster by only loading course campaigns, and not load prepaids
2016-05-24 14:07:28 -07:00
phoenixeliot
8496343a02 Improve student account recovery
This adds the ability to verify email addresses of a user, so we know they have access to the email address on their account.

Until a user has verified their email address, any teacher of a class they're in can reset their password for them via the Teacher Dashboard. When a user's email address is verified, a teacher may trigger a password recovery email to be sent to the student.

Verification links are valid forever, until the user changes the email address they have on file. They are created using a timestamp, with a sha256 of timestamp+salt+userID+email. Currently the hash value is rather long, could be shorter.

Squashed commit messages:

Add server endpoints for verifying email address

Add server endpoints for verifying email address (pt 2)

Add Server+Client endpoint for sending verification email

Add client view for verification links

Add Edit Student Modal for resetting passwords

Add specs for EditStudentModal

Tweak method name in EditStudentModal

Add edit student button to TeacherClassView

Fix up frontend for teacher password resetting

Add middleware for teacher password resetting

Improve button UX in EditStudentModal

Add JoinClassModal

Add welcome emails, use broad name

Use email without domain as fallback instead of full email

Fetch user on edit student modal open

Don't allow password reset if student email is verified

Set role to student on user signup with classCode

Tweak interface for joinClassModal

Add button to request verification email for yourself

Fix verify email template ID

Move text to en.coffee

Minor tweaks

Fix code review comments

Fix some tests, disable a broken one

Fix misc tests

Fix more tests

Refactor recovery email sending to auth

Fix overbroad sass

Add options to refactored recovery email function

Rename getByCode to fetchByCode

Fix error message

Fix up error handling in users middleware

Use .get instead of .toObject

Use findById

Fix more code review comments

Disable still-broken test
2016-05-24 14:07:28 -07:00
Matt Lott
6f6d65a005 /courses/update-account page
Allows a user to update their account based on their current role of:
individual, student, or teacher

Closes #3647
2016-05-18 06:06:28 -07:00
Nick Winter
d0be5c1f22 Handle a couple errors I saw in the logs 2016-05-08 10:05:26 -07:00
phoenixeliot
8223122a6b Refactor and update teacher-dashboard
This updates TeacherClassView and ActivateLicensesModal to use the
new state-based rendering system, making it much snappier and less clunky
feeling, and improving data consistency.

Features also included in this:
- Hover details for progress dots in TeacherClassView
- ActivateLicensesModal has an "All Students" option and better handling
  when you switch classrooms in the dropdown
- Unenrolled/Unassigned students are shown separately in Course Progress and
  can be enrolled/assigned from there.

Add Back to Classes button on demo-request submitted view

Delete temporary patch file

Show unenrolled students separately in Course Progress (incomplete)

Migrate TeacherClassView to use orchestrator-style events, add unassigned students section, replace bootstrap tabs with state-based tabs

Convert missed instance variables to be in @state

Fix merge errors

(in progress) Convert a bunch of stuff to use state and events (removing student needs fixing)

Fix up modal interactions, some bugs

Switch state to be a Model, sync up course dropdowns

Convert student sorting to use state model

Add hover tooltips to TeacherClassView Students tab

Don't keep tooltip open when you mouse into it

Add dateFirstCompleted and Course Progress tooltips

Course Overview progress tooltips

Refactor ActivateLicensesModal

Refactors:
Uses state object for view state
Passes back the updated users in 'redeem-users' event instead of modifying given collection

Features:
Add 'All Students' dropdown option
Don't forget checked students if you change classroom from dropdown,
  but only enroll the ones visible when you click "Enroll (n) Students"

Separate enrolled students; improve style

Rearrange error text

Disable enroll-students button when none are selected

Remove console.logs

Move style-flat variables to another file

This prevents .style-flat from being copied in multiple times to the resulting CSS.

Show Unarchive button when on the page for an archived class

Move text to en.coffee

Only sort students on first classroom sync

Fix merge error

Handle sessions missing completion date in view logic instead of migration script

Listen to classroom sync more than once in case it gets unarchived
2016-05-06 13:13:11 -07:00