diff --git a/controllers/challenge.js b/controllers/challenge.js index f9ca3a7ecb..4c7653b732 100644 --- a/controllers/challenge.js +++ b/controllers/challenge.js @@ -16,12 +16,13 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -var debug = require('debug')('freecc:cntr:courseware'), +var debug = require('debug')('freecc:cntr:challenges'), Challenge = require('./../models/Challenge'), User = require('./../models/User'), resources = require('./resources'), R = require('ramda'), - moment = require('moment'); + moment = require('moment'), + MDNlinks = require('./../seed_data/bonfireMDNlinks'); var challengeMapWithNames = resources.getChallengeMapWithNames(); var challengeMapWithIds = resources.getChallengeMapWithIds(); @@ -268,6 +269,7 @@ exports.returnIndividualChallenge = function(req, res, next) { }, 5: function() { + debug('challenge MDNLinks', challenge.MDNlinks); res.render('bonfire/show', { completedWith: null, title: challenge.name, diff --git a/controllers/challengeMap.js b/controllers/challengeMap.js index 9ffcdbfbc1..7cc40feaf3 100644 --- a/controllers/challengeMap.js +++ b/controllers/challengeMap.js @@ -1,20 +1,7 @@ -var async = require('async'), - User = require('../models/User'), - Bonfire = require('./../models/Bonfire'), - Story = require('./../models/Story'), - Nonprofit = require('./../models/Nonprofit'), - Comment = require('./../models/Comment'), - Challenge = require('./../models/Challenge'), - resources = require('./resources'), - steps = resources.steps, - secrets = require('./../config/secrets'), - nonprofits = require('../seed_data/nonprofits.json'), - moment = require('moment'), - https = require('https'), - debug = require('debug')('freecc:cntr:resources'), - cheerio = require('cheerio'), - request = require('request'), - R = require('ramda'); +var User = require('../models/User'), + resources = require('./resources'), + debug = require('debug')('freecc:cntr:challengeMap'), + R = require('ramda'); var challengeTypes = { 'HTML_CSS_JQ': 0, diff --git a/models/Challenge.js b/models/Challenge.js index be82110772..e1971943be 100644 --- a/models/Challenge.js +++ b/models/Challenge.js @@ -16,7 +16,8 @@ var challengeSchema = new mongoose.Schema({ tests: Array, challengeSeed: Array, completionMessage: String, // Congratulations! You've finished our HTML and CSS track! - challengeType: Number // 0 = html, 1 = javascript only, 2 = video, 3 = zipline, 4 = basejump + challengeType: Number, // 0 = html, 1 = javascript only, 2 = video, 3 = zipline, 4 = basejump + MDNlinks: Array }); module.exports = mongoose.model('Challenge', challengeSchema);