Skip to content

Commit

Permalink
Use edx generated username when invoking auto_auth
Browse files Browse the repository at this point in the history
  • Loading branch information
kitsook committed Jul 6, 2018
1 parent 57b01b4 commit ede1534
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions scripts/populate.js
Expand Up @@ -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], {
Expand Down

0 comments on commit ede1534

Please sign in to comment.