Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@ -110,7 +110,7 @@ GEM
|
|||||||
excon (>= 0.38.0)
|
excon (>= 0.38.0)
|
||||||
json
|
json
|
||||||
erubis (2.7.0)
|
erubis (2.7.0)
|
||||||
excon (0.44.4)
|
excon (0.45.0)
|
||||||
execjs (2.4.0)
|
execjs (2.4.0)
|
||||||
factory_girl (4.5.0)
|
factory_girl (4.5.0)
|
||||||
activesupport (>= 3.0.0)
|
activesupport (>= 3.0.0)
|
||||||
|
@ -569,10 +569,17 @@ $(function() {
|
|||||||
$('#results ul').first().html('');
|
$('#results ul').first().html('');
|
||||||
$('.test-count .number').html(response.length);
|
$('.test-count .number').html(response.length);
|
||||||
clearOutput();
|
clearOutput();
|
||||||
|
|
||||||
_.each(response, function(result, index) {
|
_.each(response, function(result, index) {
|
||||||
printOutput(result, false, index);
|
printOutput(result, false, index);
|
||||||
printScoringResult(result, index);
|
printScoringResult(result, index);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (_.some(response, function(result) {
|
||||||
|
return result.status === 'timeout';
|
||||||
|
})) {
|
||||||
|
showTimeoutMessage();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var renderCode = function(event) {
|
var renderCode = function(event) {
|
||||||
@ -734,10 +741,7 @@ $(function() {
|
|||||||
|
|
||||||
var showStatus = function(output) {
|
var showStatus = function(output) {
|
||||||
if (output.status === 'timeout') {
|
if (output.status === 'timeout') {
|
||||||
$.flash.danger({
|
showTimeoutMessage();
|
||||||
icon: ['fa', 'fa-clock-o'],
|
|
||||||
text: $('#editor').data('message-timeout')
|
|
||||||
});
|
|
||||||
} else if (output.stderr) {
|
} else if (output.stderr) {
|
||||||
$.flash.danger({
|
$.flash.danger({
|
||||||
icon: ['fa', 'fa-bug'],
|
icon: ['fa', 'fa-bug'],
|
||||||
@ -755,6 +759,13 @@ $(function() {
|
|||||||
$('a[data-toggle="tab"]').eq(index || 0).tab('show');
|
$('a[data-toggle="tab"]').eq(index || 0).tab('show');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var showTimeoutMessage = function() {
|
||||||
|
$.flash.danger({
|
||||||
|
icon: ['fa', 'fa-clock-o'],
|
||||||
|
text: $('#editor').data('message-timeout')
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
var showWorkspaceTab = function(event) {
|
var showWorkspaceTab = function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
showTab(1);
|
showTab(1);
|
||||||
|
@ -180,7 +180,7 @@ de:
|
|||||||
stop: Stoppen
|
stop: Stoppen
|
||||||
submit: Code zur Bewertung abgeben
|
submit: Code zur Bewertung abgeben
|
||||||
test: Testen
|
test: Testen
|
||||||
timeout: 'Ihr Code benötigte länger als die erlaubten %{permitted_execution_time} Sekunden, um zu terminieren.'
|
timeout: 'Ihr Code hat die erlaubte Ausführungszeit von %{permitted_execution_time} Sekunden überschritten.'
|
||||||
tooltips:
|
tooltips:
|
||||||
save: Ihr Code wird automatisch gespeichert, wann immer Sie eine Datei herunterladen, ausführen oder testen. Explizites Speichern ist also selten notwendig.
|
save: Ihr Code wird automatisch gespeichert, wann immer Sie eine Datei herunterladen, ausführen oder testen. Explizites Speichern ist also selten notwendig.
|
||||||
editor_file_tree:
|
editor_file_tree:
|
||||||
|
@ -180,7 +180,7 @@ en:
|
|||||||
stop: Stop
|
stop: Stop
|
||||||
submit: Submit Code For Assessment
|
submit: Submit Code For Assessment
|
||||||
test: Test
|
test: Test
|
||||||
timeout: 'Your code took longer than the permitted %{permitted_execution_time} seconds to run.'
|
timeout: 'Your code exceeded the permitted execution time of %{permitted_execution_time} seconds.'
|
||||||
tooltips:
|
tooltips:
|
||||||
save: Your code is automatically saved whenever you download, run, or test it. Therefore, explicitly saving is rarely necessary.
|
save: Your code is automatically saved whenever you download, run, or test it. Therefore, explicitly saving is rarely necessary.
|
||||||
editor_file_tree:
|
editor_file_tree:
|
||||||
|
@ -5,11 +5,7 @@
|
|||||||
var buildFlash = function(options) {
|
var buildFlash = function(options) {
|
||||||
if (options.text) {
|
if (options.text) {
|
||||||
var container = options.container;
|
var container = options.container;
|
||||||
var html = '';
|
var html = (options.icon ? '<i class="' + options.icon.join(' ') + '"></i>' : '') + options.text;
|
||||||
if (options.icon) {
|
|
||||||
html += '<i class="' + options.icon.join(' ') + '"> ';
|
|
||||||
}
|
|
||||||
html += options.text;
|
|
||||||
container.html(html);
|
container.html(html);
|
||||||
showFlashes();
|
showFlashes();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user