Add MDNlinks to Challenge scheme so they can display on bonfire views.

This commit is contained in:
terakilobyte
2015-05-20 22:15:28 -04:00
parent 16ca72f716
commit 8783683e50
3 changed files with 10 additions and 20 deletions

View File

@ -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,