Commit Graph

46 Commits

Author SHA1 Message Date
Tyler Renelle e76e545e6a fix(challenges): temporarily remove $elemMatch on challenge/user/progress, see #2947 2014-03-31 19:01:08 -06:00
Tyler Renelle 9da5d4d6d4 fix(challenges): when unlinking tasks, sometimes the challenge no longer exists 2014-02-21 09:36:30 -08:00
Tyler Renelle 312685118d perf(challenges): use proper elemMatch in challenge.getMember so we
don't have to sift through which tasks are challenge tasks
2014-02-20 11:18:33 -08:00
Tyler Renelle 4f426b9d24 perf(challenges): use some query & elemMatch magic on memberCount to reduce challenges.list overhead. memberCount is now updated when leaving/joining challenges 2014-02-20 10:43:41 -08:00
Tyler Renelle dfa27b3fa2 Merge pull request #2685 from colegleason/logging
chore(logging): add Winston and replace console.log
2014-02-02 22:06:35 -08:00
Cole Gleason 36f21196f4 fix(challenges): challenge csv export now has proper filename
This sets the Content-disposition filename for the Challenge CSV export
to be {challenge_id}.csv.

Fixes #2689.
2014-02-01 12:14:24 -06:00
Cole Gleason 4494600d92 chore(logging): replace console.* with new logging module 2014-02-01 02:01:19 -06:00
Tyler Renelle 16a602f94c feat(challenges): add csv export for challenge progress. WIP, will refine this over time - but we need it something like this for the STWC come 1/31. 2014-01-22 22:47:41 -08:00
Tyler Renelle c9e083b602 challenges: add "official habitrpg challenge" option 2014-01-03 13:36:13 -07:00
Tyler Renelle 2c1eb955ac fix #1954 . Start updating API tests, beginning with challenges. Use
test to fix "challenge updates not updating users' tasks"
2014-01-03 00:01:24 -07:00
Brandon McPhail bf41216a9b Fixed challenge prize logic to avoid double paying 2013-12-13 15:48:18 -08:00
Tyler Renelle ee1cd3c05d [#1977] APIv2 WIP - start of a framework where operations are shared
between client & server. If the op is called on the client, it updates
the user & then POSTs to the server with op of the same name. If called
on server, it updates the user and user.save()s
2013-12-11 21:42:57 -07:00
Tyler Renelle 460afb7763 [#1829] sort by timestamp, show group & creator in challenge header 2013-11-15 18:57:35 -08:00
Tyler Renelle 72f64fa85c [#1751] /challenges/:cid/:mid task filtering by "in this challenge" at
application level, not Mongo. $elemMatch doesn't support returning
multiple items, see http://goo.gl/MxmWdQ & http://goo.gl/Iku44w
2013-11-10 23:41:42 -08:00
Tyler Renelle 3e6eaf6f2f sanitize challenge update 2013-11-04 12:19:40 -08:00
Tyler Renelle b7479e7839 use $elemMatch for better performance on fetching challenge participants 2013-11-04 00:27:44 -08:00
Tyler Renelle 452c4e1ece [#1729] move most chal-user syncing logic to their models rather than
controllers. don't sync task.value or task.history over to user on
challenge.join()! some work-arounds for the task._id/id mismatch (still
not perfect, need to work on some more)
2013-11-03 22:33:53 -08:00
Tyler Renelle 7060f75c83 [#1741] remove _id from TaskSchema (we're too deep in our legacy task.id
requirement, we can revisit later)
2013-11-03 21:17:33 -08:00
Tyler Renelle 62012a1052 fix adding challenges as subdoc to groups. write migration to restore those that have been created. Also in migration fix missing task.ids (taskSchema issue) 2013-11-02 18:05:14 -07:00
Tyler Renelle 989bdc245b challenges: fix adding new tasks on update 2013-11-02 15:19:56 -07:00
Tyler Renelle 8ae75e09c5 [#1716] use ui-router to collapse challenge participants (WIP) 2013-11-01 23:46:14 -07:00
Tyler Renelle cc5126f09b challenges: 404 challenge not foudn on GET /challenge/:cid 2013-11-01 00:30:39 -07:00
Tyler Renelle dfeae89a07 challenges: minimum 1 gem for public challenges 2013-10-31 19:30:07 -07:00
Tyler Renelle 58fa97fb19 challenges: shortcode for tag names & task tooltips 2013-10-31 18:18:34 -07:00
Tyler Renelle 0ce76ee689 [#1673] challenges: better tag-syncing, show tag bull-horn 2013-10-31 17:49:51 -07:00
Tyler Renelle 287beb363f challenges: chal creator auto-joins 2013-10-31 16:50:22 -07:00
Tyler Renelle b3804c4d1f [#1675] fixes to populating Group.challenges, and display challenges in party
page. I'm not sure about having challenges as a subdoc anymore, i think
it will be better performance and maintenance if we just reference
Challenge.group/members and remove User.challenges & Group.challenges
2013-10-31 16:20:48 -07:00
Tyler Renelle 4afcd406f5 [#1675] GET /challenges retrieves challenges in groups I belong to. As a result,
we need to be sure to manage adding/removing Group.challenges properly
2013-10-31 15:48:21 -07:00
Tyler Renelle 14b5044fd7 [#1695] add access control to update/deleting challenges 2013-10-31 15:32:30 -07:00
Tyler Renelle 238d796ec4 [#1677] only set TASK_DELETED on tasks in current challenge (don't clobber other
challenges)
2013-10-31 14:52:24 -07:00
Tyler Renelle 4a442d924e challenge: small tweaks on descriptions 2013-10-31 14:16:01 -07:00
Tyler Renelle d5e78266e5 challenge prize: various fixes. Woo, challenge prizes work now!
@sabrecat @lemoness @wc8 (still some bugs & cleanup, but it's mostly there)
2013-10-31 14:06:18 -07:00
Tyler Renelle 693061c77b challenge prize: award winner 1 achievement and challenge.prize gems. then close challenge. 2013-10-31 13:57:12 -07:00
Tyler Renelle 9d15e724e2 challenge prize: award winner 1 achievement and challenge.prize
gems. then close challenge.
2013-10-31 13:49:31 -07:00
Tyler Renelle 35e6f40cb6 challenge gems: deduct gems from group.balance & user.balance on the server 2013-10-31 12:39:10 -07:00
Tyler Renelle 13fa947c57 challenge prize: add to challenge creation form (including min/max validation) 2013-10-31 11:44:50 -07:00
Tyler Renelle 9e8cdac06f [#1676] show memberCount on challenges.list. will follow up on ticket for reasoning 2013-10-31 09:17:40 -07:00
Tyler Renelle bbb4a9152b [#1674] don't sync challenge to user until after challenge is
saved (delete still not working)
2013-10-31 01:24:13 -07:00
Tyler Renelle ea54f0aa75 challenges: implement basic filters on challenges tab 2013-10-30 01:21:44 -07:00
Tyler Renelle d116ac7b81 challenges: lots of misc. bug fixes 2013-10-29 22:30:58 -07:00
Tyler Renelle 02ebc536ca challenges: get Challenges (mostly) working along the same ui-router
principles as groups. Having some $scope variable resolution timing issues
2013-10-29 17:49:49 -07:00
Tyler Renelle d62586ef0a challenges: stats setup 2013-10-28 11:34:08 -07:00
Tyler Renelle a078889d58 challenges: sync score to challenge, lotsa bug fixes 2013-10-28 11:34:07 -07:00
Tyler Renelle e52d0a156a challenges: better syncing of new, updated, & deleted tasks from
challenge to user. start with task.challenge.broken code
2013-10-28 11:34:07 -07:00
Tyler Renelle d60a56432f challenges: better unlinkig of tasks on unsubscribe 2013-10-28 11:34:07 -07:00
Tyler Renelle fa25f3d300 challenges: WIP beginning challenges feature. some basic CRUD & some
basic subscribe / unsubscribe functional (but buggy)
2013-10-28 11:34:07 -07:00