Compare commits
22 Commits
semesterSe
...
responsive
| Author | SHA1 | Date | |
|---|---|---|---|
| 0b8efb3d52 | |||
| db92866bfe | |||
| 8b907f6f97 | |||
| dd15854ae7 | |||
| 8d7d01f0de | |||
| f587a0aa68 | |||
| 534cb4263d | |||
| b87ed8a9c6 | |||
| e006e38cb8 | |||
| 5e6490ad57 | |||
|
|
505fc9d1ae | ||
| ef357ec1fa | |||
| 1556395b73 | |||
| 2b2050a729 | |||
| 565c326bfc | |||
| 5657a1be59 | |||
| cae0828bb4 | |||
|
|
c69dfcaf0d | ||
|
|
78f91df79f | ||
|
|
dd07762fa0 | ||
|
|
ee63bdfeb2 | ||
|
|
9a9b238214 |
@@ -1,4 +1,8 @@
|
|||||||
# Why is this a thing?
|
## How do I access the website?
|
||||||
|
|
||||||
|
https://derec4.github.io/ut-grade-distribution-viewer/
|
||||||
|
|
||||||
|
## Why is this a thing?
|
||||||
|
|
||||||
I'm sure you've all seen this before:
|
I'm sure you've all seen this before:
|
||||||
|
|
||||||
|
|||||||
98
index.html
98
index.html
@@ -15,64 +15,72 @@
|
|||||||
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
|
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
|
||||||
<title>UT Grade Viewer</title>
|
<title>UT Grade Viewer</title>
|
||||||
<link rel="icon" href="https://derec4.github.io/ut-grade-distribution-viewer/data/icon.png">
|
<link rel="icon" href="https://derec4.github.io/ut-grade-distribution-viewer/data/icon.png">
|
||||||
<meta name='viewport' content='width=device-width, initial-scale=1'>
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<link rel='stylesheet' type='text/css' media='screen' href='main.css'>
|
<link rel='stylesheet' type='text/css' media='screen' href='main.css'>
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.4/Chart.js">
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.4/Chart.js">
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div class="bg"></div>
|
<div class="wrapper">
|
||||||
<div class="bg-text" value="">
|
<div class="about-text" value="">
|
||||||
<h1>About</h1>
|
<h1>About</h1>
|
||||||
<p>
|
<p>
|
||||||
This is a database tool to assist students of the University of Texas - Austin in the biannual race for
|
This is a database tool to assist students of the University of Texas - Austin in the biannual race for
|
||||||
Jazz Appr- I mean course registration process.
|
Jazz Appr- I mean course registration process.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
I noticed other grade sites used outdated data, so I made
|
I noticed other grade sites used outdated data, so I made
|
||||||
my own. Enjoy!
|
my own. Enjoy!
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="bg-form">
|
<div class="bg-form">
|
||||||
<p>
|
<p>
|
||||||
Keep course names as close to the
|
Keep course names as close to the
|
||||||
<a href="https://registrar.utexas.edu/schedules">official course name</a>
|
<a href="https://registrar.utexas.edu/schedules">official course name</a>
|
||||||
as possible
|
as possible
|
||||||
</p>
|
</p>
|
||||||
<br>
|
<br>
|
||||||
<form action="">
|
<form action="">
|
||||||
|
|
||||||
<!-- Data is separated into course number, course prefi;x, and course name-->
|
<!-- Data is separated into course number, course prefi;x, and course name-->
|
||||||
<label for="courseField">Department (Ex: "MUS"):</label>
|
<label for="courseField">Department (Ex: "MUS"):</label>
|
||||||
<input type="text" id="courseField" name="fname" required><br><br>
|
<input type="text" id="courseField" name="fname" required><br><br>
|
||||||
<label for="courseNum">Course Number (Ex: "307"):</label>
|
<label for="courseNum">Course Number (Ex: "307"):</label>
|
||||||
<input type="text" id="courseNum" name="fname" required><br><br>
|
<input type="text" id="courseNum" name="fname" required><br><br>
|
||||||
<label for="courseName">Course Name (Optional, useful if classes have the same number like UGS 303):</label>
|
<label for="courseName">Course Name (Optional, useful if classes have the same number like UGS 303):</label>
|
||||||
<input type="text" id="courseName" name="fname"><br><br>
|
<input type="text" id="courseName" name="fname"><br><br>
|
||||||
<!-- <label for="courseInstructor">Instructor (Optional):</label>
|
<!-- <label for="courseInstructor">Instructor (Optional):</label>
|
||||||
<input type="text" id="courseInstructor" name="fname"><br><br> -->
|
<input type="text" id="courseInstructor" name="fname"><br><br> -->
|
||||||
<button type="button" id="subBut">Submit</button><br><br>
|
<button type="button" id="subBut">Submit</button><br><br>
|
||||||
|
|
||||||
<!-- Dropdown menu for semester selection -->
|
<!-- Dropdown menu for semester selection -->
|
||||||
<form>
|
<form>
|
||||||
<label for="dropdown">Semester (under construction):</label>
|
<label for="dropdown">Semester (under construction):</label>
|
||||||
<select id="semester" name="dropdown">
|
<select id="semester" name="dropdown">
|
||||||
<option value="f2022">Fall 2022</option>
|
<option value="f2022">Fall 2022</option>
|
||||||
<option value="s2022">Summer 2022</option>
|
<option value="s2022">Summer 2022</option>
|
||||||
<option value="sp2022">Spring 2022</option>
|
<option value="sp2022">Spring 2022</option>
|
||||||
<option value="f2021">Fall 2021</option>
|
<option value="f2021">Fall 2021</option>
|
||||||
</select>
|
</select>
|
||||||
<br><br>
|
<br><br>
|
||||||
|
</form>
|
||||||
</form>
|
</form>
|
||||||
</form>
|
<div class="chart-container" id="grades" value="invisible" style="position: relative; height:40vh; width:80vw">
|
||||||
<div class="chart-container" id="grades" value="invisible" style="position: relative; height:40vh; width:80vw">
|
<!--Bar graph stuff-->
|
||||||
<!--Bar graph stuff-->
|
<canvas id="gradeBar" style="width:100%;height:100%;"></canvas>
|
||||||
<canvas id="gradeBar" style="width:100%;height:100%;"></canvas>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<footer>Created by Derek Chen
|
<footer>Created by Derek Chen
|
||||||
<!-- because VAPA lecture was a bit boring that day -->
|
<!-- because VAPA lecture was a bit boring that day -->
|
||||||
|
<iframe
|
||||||
|
src="https://ghbtns.com/github-btn.html?user=Derec4&repo=ut-grade-distribution-viewer&type=star&count=true&size=large"
|
||||||
|
frameborder="0" scrolling="0" width="170" height="30" title="GitHub">
|
||||||
|
</iframe>
|
||||||
|
<iframe src="https://ghbtns.com/github-btn.html?user=DereC4&type=follow&count=true&size=large" frameborder="0"
|
||||||
|
scrolling="0" width="170" height="30" title="GitHub">
|
||||||
|
</iframe>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
<script src='main.js'></script>
|
<script src='main.js'></script>
|
||||||
|
|||||||
114
main.css
114
main.css
@@ -1,7 +1,7 @@
|
|||||||
body {
|
body {
|
||||||
font-family: 'Helvetica Neue', sans-serif;
|
font-family: 'Helvetica Neue', sans-serif;
|
||||||
background: #1b1a2a;
|
background: #1b1a2a;
|
||||||
background: linear-gradient(90deg, rgba(61, 87, 92, 1) 0, #454454 100%)
|
background: linear-gradient(90deg, rgba(61, 87, 92, 1) 0, #454454 100%);
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
@@ -10,87 +10,101 @@ a {
|
|||||||
}
|
}
|
||||||
|
|
||||||
main {
|
main {
|
||||||
padding: 20px
|
padding: 10%
|
||||||
}
|
}
|
||||||
|
|
||||||
main h1 {
|
h1 {
|
||||||
font-size: 24px;
|
font-size: 2rem;
|
||||||
margin: 0 0 20px 0
|
margin: 0 0 1rem 0
|
||||||
}
|
}
|
||||||
|
|
||||||
main p {
|
p {
|
||||||
font-size: 10px;
|
font-size: 1rem;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
margin: 0 0 20px 0
|
margin: 0 0 1rem 0
|
||||||
}
|
}
|
||||||
|
|
||||||
footer {
|
footer {
|
||||||
background-color: #2e2d2d;
|
background-color: #2e2d2d;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
padding: 10px;
|
padding: 1%;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
font-size: 13px
|
font-size: 1rem
|
||||||
}
|
|
||||||
|
|
||||||
footer p {
|
|
||||||
font-size: 18px;
|
|
||||||
margin: 0
|
|
||||||
}
|
}
|
||||||
|
|
||||||
* {
|
* {
|
||||||
box-sizing: border-box
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bg {
|
.wrapper {
|
||||||
background-image: url(tempbg.png);
|
display: grid;
|
||||||
filter: blur(8px);
|
gap: 2vw;
|
||||||
-webkit-filter: blur(8px);
|
grid-auto-rows: minmax(100px, auto);
|
||||||
height: 100%;
|
text-align: center;
|
||||||
background-position: center;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
background-size: cover
|
|
||||||
}
|
|
||||||
|
|
||||||
.bg-text {
|
|
||||||
background-color: #000;
|
|
||||||
background-color: rgba(0, 0, 0, .4);
|
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-weight: 700;
|
/* background-color: rgba(0, 0, 0, .4); */
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.about-text {
|
||||||
|
background-color: rgba(0, 0, 0, .4);
|
||||||
border: 3px solid #f1f1f1;
|
border: 3px solid #f1f1f1;
|
||||||
margin: 5px auto;
|
grid-column: 1;
|
||||||
position: absolute;
|
grid-row: 1;
|
||||||
font-size: small;
|
|
||||||
top: 15%;
|
|
||||||
left: 50%;
|
|
||||||
transform: translate(-50%, -50%);
|
|
||||||
width: 70%;
|
width: 70%;
|
||||||
padding: 10px;
|
margin: 0 auto;
|
||||||
text-align: center
|
border-radius: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bg-form {
|
.bg-form {
|
||||||
background-color: #000;
|
|
||||||
background-color: rgba(0, 0, 0, .4);
|
background-color: rgba(0, 0, 0, .4);
|
||||||
color: #fff;
|
|
||||||
font-weight: 700;
|
|
||||||
border: 3px solid #f1f1f1;
|
border: 3px solid #f1f1f1;
|
||||||
margin: 5px auto;
|
grid-column: 1;
|
||||||
position: absolute;
|
grid-row: 2;
|
||||||
top: 50%;
|
font-weight: 600;
|
||||||
left: 50%;
|
width: 50%;
|
||||||
transform: translate(-50%, -50%);
|
margin: 0 auto;
|
||||||
width: auto;
|
border-radius: 10px;
|
||||||
padding: 20px;
|
|
||||||
text-align: center
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.chart-container {
|
.chart-container {
|
||||||
position: relative;
|
position: relative;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
height: 80vh;
|
height: 80vh;
|
||||||
width: 80vw
|
width: 80vw;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Mobile */
|
||||||
|
.bg-form {
|
||||||
|
padding: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.about-text {
|
||||||
|
padding: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Tablet */
|
||||||
|
@media (min-width:600px) {
|
||||||
|
.bg-form {
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.about-text {
|
||||||
|
padding: 14px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Desktop */
|
||||||
|
@media (min-width:900px) {
|
||||||
|
.bg-form {
|
||||||
|
padding: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.about-text {
|
||||||
|
padding: 14px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
49
main.js
49
main.js
@@ -1,12 +1,13 @@
|
|||||||
const submitButton = document.getElementById('subBut');
|
const submitButton = document.getElementById('subBut');
|
||||||
submitButton.addEventListener("click", parseName);
|
submitButton.addEventListener("click", parseName);
|
||||||
var chartDiv = document.querySelector('#grades');
|
var chartDiv = document.querySelector('#grades');
|
||||||
var aboutDiv = document.querySelector('.bg-text');
|
var aboutDiv = document.querySelector('.about-text');
|
||||||
if(chartDiv.getAttribute('value') == 'invisible'){
|
if(chartDiv.getAttribute('value') == 'invisible'){
|
||||||
chartDiv.style.display = 'none';
|
chartDiv.style.display = 'none';
|
||||||
}
|
}
|
||||||
var gradeChart;
|
var gradeChart;
|
||||||
const ctx = document.getElementById("gradeBar");
|
const ctx = document.getElementById("gradeBar");
|
||||||
|
const gradeLabels = ["A", "A-", "B+", "B", "B-", "C+", "C", "C-", "D+", "D", "D-", "F"];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Parse the input form and class data
|
Parse the input form and class data
|
||||||
@@ -32,7 +33,7 @@ async function parseName() {
|
|||||||
alert("Invalid Department");
|
alert("Invalid Department");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
console.log(department, classNum.toString(), className.trim());
|
console.log(department, classNum.toString(), className.trim(), semester);
|
||||||
await PapaParse(department, classNum.toString(), className.trim(), semester);
|
await PapaParse(department, classNum.toString(), className.trim(), semester);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -41,7 +42,6 @@ async function parseName() {
|
|||||||
*/
|
*/
|
||||||
async function PapaParse(department, num, name, sem) {
|
async function PapaParse(department, num, name, sem) {
|
||||||
let cData = '';
|
let cData = '';
|
||||||
// console.log(sem);
|
|
||||||
let url = '';
|
let url = '';
|
||||||
switch (sem) {
|
switch (sem) {
|
||||||
case 'f2022':
|
case 'f2022':
|
||||||
@@ -70,17 +70,18 @@ async function PapaParse(department, num, name, sem) {
|
|||||||
.filter(cData => cData["Course Title"].includes(name));
|
.filter(cData => cData["Course Title"].includes(name));
|
||||||
if(selectedClass.length == 0) {
|
if(selectedClass.length == 0) {
|
||||||
// Possible that the class name was typed wrong; try again with just the course number
|
// Possible that the class name was typed wrong; try again with just the course number
|
||||||
console.log("Second Option");
|
console.log("Invalid name; trying again with just the course number");
|
||||||
selectedClass = cData.filter(cData => cData["Course Prefix"].includes(department))
|
selectedClass = cData.filter(cData => cData["Course Prefix"].includes(department))
|
||||||
.filter(cData => cData["Course Number"] == num.toString().toUpperCase());
|
.filter(cData => cData["Course Number"] == num.toString().toUpperCase());
|
||||||
}
|
}
|
||||||
if(selectedClass.length == 0) {
|
if(selectedClass.length == 0) {
|
||||||
// Still can't find anything? Just exit without making a chart and alert that nothing could be found
|
// Still can't find anything? Just exit without making a chart and alert that nothing could be found
|
||||||
alert("No data found");
|
alert("No data found. Try again :(");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(selectedClass);
|
console.log(selectedClass);
|
||||||
|
|
||||||
let gradeDist = {
|
let gradeDist = {
|
||||||
"A": 0,
|
"A": 0,
|
||||||
'A-': 0,
|
'A-': 0,
|
||||||
@@ -96,31 +97,24 @@ async function PapaParse(department, num, name, sem) {
|
|||||||
'F': 0,
|
'F': 0,
|
||||||
'Other': 0
|
'Other': 0
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let lableName = selectedClass[0]["Course Title"];
|
||||||
for(i in selectedClass) {
|
for(i in selectedClass) {
|
||||||
let letterGrade = selectedClass[i]["Letter Grade"];
|
let letterGrade = selectedClass[i]["Letter Grade"];
|
||||||
let cnt = selectedClass[i]["Count of letter grade"]
|
let cnt = selectedClass[i]["Count of letter grade"]
|
||||||
gradeDist[letterGrade] += cnt;
|
gradeDist[letterGrade] += cnt;
|
||||||
|
if(!(lableName === selectedClass[i]["Course Title"])) {
|
||||||
|
lableName = "Multiple courses found using the same ID; try specifying a course name!"
|
||||||
|
}
|
||||||
// console.log(selectedClass[i]["Letter Grade"]);
|
// console.log(selectedClass[i]["Letter Grade"]);
|
||||||
// console.log(selectedClass[i]["Count of letter grade"]);
|
// console.log(selectedClass[i]["Count of letter grade"]);
|
||||||
}
|
}
|
||||||
console.log(gradeDist);
|
console.log(gradeDist);
|
||||||
if(gradeChart) {
|
if(gradeChart) {
|
||||||
gradeChart.config.data = {
|
gradeChart.config.data = {
|
||||||
labels: [
|
labels: gradeLabels,
|
||||||
'A',
|
|
||||||
'A-',
|
|
||||||
'B+',
|
|
||||||
'B',
|
|
||||||
'B-',
|
|
||||||
'C+',
|
|
||||||
'C',
|
|
||||||
'C-',
|
|
||||||
'D+',
|
|
||||||
'D',
|
|
||||||
'D-',
|
|
||||||
'F'],
|
|
||||||
datasets: [{
|
datasets: [{
|
||||||
label: 'Grade distribution for \"' + selectedClass[0]["Course Title"] +"\"",
|
label: 'Grade distribution for \"' + lableName +"\"",
|
||||||
data: Object.values(gradeDist),
|
data: Object.values(gradeDist),
|
||||||
borderWidth: 2,
|
borderWidth: 2,
|
||||||
// borderColor: '#36A2EB',
|
// borderColor: '#36A2EB',
|
||||||
@@ -129,8 +123,9 @@ async function PapaParse(department, num, name, sem) {
|
|||||||
};
|
};
|
||||||
gradeChart.update();
|
gradeChart.update();
|
||||||
} else {
|
} else {
|
||||||
loadChart(gradeDist, selectedClass[0]["Course Title"]);
|
loadChart(gradeDist, lableName);
|
||||||
aboutDiv.style.visibility='hidden';
|
aboutDiv.style.visibility='hidden';
|
||||||
|
aboutDiv.style.display='none';
|
||||||
chartDiv.style.display = '';
|
chartDiv.style.display = '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -139,19 +134,7 @@ function loadChart(gradeDist, courseName) {
|
|||||||
gradeChart = new Chart(ctx, {
|
gradeChart = new Chart(ctx, {
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
data: {
|
data: {
|
||||||
labels: [
|
labels: gradeLabels,
|
||||||
'A',
|
|
||||||
'A-',
|
|
||||||
'B+',
|
|
||||||
'B',
|
|
||||||
'B-',
|
|
||||||
'C+',
|
|
||||||
'C',
|
|
||||||
'C-',
|
|
||||||
'D+',
|
|
||||||
'D',
|
|
||||||
'D-',
|
|
||||||
'F'],
|
|
||||||
datasets: [{
|
datasets: [{
|
||||||
label: 'Grade distribution for \"' + courseName + "\"",
|
label: 'Grade distribution for \"' + courseName + "\"",
|
||||||
data: Object.values(gradeDist),
|
data: Object.values(gradeDist),
|
||||||
|
|||||||
13
sitemap.xml
Normal file
13
sitemap.xml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<urlset
|
||||||
|
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
|
||||||
|
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
|
||||||
|
<url>
|
||||||
|
<loc>https://derec4.github.io/ut-grade-distribution-viewer/</loc>
|
||||||
|
<lastmod>2023-04-29T05:59:34+00:00</lastmod>
|
||||||
|
</url>
|
||||||
|
|
||||||
|
|
||||||
|
</urlset>
|
||||||
BIN
tempbg.png
BIN
tempbg.png
Binary file not shown.
|
Before Width: | Height: | Size: 1.7 MiB |
Reference in New Issue
Block a user