TheSoftwareFactory/DlearnHelsinki

Teacher dashboard doesn't show the last survey

Closed this issue · 7 comments

On the teacher dashboard, only the first survey ever opened is displayed. When the teacher open and closes new surveys, the overview of the last closed survey should be displayed in its dashboard.

Could this be caused by backend?

Yeah it could, because I think it was working fine before, @alkalinan any thoughts ?

@matletix, can you send pictures ? Also it would be interesting to check the content of the database and see if those survey are really opened

@alkalinan For the English Class 2018, 3 surveys have been opened and closed, the first being Vocabulary 2
screenshot-2017-11-20 dlearn app 1
The last one, aka Grammar, should be displayed on the teacher dashboard, but it's still Vocabulary 2 that is shown.
screenshot-2017-11-20 dlearn app 2

Ok I will investigated this issue for tonight, thanks

Auua commented

Heh, If you change
lastSurvey = surveys.filter(function (s) {
return s.end_date == last_d;
})[0];
to
lastSurvey = surveys.filter(function (s) {
return s.end_date == last_d;
})[1];
it gives the one survey before if the survey is currently open :D
so I guess the problem is with the end date checking

problem caused by the backend who no longer return the column "end_date" from the database.