Skip to content

Commit

Permalink
Removed default id selection
Browse files Browse the repository at this point in the history
  • Loading branch information
0x0is1 committed Oct 17, 2024
1 parent edeed81 commit 7b406f7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 16 deletions.
7 changes: 1 addition & 6 deletions src/endTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,7 @@ async function endTest(rno = 12114478) {
for (var [i, j] of data.entries()) {
console.log(`[${i + 1}] ${j.TestName}`);
}
if (rno === null) {
var selid = prompt('Select test to get marks: ');
}
else {
selid = 1;
}
var selid = prompt('Select test to get marks: ');
var set = prompt("Enter set number: ");
await parseOAS.fetch_endTest(data[selid-1], reg_no, set).then(async endtdata => {
if (endtdata == "-1") {
Expand Down
5 changes: 1 addition & 4 deletions src/getAnswer.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,7 @@ async function getAnswerNNA(rno) {
for (var [i, j] of data.entries()) {
console.log(`[${i + 1}] ${j.TestName}`);
}
if (rno === null) {
var selid = prompt('Select test to get answers: ');
}
else selid = 1;
var selid = prompt('Select test to get answers: ');

var tid = data[selid - 1].TestId;

Expand Down
8 changes: 2 additions & 6 deletions src/getOneResult.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,8 @@ async function getOneResult(rno = 12114478) {
for (var [i, j] of data.entries()) {
console.log(`[${i+1}] ${j.TestName}`);
}
if (rno === null) {
var selid = prompt('Select test to get marks: ');
}
else {
selid = 1;
}
var selid = prompt('Select test to get marks: ');

parseOAS.fetch_result(data[selid-1].TestId, reg_no).then(redata => {
console.log(redata);
});
Expand Down

0 comments on commit 7b406f7

Please sign in to comment.