From fb5655b5c200c9dfd6dd3cca65a148e14aba7a75 Mon Sep 17 00:00:00 2001 From: Dan Poltawski Date: Mon, 9 Jan 2017 20:18:50 +0000 Subject: [PATCH] MDL-57604 mod_assign: fix incorrect user being selector from chooser Previously there was a logic bug where by if some students were filtered from the list, the label for another student could be attached to the 'filered' student. This fix reworks the promises a bit so we render the student summary and then build an row with the explict user id, rather than itterating through the array later. I also remove the storing of the initial promise in a varible because this is an easy way to introduce a bug (not waiting for the .then() chained promise) --- .../amd/build/participant_selector.min.js | 2 +- mod/assign/amd/src/participant_selector.js | 31 +++++++------------ 2 files changed, 13 insertions(+), 20 deletions(-) diff --git a/mod/assign/amd/build/participant_selector.min.js b/mod/assign/amd/build/participant_selector.min.js index c5b045258ff07..13adc2b35a647 100644 --- a/mod/assign/amd/build/participant_selector.min.js +++ b/mod/assign/amd/build/participant_selector.min.js @@ -1 +1 @@ -define(["core/ajax","jquery","core/templates"],function(a,b,c){return{processResults:function(a,b){var c=[],d=0;for(d=0;d