From ede153450ecafaf246c61c5f9e649de7c98be254 Mon Sep 17 00:00:00 2001 From: Clarence Ho Date: Fri, 6 Jul 2018 16:18:31 -0700 Subject: [PATCH] Use edx generated username when invoking auto_auth --- scripts/populate.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/populate.js b/scripts/populate.js index 942de27..b0c76d6 100644 --- a/scripts/populate.js +++ b/scripts/populate.js @@ -32,14 +32,12 @@ var config = require('./populate.json'); api.baseUrls = config.baseUrls; -var timestamp = new Date(); -var timestamp_str = timestamp.getFullYear() + ("0" + (timestamp.getMonth() + 1)).slice(-2) + ("0" + timestamp.getDate()).slice(-2) + ("0" + timestamp.getHours()).slice(-2) + ("0" + timestamp.getMinutes()).slice(-2) + ("0" + timestamp.getSeconds()).slice(-2); - async.timesSeries(config.answers.length, function(i, next) { async.timesSeries(config.xblock_keys.length, function(j, nextx) { + async.series([ function (cb) { - api.createUserOrLogin('pitestuser_'+timestamp_str+'_'+i, 'lms', config.course_key, cb); + api.createUserOrLogin(false, 'lms', config.course_key, cb); }, function (cb) { api.piSubmitAnswer(config.course_key, config.xblock_prefix + config.xblock_keys[j], {