Commit afc5b47e by AlasdairSwan Committed by Clinton Blackburn

Renamed 'programId' to use 'id'

parent c601e9fc
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
this.progressCollection = data.context.progressCollection; this.progressCollection = data.context.progressCollection;
if ( this.progressCollection ) { if ( this.progressCollection ) {
this.progressModel = this.progressCollection.findWhere({ this.progressModel = this.progressCollection.findWhere({
programId: this.model.get('id') id: this.model.get('id')
}); });
} }
this.render(); this.render();
......
...@@ -64,13 +64,13 @@ define([ ...@@ -64,13 +64,13 @@ define([
], ],
userProgress: [ userProgress: [
{ {
programId: 146, id: 146,
completed: ['courses', 'the', 'user', 'completed'], completed: ['courses', 'the', 'user', 'completed'],
in_progress: ['in', 'progress'], in_progress: ['in', 'progress'],
not_started : ['courses', 'not', 'yet', 'started'] not_started : ['courses', 'not', 'yet', 'started']
}, },
{ {
programId: 147, id: 147,
completed: ['Course 1'], completed: ['Course 1'],
in_progress: [], in_progress: [],
not_started: ['Course 2', 'Course 3', 'Course 4'] not_started: ['Course 2', 'Course 3', 'Course 4']
......
...@@ -37,13 +37,13 @@ define([ ...@@ -37,13 +37,13 @@ define([
}, },
userProgress = [ userProgress = [
{ {
programId: 146, id: 146,
completed: ['courses', 'the', 'user', 'completed'], completed: ['courses', 'the', 'user', 'completed'],
in_progress: ['in', 'progress'], in_progress: ['in', 'progress'],
not_started : ['courses', 'not', 'yet', 'started'] not_started : ['courses', 'not', 'yet', 'started']
}, },
{ {
programId: 147, id: 147,
completed: ['Course 1'], completed: ['Course 1'],
in_progress: [], in_progress: [],
not_started: ['Course 2', 'Course 3', 'Course 4'] not_started: ['Course 2', 'Course 3', 'Course 4']
...@@ -104,7 +104,7 @@ define([ ...@@ -104,7 +104,7 @@ define([
}); });
it('should display the correct completed courses message', function() { it('should display the correct completed courses message', function() {
var program = _.findWhere(userProgress, {programId: 146}), var program = _.findWhere(userProgress, {id: 146}),
completed = program.completed.length, completed = program.completed.length,
total = completed + program.in_progress.length + program.not_started.length; total = completed + program.in_progress.length + program.not_started.length;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment