added sort values to Student.tries

parent 1e1e63f3
Showing with 3 additions and 0 deletions
......@@ -430,6 +430,7 @@ module.exports = {
function (instruction, next_ins) {
Instruction.findOne(instruction.id)
.sort('begin DESC')
.populate('workingSessions')
.then((populated_ins) => {
if (!populated_ins || !populated_ins.workingSessions || populated_ins.workingSessions.length == 0)
......@@ -441,6 +442,7 @@ module.exports = {
function(ws, next_ws) {
WorkingSession.findOne(ws.id)
.sort('begin DESC')
.populate('tries')
.then((populated_ws) => {
if (!populated_ws || !populated_ws.tries || populated_ws.tries.length == 0)
......@@ -452,6 +454,7 @@ module.exports = {
function(t, next_t) {
Try.findOne(t.id)
.sort('begin DESC')
.populate('actions')
.then((populated_try) => {
if (!populated_try || !populated_try.actions || populated_try.actions.length == 0)
......
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 sign in to comment