Compare View
Commits (2)
Diff
Showing 2 changed files Side-by-side Diff
scripts/StudyController.js
View file @
95fe801
... | ... | @@ -107,10 +107,14 @@ angular.module('flashy.StudyController', ['ui.router']). |
107 | 107 | |
108 | 108 | //TODO: datetime range check YO!!! |
109 | 109 | |
110 | + | |
110 | 111 | var start = new Date($('#start-date').val()); |
111 | 112 | var end = new Date($('#end-date').val()); |
112 | 113 | |
113 | 114 | console.log($('#start-date').val()); |
115 | + console.log($('#end-date').val()); | |
116 | + //console.log($('#date-pick-start').val()); | |
117 | + //console.log($('data pick is ' + date-pick); | |
114 | 118 | // Time to get quiz... |
115 | 119 | /* |
116 | 120 | if ($('#start-date').val() == null || $('#end-date').val() == null) { |
... | ... | @@ -163,7 +167,12 @@ angular.module('flashy.StudyController', ['ui.router']). |
163 | 167 | $scope.busy = true; |
164 | 168 | console.log('my answer', ans); |
165 | 169 | //Answer sending |
170 | + | |
166 | 171 | if (ans != '') { |
172 | + if( ans.length > 255 ){ | |
173 | + ans = ans.substring(0, 255); | |
174 | + console.log('truncated answer', ans); | |
175 | + } | |
167 | 176 | var quizAns = { |
168 | 177 | 'pk': $scope.quiz.pk, |
169 | 178 | 'response': ans |
templates/study.html
View file @
95fe801
... | ... | @@ -41,9 +41,10 @@ |
41 | 41 | <div class="row"> |
42 | 42 | <div class="card-panel"> |
43 | 43 | <div class="row"> |
44 | + <!-- | |
44 | 45 | <p class="range-field"> |
45 | - <input type="date" class="datepicker" value="Date Picker"> | |
46 | - </p> | |
46 | + <input type="date" id="date-pick-start" class="datepicker" value="Date Picker"> | |
47 | + </p> --> | |
47 | 48 | <input id="start-date" type="date" class="" placeholder="Start Date"/> |
48 | 49 | <input id="end-date" type="date" class="" placeholder="End Date"/> |
49 | 50 |