diff --git a/common/models/user.js b/common/models/user.js index 8f79fe6b758..c51709a406e 100644 --- a/common/models/user.js +++ b/common/models/user.js @@ -7,7 +7,7 @@ import { saveUser, observeMethod } from '../../server/utils/rx'; import { blacklistedUsernames } from '../../server/utils/constants'; const debug = debugFactory('freecc:user:remote'); -const BROWNIEPOINTS_TIMEOUT = [30, 'seconds']; +const BROWNIEPOINTS_TIMEOUT = [1, 'hour']; function getAboutProfile({ username, @@ -35,6 +35,11 @@ module.exports = function(User) { delete User.validations.email; // set salt factor for passwords User.settings.saltWorkFactor = 5; + // set user.rand to random number + User.definition.rawProperties.rand.default = + User.definition.properties.rand.default = function() { + return Math.random(); + }; // username should not be in blacklist User.validatesExclusionOf('username', { diff --git a/common/models/user.json b/common/models/user.json index aaaf610d076..62883cf9767 100644 --- a/common/models/user.json +++ b/common/models/user.json @@ -152,6 +152,10 @@ } ], "default": [] + }, + "rand": { + "type": "number", + "index": true } }, "validations": [], diff --git a/seed/challenges/html5-and-css.json b/seed/challenges/html5-and-css.json index d3a44025d5e..36744e2f9c9 100644 --- a/seed/challenges/html5-and-css.json +++ b/seed/challenges/html5-and-css.json @@ -538,7 +538,7 @@ "title": "Change the Font Size of an Element", "difficulty": 1.13, "description": [ - "Create a second p element with the following kitty ipsum text: Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.", + "Create a second p element with the following kitty ipsum text: Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.", "Then, inside your <style> element, set the font-size of all p elements to 16 pixels.", "Font size is controlled by the font-size CSS attribute, like this: h1 { font-size: 30px; }.", "See if you can figure out how to give both of your p elements the font-size of 16 pixels (16px). You can do this inside the same <style> tag that we created for your red-text class." diff --git a/seed/challenges/intermediate-bonfires.json b/seed/challenges/intermediate-bonfires.json index 954d402ce9a..10c1c35bcf3 100644 --- a/seed/challenges/intermediate-bonfires.json +++ b/seed/challenges/intermediate-bonfires.json @@ -548,6 +548,7 @@ "difficulty": "2.11", "description": [ "Find the smallest number that is evenly divisible by all numbers in the provided range.", + "In other words, given the range [3,7], you will need to find the least common multiple of 3, 4, 5, 6, and 7.", "The range will be an array of two numbers that will not necessarily be in numerical order.", "Remember to use Read-Search-Ask if you get stuck. Try to pair program. Write your own code." ], diff --git a/seed/loopbackMigration.js b/seed/loopbackMigration.js index ab86785b34d..a06eea83c1b 100644 --- a/seed/loopbackMigration.js +++ b/seed/loopbackMigration.js @@ -124,6 +124,7 @@ var users = dbObservable user[provider + 'id'] = user[provider]; user[provider] = null; }); + user.rand = Math.random(); return user; })