...
 
Commits (2)
function addClass() {
var newClass = document.getElementById("classes").value;
var classes = document.getElementById("classesTaken").value;
var newClass = document.getElementById("class").value;
var classes = document.getElementById("classes").value;
classes = classes.concat(newClass);
document.getElementById("classesTaken").value = classes + ",";
document.getElementById("classes").value = classes + ",";
}
function degreeSelectHandler(degree) {
var yearList = document.getElementById('YearList');
var specializationList = document.getElementById('SpecializationOfDegree');
var yearList = document.getElementById('year');
var specializationList = document.getElementById('specialization');
removeOptions(yearList);
removeOptions(specializationList);
......@@ -64,8 +64,8 @@ function goBack() {
}
function fillOutExample() {
document.getElementById("MajorList").value = "math";
document.getElementById("SpecializationOfDegree").value = "applied";
document.getElementById("YearList").value = "2015"
document.getElementById("classesTaken").value = "cs1337,phys2125,phys2126,phys2325,phys2326,chem1311,chem1111,math2417,hist1301,hist1302,math2419,govt2305,govt2306,rhet1302,cs2305,cs2336,cs3305,cs3340,math2418,ahst2331,math3310,cs3345,cs3341,cs4V98,math2451,math3311,math3323,ecs1200,ecs3390"
document.getElementById("major").value = "math";
document.getElementById("specialization").value = "applied";
document.getElementById("year").value = "2015"
document.getElementById("classes").value = "cs1337,phys2125,phys2126,phys2325,phys2326,chem1311,chem1111,math2417,hist1301,hist1302,math2419,govt2305,govt2306,rhet1302,cs2305,cs2336,cs3305,cs3340,math2418,ahst2331,math3310,cs3345,cs3341,cs4V98,math2451,math3311,math3323,ecs1200,ecs3390"
};
<!DOCTYPE html>
<html>
<body>
<script src="{{ url_for('static', filename='GAS.js') }}"></script>
<link rel="stylesheet" type="text/css" href="{{ url_for('static',filename='GAS.css') }}">
<div class="error">
<h1>An error has occured during your audit!</h1>
<p>
{% for line in error_message %}
{{line}}<br>
{% endfor %}
</p>
</div>
<button type="button" onclick="goBack()">Click here to go back</button>
<head>
<title> Graduation Audit System </title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href={{ url_for('static', filename='GAS.css') }}>
<link rel="shortcut icon" href={{ url_for('static', filename='favicon.ico') }} type="image/x-icon">
<link rel="icon" href={{ url_for('static', filename='favicon.ico') }} type="image/x-icon">
<script src={{ url_for('static', filename='GAS.js') }}></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
</body>
<body>
<h1>An error has occured during your audit!</h1>
<p>
{% for line in error_message %}
{{line}}<br>
{% endfor %}
</p>
<button type="button" onclick="goBack()">Click here to go back</button>
</body>
</html>
......@@ -9,6 +9,7 @@
<link rel="stylesheet" href={{ url_for('static', filename='GAS.css') }}>
<link rel="shortcut icon" href={{ url_for('static', filename='favicon.ico') }} type="image/x-icon">
<link rel="icon" href={{ url_for('static', filename='favicon.ico') }} type="image/x-icon">
<script src={{ url_for('static', filename='GAS.js') }}></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
......@@ -77,14 +78,17 @@
<div class="form-group">
<label for="classes">Type in your class number (ex: cs1336), and hit the "Add Class" button to enter it.</label>
<input list="classes-datalist" type="text" name="classes" id="classes" >
<input list="classes-datalist" type="text" name="class" id="class" >
{{ course_list() }}
<button type="button" onclick="addClass()">Add class</button>
</div>
<div class="form-group">
<label for="showClasses">Classes Taken</label><br>
<textarea name="classesTaken" id="classesTaken" rows="6" cols="60"></textarea>
<label for="classes">Classes Taken</label><br>
<textarea name="classes" id="classes" rows="6" cols="60"></textarea>
<div class="button">
<button type="button" onclick="fillOutExample()">Fill out Example</button>
</div>
<div class="button">
<input type="submit" value="Perform Audit"></input>
</div>
......
<!DOCTYPE html>
<html>
<body>
<link rel="stylesheet" type="text/css" href="{{url_for('static',filename='GAS.css') }}">
<div class="site">
<script src="{{ url_for('static', filename='GAS.js') }}"></script>
<div class="result">
<h1>Audit Result</h1>
{% if response.can_grad %}
<p>{{response.transcript.name}} is able to graduate with a degree in {{response.transcript.major}}.</p>
{% else %}
<p>{{response.transcript.name}} is not able to graduate.<br>To graduate, {{response.transcript.name}} needs to take <br></p>
<ul>
{% for class in response.missing_classes %}
<li>{{class}}</li>
{% endfor %}
{# ex: need 6 hours of americanHistory requirement #}
{% for type,number in response.missing_hours %}
<li>{{number}} hours of {{type}}</li>
{# 6 hours of americanHistory #}
{% endfor %}
{% if response.missing_electives != 0 %}
<li>{{response.missing_electives}} hours of elective credits</li>
{% endif %}
</ul>
{% endif %}
<button onclick="goBack()">Click here to go back</button>
</div>
</div>
</body>
<head>
<title> Graduation Audit System </title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href={{ url_for('static', filename='GAS.css') }}>
<link rel="shortcut icon" href={{ url_for('static', filename='favicon.ico') }} type="image/x-icon">
<link rel="icon" href={{ url_for('static', filename='favicon.ico') }} type="image/x-icon">
<script src={{ url_for('static', filename='GAS.js') }}></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<div class="result">
<h1>Audit Result</h1>
{% if response.can_grad %}
<p>{{response.transcript.name}} is able to graduate with a degree in {{response.transcript.major}}.</p>
{% else %}
<p>{{response.transcript.name}} is not able to graduate.<br>To graduate, {{response.transcript.name}} needs to take <br></p>
<ul>
{% for class in response.missing_classes %}
<li>{{class}}</li>
{% endfor %}
{# ex: need 6 hours of americanHistory requirement #}
{% for type,number in response.missing_hours %}
<li>{{number}} hours of {{type}}</li>
{# 6 hours of americanHistory #}
{% endfor %}
{% if response.missing_electives != 0 %}
<li>{{response.missing_electives}} hours of elective credits</li>
{% endif %}
</ul>
{% endif %}
<button onclick="goBack()">Click here to go back</button>
</div>
</body>
</html>