From 5ec7831615b5c75e59d0f1d037b7cc554c66181c Mon Sep 17 00:00:00 2001 From: "David J. Kordsmeier" Date: Sun, 10 Nov 2013 01:19:16 -0800 Subject: [PATCH] refs #26 Add a model for the summary data. --- static/js/smileiqmanager.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/static/js/smileiqmanager.js b/static/js/smileiqmanager.js index b6bdb69..39f31b4 100644 --- a/static/js/smileiqmanager.js +++ b/static/js/smileiqmanager.js @@ -58,6 +58,18 @@ function sessionsModel() { self.iqsessions = ko.observableArray([]); } +function sessionSummaryModel() { + var self = this; + self.title = ko.observable(""); + self.sessionName = ko.observable(""); + self.date = ko.observable(""); + self.groupname = ko.observable(""); + self.teachername = ko.observable(""); + self._id = ko.observable(""); + self.iqset = ko.observableArray([]); + self.results = ko.observable(""); + self.sessionStats = ko.observable(""); +} // XXX Need to decide if we will use this var iqModel = function(question, answer1, answer2, answer3, answer4, rightanswer, picurl) { var self = this; @@ -78,7 +90,8 @@ var iqModel = function(question, answer1, answer2, answer3, answer4, rightanswer var globalViewModel = { iqsetSummary: new iqsetSummaryModel(), iqsetCollection: new iqsetsModel(), - sessionCollection: new sessionsModel() + sessionCollection: new sessionsModel(), + sessionSummary: new sessionSummaryModel() }; function createIQSetUploader() {