Skip to content

Commit

Permalink
Exceljs config fix
Browse files Browse the repository at this point in the history
  • Loading branch information
DeepankarSinha authored and rushi216 committed Aug 14, 2017
1 parent 9012542 commit a41f5e0
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,9 @@ public async Task<CodeResponse> ExecuteCodeSnippetAsync(int attendeeId, TestAnsw
break;
}

//Trim newline character
result.Output = result.Output.TrimEnd(new char[] { '\r', '\n' });

if (result.Output != testCase.TestCaseOutput)
{
allTestCasePassed = false;
Expand Down
2 changes: 1 addition & 1 deletion Trappist/src/Promact.Trappist.Web/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
"Microsoft": "Information"
}
},
"CodeBaseSimulatorServer": "http://codesimulator.promactinfo.com/api/execute"
"CodeBaseSimulatorServer": "http://yourcodebase.server.url"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export class Code{
export class Code {
source: string;
input: string;
language: number;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import 'brace/mode/java';
import 'brace/mode/c_cpp';
import { TestLogs } from '../../reports/testlogs.model';
import { AllowTestResume } from '../../tests/enum-allowtestresume';
import { CodeResponse } from '../code.response.model'
import { CodeResponse } from '../code.response.model';


//Temporary imports
Expand Down Expand Up @@ -334,8 +334,7 @@ export class TestComponent implements OnInit {
}

//Save answer to database
if (this.questionIndex !== index)
{
if (this.questionIndex !== index) {
//Prevent add answer for the first time on page load
if (this.questionIndex !== -1) {
//Only add answer that are of MCQ/SCQ type
Expand Down Expand Up @@ -389,7 +388,7 @@ export class TestComponent implements OnInit {
}
}, err => {
this.codeResult = 'Oops! server error occured.';
})
});
}

/**
Expand Down
6 changes: 3 additions & 3 deletions Trappist/src/Promact.Trappist.Web/wwwroot/systemjs.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
'ace-builds': 'npm:ace-builds/src-min',

'jsPdfautoTable': 'npm:jspdf-autotable/dist/jspdf.plugin.autotable.js',
'exceljs': 'npm:exceljs/dist/exceljs.js',
'exceljs': 'npm:exceljs',
'filesaver':'npm:file-saver'
},
// packages tells the System loader how to load when no filename and/or no extension
Expand Down Expand Up @@ -134,8 +134,8 @@
main: 'ace.js',
defaultExtension: 'js'
},
'exceljs.js': {
main: 'dist/exceljs.js',
'exceljs': {
main: 'dist/exceljs.min.js',
defaultExtension: 'js'
},
'filesaver': {
Expand Down

0 comments on commit a41f5e0

Please sign in to comment.