Skip to content

Commit

Permalink
Bug #3, Update CLI php script for tranche/batch 4 [iet:9063701]
Browse files Browse the repository at this point in the history
* Plus, `OUOP.tesla_results_statistics()`, objToCSV Javascript [iet:8974552]
  • Loading branch information
nfreear committed May 27, 2017
1 parent 516aa81 commit eca9453
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions bin/ouop-query.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
'Tranche 1' => OuUser::count([ 'batch' => 0 ]),
'Tranche 2' => OuUser::count([ 'batch' => 2 ]),
'Tranche 3' => OuUser::count([ 'batch' => 3 ]),
'Tranche 4' => OuUser::count([ 'batch' => 4 ]),
'Tranche 5' => OuUser::count([ 'batch' => 5 ]),
'Keystroke preset' => OuUser::count([ 'teslainstrument' => 'kd' ]),
'Plagiarism preset' => OuUser::count([ 'teslainstrument' => 'tpt' ]),
'No preset' => OuUser::count([ 'teslainstrument' => null ]), // Should always be '0'!
Expand Down
2 changes: 1 addition & 1 deletion style/ouop-styles.less
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ div[ data-region = drawer ] {
padding: 1em;
text-transform: capitalize;
width: 100%;
word-spacing: 1em;
word-spacing: .1em;
}
}

Expand Down
6 changes: 5 additions & 1 deletion user/ouop-local-fixes.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@
});

if ($page.length) {
var summary = '<pre id="ouop-stats">Summary: %s</pre>'.replace(/%s/, JSON.stringify(counts, null, '\t'));
var summary = '<pre id="ouop-stats">Summary: %s</pre>'.replace(/%s/, objToCsv(counts));
$page.find('table').before(summary);

C.warn('ouop: TeSLA results stats:', counts);
Expand Down Expand Up @@ -240,5 +240,9 @@
return val ? trans[ sid ].replace('{$a}', val) : trans[ sid ];
};

function objToCsv (obj) {
return JSON.stringify(obj, null, 2).replace(/:/g, ',').replace(/_/g, ' ');
}

// .
}(window));

0 comments on commit eca9453

Please sign in to comment.