From 674b9284867e02211a8092be64420bb1b089603f Mon Sep 17 00:00:00 2001 From: vkisku Date: Sat, 20 Feb 2021 22:51:22 +0530 Subject: [PATCH 1/2] added a subjects.json file --- subjects.json | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 subjects.json diff --git a/subjects.json b/subjects.json new file mode 100644 index 0000000..a80bee0 --- /dev/null +++ b/subjects.json @@ -0,0 +1,29 @@ +{ + "Aerospace Engineering": "AE", + "Instrumentation Engineering":"IN", + "Agricultural Engineering": "AG", + "Mathematics":"MA", + "Architecture and Planning": "AR", + "Mechanical Engineering" :"ME", + "Biomedical": "BM", + "Mining Engineering" :"MN", + "Biotechnology" :"BT", + "Metallurgical Engineering" :"MT", + "Civil Engineering" :"CE", + "Petroleum Engineering" :"PE", + "Chemical Engineering" :"CH", + "Physics" :"PH", + "Computer Science and Information Technology" :"CS", + "Production and Industrial Engineering" :"PI", + "Chemistry" :"CY", + "Textile Engineering and Fiber Science" :"TF", + "Electronics and Communication Engineering" :"EC", + "Engineering Sciences": "XE*", + "Electrical Engineering" :"EE", + "Life Sciences" :"XL**", + "Environmental Science and Engineering" :"ES", + "Humanities and Social Sciences" :"XH***", + "Ecology and Evolution" :"EY", + "Statistics" :"ST[11]", + "Geology and Geophysics":"GG" +} \ No newline at end of file From c629457f4ff87d663b74622d928b6b9dc24049e5 Mon Sep 17 00:00:00 2001 From: vkisku Date: Sat, 20 Feb 2021 22:56:20 +0530 Subject: [PATCH 2/2] added a dropdown functionality to visualizeMarks.php --- VisualizeMarks.js | 7 +++++++ VisualizeMarks.php | 11 +++++++++++ 2 files changed, 18 insertions(+) diff --git a/VisualizeMarks.js b/VisualizeMarks.js index 7a711b2..ca7df84 100644 --- a/VisualizeMarks.js +++ b/VisualizeMarks.js @@ -429,4 +429,11 @@ function do_initialize(){ } window._settings_box_collapsed = false; toggle_settings_box(); +} +function fill_subject_dropdown(){ + $.getJSON("subjects.json", function(result){ + $.each(result, function(i, field){ + $("select#subjects").append( $('').val(field).html(i) ); + }); + }); } \ No newline at end of file diff --git a/VisualizeMarks.php b/VisualizeMarks.php index 93a8707..86026a3 100644 --- a/VisualizeMarks.php +++ b/VisualizeMarks.php @@ -10,6 +10,16 @@
+
+ + + + +
Subject + +
@@ -159,6 +169,7 @@ window.raw_data = window.raw_data.split(/\s+/); $("#radio").prop("checked", true); do_initialize(); + fill_subject_dropdown(); \ No newline at end of file
My Marks