diff --git a/VITask Desktop/.gitignore b/VITask Desktop/.gitignore
index 84f1792..19a9ff1 100644
--- a/VITask Desktop/.gitignore
+++ b/VITask Desktop/.gitignore
@@ -1,3 +1,4 @@
.vscode/
node_modules/
dashboard/userdata/
+release-builds/
diff --git a/VITask Desktop/build.js b/VITask Desktop/build.js
index 8132fc0..25ad119 100644
--- a/VITask Desktop/build.js
+++ b/VITask Desktop/build.js
@@ -3,13 +3,15 @@ var electronInstaller = require('electron-winstaller');
// In this case, we can use relative paths
var settings = {
// Specify the folder where the built app is located
- appDirectory: './release-builds/VITask-win32-ia32',
+ appDirectory: './release-builds/VITask-win32-x64',
// Specify the existing folder where
outputDirectory: './installer',
// The name of the Author of the app (the name of your company)
authors: 'VITask',
// The name of the executable of your built
- exe: './VITask.exe'
+ exe: './VITask.exe',
+ // Setup loading gif
+ loadingGif: './preview.gif'
};
resultPromise = electronInstaller.createWindowsInstaller(settings);
diff --git a/VITask Desktop/dashboard.html b/VITask Desktop/dashboard.html
index cf0276d..469102d 100644
--- a/VITask Desktop/dashboard.html
+++ b/VITask Desktop/dashboard.html
@@ -828,11 +828,16 @@
${lab_or_theory}
${name_of_course}
+
+
- Bunk Attend
- -
+
+ Bunk Attend
+
+
+
+ -
+
- -
+
+ -
+
@@ -854,6 +859,97 @@ Bunk &en
}
+ else if(item=='marks')
+ {
+ $("#dashnav").attr('class', 'nav-item');
+ $("#acadnav").attr('class', 'nav-item');
+ $('#attennav').attr('class','nav-item');
+ $("#marksnav").attr('class', 'nav-item active ');
+ $("#moodlenav").attr('class', 'nav-item');
+ $("#timetablenav").attr('class', 'nav-item');
+ $("#resyncnav").attr('class', 'nav-item');
+ $("#logoutnav").attr('class', 'nav-item');
+ $("#topheading").html("Marks");
+ data.findOne({ showmarks: 'user-marks' }, function(err, doc) {
+ let marks = doc.marks;
+ let content = ``;
+ let course;
+ let exam;
+ let finalcontent = ``;
+ let tempcourse;
+ let type1;
+ let type2;
+ let type;
+ for(course in marks)
+ {
+ let temp = marks[course];
+ for(exam in temp)
+ {
+ content += `
+
+ |
+
+ ${exam}
+ |
+
+
+ |
+
+ |
+
+ ${temp[exam]["scored"]}
+ |
+
`
+ }
+
+ tempcourse = course.split(" ");
+ type1 = tempcourse.pop();
+ type2 = tempcourse.pop();
+ type = type2 + " " + type1;
+ course = tempcourse.join(' ');
+
+ finalcontent += `
+
+
+
+
+
+
+
+
+ |
+
+ Exam
+ |
+
+ |
+
+ |
+
+ Marks
+ |
+
+ `
+ + content +
+ `
+
+
+
+
+
+
+
`
+
+ content = ``;
+ $("#canvas").html(finalcontent);
+
+ }
+ });
+ }
+
else if(item=='marks')
{
$("#dashnav").attr('class', 'nav-item');
@@ -1476,7 +1572,9 @@ Integrate Moodle
function Bunk_add(id){
+
let select_id = "#newid"+String(id);
+ let count_id = "#badd"+String(id);
let noselect_id = "#nobunk"+String(id);
let attend_id = "#attend"+String(id);
let noattend_id = "#cancelattend"+String(id);
@@ -1486,9 +1584,12 @@ Integrate Moodle
let classes_total = $(select_id).attr("value1");
let classes_attended = $(select_id).attr("value2");
-
+ let count_add = $(count_id).attr("value");
+ ++(count_add);
+ $(count_id).attr("value",count_add);
+
++classes_total;
-
+ document.getElementById('newid'+id).innerHTML = '+ '+count_add;
let attendance_final = (classes_attended/classes_total)*100;
@@ -1521,17 +1622,20 @@ Integrate Moodle
$(currentid).attr("style",strokedash);
- console.log(strokedash);
+ // console.log(strokedash);
$(current_idnew).attr("data-countervalue",ans);
$(answer_id).html(ans);
+
+
}
function Bunk_subtract(id){
let select_id = "#newid"+String(id);
+ let count_id = "#bsub"+String(id);
let noselect_id = "#nobunk"+String(id);
let attend_id = "#attend"+String(id);
let noattend_id = "#cancelattend"+String(id);
@@ -1542,10 +1646,13 @@ Integrate Moodle
let classes_total = $(select_id).attr("value1");
let classes_attended = $(select_id).attr("value2");
-
+ let count_add = $(count_id).attr("value");
+ ++(count_add);
+ $(count_id).attr("value",count_add);
--classes_total;
-
+ document.getElementById('nobunk'+id).innerHTML = '+ '+count_add;
let attendance_final = (classes_attended/classes_total)*100;
+
if(attendance_final<=100)
{
@@ -1601,12 +1708,18 @@ Integrate Moodle
let answer_id = "#answerid"+String(id);
let current_idnew = "#currentidnew"+String(id);
let currentid = "#currentid"+String(id);
+ let count_id = "#atadd"+String(id);
let classes_total = $(select_id).attr("value1");
let classes_attended = $(select_id).attr("value2");
+ let count_add = $(count_id).attr("value");
+ ++(count_add);
+ $(count_id).attr("value",count_add);
+
++classes_total;
++classes_attended;
-
+
+ document.getElementById('attend'+id).innerHTML = '+ '+count_add;
let attendance_final = (classes_attended/classes_total)*100;
$(select_id).attr("value1",classes_total);
@@ -1650,21 +1763,26 @@ Integrate Moodle
function Attend_subtract(id)
{
- let select_id = "#newid"+String(id);
+ let select_id = "#newid"+String(id);
let noselect_id = "#nobunk"+String(id);
let attend_id = "#attend"+String(id);
let noattend_id = "#cancelattend"+String(id);
let answer_id = "#answerid"+String(id);
let current_idnew = "#currentidnew"+String(id);
let currentid = "#currentid"+String(id);
+ let count_id = "#atsub"+String(id);
let classes_total = $(select_id).attr("value1");
let classes_attended = $(select_id).attr("value2");
+ let count_add = $(count_id).attr("value");
+ ++(count_add);
+ $(count_id).attr("value",count_add);
- --classes_total;
- --classes_attended;
+ --classes_total;
+ --classes_attended;
+ document.getElementById('cancelattend'+id).innerHTML = '+ '+count_add;
- let attendance_final = (classes_attended/classes_total)*100;
+ let attendance_final = (classes_attended/classes_total)*100;
$(select_id).attr("value1",classes_total);
@@ -1706,6 +1824,7 @@ Integrate Moodle
}
+
//Bunk Meter Ends here.
@@ -1831,7 +1950,7 @@ Integrate Moodle
} else {
let result = body;
/*console.log(result);*/
- if(result.Error){
+ if(result.error){
$("#loading").fadeOut();
$("#content").fadeIn();
alert("Wrong Password.");
@@ -1843,19 +1962,16 @@ Integrate Moodle
data.insert(result, function(err, doc) {
console.log('Inserted', doc.Name);
- });
-
- data.findOne({ profile: 'user-profile' }, function(err, doc) {
- attendance(doc.APItoken, function(){
+ attendance(doc.APItoken, function(){
marks(doc.APItoken, function(){
moodlefetch(moodle_username,moodle_password,doc.APItoken, function(){
ipcRenderer.send('resync:new','resynced');
done(doc.APItoken);
});
});
- });
});
- }
+ });
+ }
}
});
}
@@ -1889,18 +2005,14 @@ Integrate Moodle
data.insert(result, function(err, doc) {
console.log('Inserted', doc.Name);
- });
-
- data.findOne({ profile: 'user-profile' }, function(err, doc) {
- marks(doc.APItoken, function(){
- attendance(doc.APItoken, function(){
- ipcRenderer.send('resync:new','resynced');
- done(doc.APItoken);
- });
- });
-
+ marks(doc.APItoken, function(){
+ attendance(doc.APItoken, function(){
+ ipcRenderer.send('resync:new','resynced');
+ done(doc.APItoken);
});
- }
+ });
+ });
+ }
}
});
}
diff --git a/VITask Desktop/electron-packager.txt b/VITask Desktop/electron-packager.txt
new file mode 100644
index 0000000..20bfd69
--- /dev/null
+++ b/VITask Desktop/electron-packager.txt
@@ -0,0 +1 @@
+electron-packager "C:\Users\aprat\Desktop\Github\VITask\VITask Desktop" --platform=win32 --arch=x64 --icon="./icons/win/icon.ico" --overwrite VITask
\ No newline at end of file
diff --git a/VITask Desktop/index.html b/VITask Desktop/index.html
index 9393084..ac5fb01 100644
--- a/VITask Desktop/index.html
+++ b/VITask Desktop/index.html
@@ -212,7 +212,7 @@