class_management_system

Senior Project - Spring 2019
Log | Files | Refs | README

commit a1f8c033caefbf8d4a9c8bf0fcad6b63b3806fe3
parent b4cfe2a5f05cf7410177fd429f659b43f6096f91
Author: John Kubach <johnkubach@gmail.com>
Date:   Thu, 25 Apr 2019 12:39:47 -0400

Merge branch 'feature/dropdown'

Diffstat:
Asrc/html/create.html | 787+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/html/download.html | 59+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Msrc/html/index.html | 972+++----------------------------------------------------------------------------
Asrc/html/login.html | 31+++++++++++++++++++++++++++++++
Asrc/html/status.html | 136+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Msrc/html/style.css | 257+++++++++++++++++++++++++++++++++++++++++--------------------------------------
Asrc/html/upload.html | 46++++++++++++++++++++++++++++++++++++++++++++++
Msrc/python/main.py | 154++++++++++++++++++++++++++++++++++++++++++++++++++-----------------------------
8 files changed, 1318 insertions(+), 1124 deletions(-)

diff --git a/src/html/create.html b/src/html/create.html @@ -0,0 +1,787 @@ +<!DOCTYPE html> +<html> +<head> + <link rel="stylesheet" href="{{ url_for('static',filename='styles/style.css') }}"> +</head> + +<body> +<!--==============$$ Start of buttons $$==================================--> +<form action="/navbar" method=POST> +<button name="home" type=submit class= "tablink">Home</button> +<button name="upload" type=submit class= "tablink">Upload</button> +<button name="download" type=submit class= "tablink">Download</button> +<button name="status" type=submit class= "tablink">Status</button> +</form> + +<!--=============## end ##================================================--> + + <!--========= Fields that can be found after entering password ============--> + <form action="" method=POST> + + <a id="fadeableMain" style="display: block;"> + + <center> + <h2> + New {{ dept[0] }} Proposal + </h2> + </center> + + <h4>Proposal Title: + <input type="text" name="title"><br> + </h4> + + <h4>Proposal Description: + <input type="text" name="description"><br> + </h4> + + <h4>Sponsor: + <input type="text" name="sponsor"><br> + </h4> + + <h4>Sponsor's Email Address: + <input type="text" name="sponsor_email"><br> + </h4> + + <h4>Co-Sponsor: + <input type="text" name="cosponsor"><br> + </h4> + + <h4>Co-Sponsor's Email Address: + <input type="text" name="cosponsor_email"><br> + </h4> + + <h4>Effective Term Year: + <select> + <option disabled selected value> -- select an option -- </option> + <option value="202040">202040 FALL 2020</option> + <option value="202020">202020 SPRING 2020</option> + <option value="201940">201940 FALL 2019</option> + <option value="201920">201920 SPRING 2019</option> + </select> + </h4> + <!--==========## end of fields after login ##==========--> + + <!----> + <h4>Proposing School/College: + <select> + <option disabled selected value> -- select an option -- </option> + <option value="school_buisness">College of Buisness</option> + <option value="school_art">College of Com. & Creative Art</option> + <option value="school_education">College of Education</option> + <option value="school_engineering">College of Engineering</option> + <option value="school_humanity">College of Hum. & Soc. Sci.</option> + <option value="school_performing">College of Performing Arts</option> + <option value="school_math">College of Sci & Math</option> + <option value="school_honors">Honors College</option> + <option value="school_environment">School of Earth & Environment</option> + <option value="school_health">School of Health Professions</option> + </select> + </h4> + + <h4>Curriculum Change Proposal Type: + <select name=proposal_type onchange="fieldappear(this);"> + <option disabled selected value> -- select an option -- </option> + <option value="form_A">New Course</option> + <option value="form_B">Change to Existing Course</option> + <option value="form_C">New Degree/ Program</option> + <option value="form_D">Change to Existing Degree/ Program</option> + <option value="form_E">Accelerated Undergrad/ Grad Dual Degree Program</option> + <option value="form_F">Quasi Cerricular Proposal</option> + </select> + </h4> + + </a> + + <a id="fadeableA" style="display: none;"> + + <br> + <h2>Course Information</h2> + + <h4>Course Subject: + <input type="text" name="course_subject"><br> + </h4> + + <h4>Credit Type: + <select> + <option disabled selected value> -- select an option -- </option> + <option value="ct_fixed">Fixed</option> + <option value="ct_variable">Variable</option> + </select> + </h4> + + <h4>Grade Mode: + <select> + <option disabled selected value> -- select an option -- </option> + <option value="gm_satisfactory">Satisfactory/Unsatisfactory</option> + <option value="gm_pass">Pass/No Credit</option> + <option value="gm_regular">Regular (A,B,C,etc.)</option> + </select> + </h4> + + <h4>Additional grade mode option/ include explenation: + <input type="text" name="additional_grade_mode"><br> + </h4> + + <h4>Course Number: + <input type="text" name="course_number"><br> + </h4> + + <h4>Student Credits: + <input type="text" name="student_credits"><br> + </h4> + + <h4>Faculty Credits: + <input type="text" name="faculty_credits"><br> + </h4> + + <h4>Course Title: + <input type="text" name="course_title"><br> + </h4> + + <h4>If student and faculty credits do not match please provide an explanation: + <input type="text" name="credit_explanation"><br> + </h4> + + <h4>Prerequisites (Include prefix(es) and title(s) unless there are none, then state NONE): + <input type="text" name="prerequisite"><br> + </h4> + + <h4>Co-Requisite(s): + <input type="text" name="corequisite"><br> + </h4> + + <h4> + <input type="checkbox" name="check1" value="rowan_core">Rowan Core<br> + </h4> + + <h4> + <input type="checkbox" name="check2" value="writing_intensive">Writing Intensive<br> + </h4> + + <h4>Course Description: + <input type="text" name="course_description"><br> + </h4> + + <h4> + <input type="checkbox" name="check3" value="writing_intensive">Could this be offered online or by Rowan Global now or in the future?<br> + </h4> + + <h4>Course Rationale: + <input type="text" name="course_rationale"><br> + </h4> + + <br> + <h2>Curricular Effect</h2> + + <h4>Elective/Required: + <select> + <option disabled selected value> -- select an option -- </option> + <option value="elective">Elective</option> + <option value="required">Required</option> + </select> + </h4> + + <h4>Course Effect for Students: + <input type="text" name="course_effect_s"><br> + </h4> + + <h4>Course Effect on Other Courses: + <input type="text" name="course_effect_oc"><br> + </h4> + + <h4>Course Effect on Other Programs, Departments or Colleges: + <input type="text" name="course_effect_opdc"><br> + </h4> + + <br> + <h2>Essence of the Course</h2> + + <h4>Topical Outline/Content: + <input type="text" name="topical_oc"><br> + </h4> + + <h4>Evaluation of Students and Grading Procedure: + <input type="text" name="eosagp"><br> + </h4> + + <h4>Course Evaluation and Assessment: + <input type="text" name="ceaa"><br> + </h4> + + <br> + <h2>Resource Requirements</h2> + + <h4>Equipment Space Technology: + <select> + <option disabled selected value> -- select an option -- </option> + <option value="est_sufficient">Current Resources are Sufficient</option> + <option value="est_needed">Additional Resources are Needed</option> + </select> + </h4> + + <h4>Staffing Resources: + <select> + <option disabled selected value> -- select an option -- </option> + <option value="sr_sufficient">Current Resources are Sufficient</option> + <option value="sr_needed">Additional Resources are Needed</option> + </select> + </h4> + + <h4>Library Resources: + <select> + <option disabled selected value> -- select an option -- </option> + <option value="lr_sufficient">Current Resources are Sufficient</option> + <option value="lr_needed">Additional Resources are Needed</option> + </select> + </h4> + + <br> + <h2>Results of Consultation</h2> + + <h4>Consultations Required: + <select> + <option disabled selected value> -- select an option -- </option> + <option value="consultations_yes">Yes</option> + <option value="consultations_no">No</option> + </select> + </h4> + + <br> + <h2>Documents</h2> + <h3>-Program Guide (Required)</h3> + <h3>-Library Resource Form (Required)</h3> + <h3>-Assessment (Required)</h3> + <h3>-Consultation Letters</h3> + <h3>-Additional Supporting Documentation</h3> + </a> + + <a id="fadeableB" style="display: none;"> + + <br> + <h2>Course Information</h2> + + <h4>Course Subject: + <input type="text" name="course_subject"><br> + </h4> + + <h4>Course Number: + <input type="text" name="course_number"><br> + </h4> + + <h4>Course Title: + <input type="text" name="course_title"><br> + </h4> + + <br> + <h2>Curricular Effect</h2> + + <h4>Elective/Required: + <select> + <option disabled selected value> -- select an option -- </option> + <option value="elective">Elective</option> + <option value="required">Required</option> + </select> + </h4> + + <h4>Course Effect for Students: + <input type="text" name="course_effect_s"><br> + </h4> + + <h4>Course Effect on Other Courses: + <input type="text" name="course_effect_oc"><br> + </h4> + + <h4>Course Effect on Other Programs, Departments or Colleges: + <input type="text" name="course_effect_opdc"><br> + </h4> + + <br> + <h2>Changes</h2> + + <h2>INSERT ADDING NEW COURSE CHANGE BOX WITH A FROM, TO, and EXPLENATION WHY</h2> + + <br> + <h2>Results of Consultations</h2> + + <h4>Consultations Required: + <select> + <option disabled selected value> -- select an option -- </option> + <option value="consultations_yes">Yes</option> + <option value="consultations_no">No</option> + </select> + </h4> + + <br> + <h2>Documents</h2> + <h3>-Program Guide (Required)</h3> + <h3>-Library Resource Form</h3> + <h3>-Consultation Letters</h3> + <h3>-Additional Supporting Documentation</h3> + </a> + + <a id="fadeableC" style="display: none;"> + + <br> +<!--===================$$ Options for Degree information $$================================--> + <h2>Degree Program Information</h2> + + <h4>Degree Program Credentials: + <select> + <option disabled selected value> -- select an option -- </option> + <option value="dpc_ba">B.A.</option> + <option value="dpc_bfa">B.F.A.</option> + <option value="dpc_bgs">B.G.S.</option> + <option value="dpc_bm">B.M.</option> + <option value="dpc_bs">B.S.</option> + <option value="dpc_bsn">B.S.N.</option> + <option value="dpc_cags">CAGS</option> + <option value="dpc_certif">Certif</option> + <option value="dpc_cogs">COGS</option> + <option value="dpc_cugs">CUGS</option> + <option value="dpc_edd">Ed.D.</option> + <option value="dpc_eds">Ed.S.</option> + <option value="dpc_gradcert">Grad. Cert.</option> + <option value="dpc_ma">M.A.</option> + <option value="dpc_mba">M.B.A.</option> + <option value="dpc_mem">M.E.M.</option> + <option value="dpc_med">M.Ed.</option> + <option value="dpc_mm">M.M.</option> + <option value="dpc_ms">M.S.</option> + <option value="dpc_msn">M.S.N.</option> + <option value="dpc_mst">M.S.T.</option> + <option value="dpc_phd">Ph.D.</option> + <option value="dpc_phdma">Ph.D. (including M.A.)</option> + <option value="dpc_phdms">Ph.D. (including M.S.)</option> + <option value="dpc_minor">Minor</option> + <option value="dpc_concentration">Concentration</option> + <option value="dpc_postbacc">Post-Bacc</option> + </select> +<!--===============## end of options ##=========================================--> + </h4> + + <h4>Degree Program Name: + <input type="text" name="degree_program_name"><br> + </h4> + + <h4>Date of BOT Academic Subcommittee Approval: + <input type="text" name="degree_program_name"><br> + </h4> + + <h4> + <input type="checkbox" name="check3" value="writing_intensive">Could this be offered online or by Rowan Global now or in the future?<br> + </h4> + + <h4>CIP Code Number: + <input type="text" name="cip_code_number"><br> + </h4> + + <h4>CIP Title: + <input type="text" name="cip_title"><br> + </h4> + + <h4>Scope and Size of Program: + <input type="text" name="saso_program"><br> + </h4> + + <h4>Related Curriculum Proposals Being Submitted Simultaneously: + <input type="text" name="rcpbss"><br> + </h4> + + <br> + <h2>Requirements for Admission & Graduation</h2> + + <h4>Admission: + <input type="text" name="admission"><br> + </h4> + + <h4>Graduation: + <input type="text" name="graduation"><br> + </h4> + + <h4>Student Status: + <input type="text" name="student_status"><br> + </h4> + + <br> + <h2>Rationale</h2> + + <h4>General Merit of Proposal: + <input type="text" name="merit_of_proposal"><br> + </h4> + + <h4>Relationship to Existing Programs of Offerings: + <input type="text" name="rtepoo"><br> + </h4> + + <br> + <h2>Program Description</h2> + + <h4>Administration: + <input type="text" name="administration"><br> + </h4> + + <h4>Program Evauation: + <input type="text" name="program_evaluation"><br> + </h4> + + <br> + <h2>Resource Requirements</h2> + + <h4>Equipment Space Technology: + <select> + <option disabled selected value> -- select an option -- </option> + <option value="est_sufficient">Current Resources are Sufficient</option> + <option value="est_needed">Additional Resources are Needed</option> + </select> + </h4> + + <h4>Staffing Resources: + <select> + <option disabled selected value> -- select an option -- </option> + <option value="sr_sufficient">Current Resources are Sufficient</option> + <option value="sr_needed">Additional Resources are Needed</option> + </select> + </h4> + + <h4>Library Resources: + <select> + <option disabled selected value> -- select an option -- </option> + <option value="lr_sufficient">Current Resources are Sufficient</option> + <option value="lr_needed">Additional Resources are Needed</option> + </select> + </h4> + + <br> + <h2>Results of Consultations</h2> + + <h4>Consultations Requested: + <select> + <option disabled selected value> -- select an option -- </option> + <option value="consultations_yes">Yes</option> + <option value="consultations_no">No</option> + </select> + </h4> + + <br> + <h2>Documents</h2> + <h3>-Program Guide (Required)</h3> + <h3>-Library Resource Form (Required)</h3> + <h3>-Assessment (Required)</h3> + <h3>-Consultation Letters</h3> + <h3>-Additional Supporting Documentation</h3> + </a> + + <a id="fadeableD" style="display: none;"> + + <br> + <h2>Degree Program Information</h2> + + <h4>Degree Program Credentials: + <select> + <option disabled selected value> -- select an option -- </option> + <option value="dpc_ba">B.A.</option> + <option value="dpc_bfa">B.F.A.</option> + <option value="dpc_bgs">B.G.S.</option> + <option value="dpc_bm">B.M.</option> + <option value="dpc_bs">B.S.</option> + <option value="dpc_bsn">B.S.N.</option> + <option value="dpc_cags">CAGS</option> + <option value="dpc_certif">Certif</option> + <option value="dpc_cogs">COGS</option> + <option value="dpc_cugs">CUGS</option> + <option value="dpc_edd">Ed.D.</option> + <option value="dpc_eds">Ed.S.</option> + <option value="dpc_gradcert">Grad. Cert.</option> + <option value="dpc_ma">M.A.</option> + <option value="dpc_mba">M.B.A.</option> + <option value="dpc_mem">M.E.M.</option> + <option value="dpc_med">M.Ed.</option> + <option value="dpc_mm">M.M.</option> + <option value="dpc_ms">M.S.</option> + <option value="dpc_msn">M.S.N.</option> + <option value="dpc_mst">M.S.T.</option> + <option value="dpc_phd">Ph.D.</option> + <option value="dpc_phdma">Ph.D. (including M.A.)</option> + <option value="dpc_phdms">Ph.D. (including M.S.)</option> + <option value="dpc_minor">Minor</option> + <option value="dpc_concentration">Concentration</option> + <option value="dpc_postbacc">Post-Bacc</option> + </select> + </h4> + + <h4>Degree Program Name: + <input type="text" name="degree_program_name"><br> + </h4> + + <h4>Related Curriculum Proposals Being Submitted Simultaneously: + <input type="text" name="degree_program_name"><br> + </h4> + + <h4>Four or more changes: + <select> + <option disabled selected value> -- select an option -- </option> + <option value="four_changes_yes">Yes</option> + <option value="four_chanes_no">No</option> + </select> + </h4> + + <br> + <h2>Degree Program Changes</h2> + + <h4>INSERT ADDING NEW COURSE CHANGE BOX WITH A FROM, TO, and EXPLENATION WHY</h4> + + <br> + <h2>Results of Consultations</h2> + + <h4>Consultations Requested: + <select> + <option disabled selected value> -- select an option -- </option> + <option value="consultations_yes">Yes</option> + <option value="consultations_no">No</option> + </select> + </h4> + + <br> + <h2>Documents</h2> + <h3>-Program Guide (Required)</h3> + <h3>-Consultation Letters</h3> + <h3>-Additional Supporting Documentation</h3> + </a> + + <a id="fadeableE" style="display: none;"> + + <br> + <h2>Degree Program Information</h2> + + <h4>Undergraduate Degree Program Credential: + <select> + <option disabled selected value> -- select an option -- </option> + <option value="dpc_ba">B.A.</option> + <option value="dpc_bfa">B.F.A.</option> + <option value="dpc_bgs">B.G.S.</option> + <option value="dpc_bm">B.M.</option> + <option value="dpc_bs">B.S.</option> + <option value="dpc_bsn">B.S.N.</option> + <option value="dpc_cags">CAGS</option> + <option value="dpc_certif">Certif</option> + <option value="dpc_cogs">COGS</option> + <option value="dpc_cugs">CUGS</option> + <option value="dpc_edd">Ed.D.</option> + <option value="dpc_eds">Ed.S.</option> + <option value="dpc_gradcert">Grad. Cert.</option> + <option value="dpc_ma">M.A.</option> + <option value="dpc_mba">M.B.A.</option> + <option value="dpc_mem">M.E.M.</option> + <option value="dpc_med">M.Ed.</option> + <option value="dpc_mm">M.M.</option> + <option value="dpc_ms">M.S.</option> + <option value="dpc_msn">M.S.N.</option> + <option value="dpc_mst">M.S.T.</option> + <option value="dpc_phd">Ph.D.</option> + <option value="dpc_phdma">Ph.D. (including M.A.)</option> + <option value="dpc_phdms">Ph.D. (including M.S.)</option> + <option value="dpc_minor">Minor</option> + <option value="dpc_concentration">Concentration</option> + <option value="dpc_postbacc">Post-Bacc</option> + </select> + </h4> + + <h4>Undergraduate Degree Program Name: + <input type="text" name="udpn"><br> + </h4> + + <h4>Graduate Degree Program Credential: + <select> + <option disabled selected value> -- select an option -- </option> + <option value="dpc_ba">B.A.</option> + <option value="dpc_bfa">B.F.A.</option> + <option value="dpc_bgs">B.G.S.</option> + <option value="dpc_bm">B.M.</option> + <option value="dpc_bs">B.S.</option> + <option value="dpc_bsn">B.S.N.</option> + <option value="dpc_cags">CAGS</option> + <option value="dpc_certif">Certif</option> + <option value="dpc_cogs">COGS</option> + <option value="dpc_cugs">CUGS</option> + <option value="dpc_edd">Ed.D.</option> + <option value="dpc_eds">Ed.S.</option> + <option value="dpc_gradcert">Grad. Cert.</option> + <option value="dpc_ma">M.A.</option> + <option value="dpc_mba">M.B.A.</option> + <option value="dpc_mem">M.E.M.</option> + <option value="dpc_med">M.Ed.</option> + <option value="dpc_mm">M.M.</option> + <option value="dpc_ms">M.S.</option> + <option value="dpc_msn">M.S.N.</option> + <option value="dpc_mst">M.S.T.</option> + <option value="dpc_phd">Ph.D.</option> + <option value="dpc_phdma">Ph.D. (including M.A.)</option> + <option value="dpc_phdms">Ph.D. (including M.S.)</option> + <option value="dpc_minor">Minor</option> + <option value="dpc_concentration">Concentration</option> + <option value="dpc_postbacc">Post-Bacc</option> + </select> + </h4> + + <h4>Graduate Degree Program Name: + <input type="text" name="gdpn"><br> + </h4> + + <h4>Undergraduate CIP Code Number: + <input type="text" name="ucip_code_number"><br> + </h4> + + <h4>Undergraduate CIP Title: + <input type="text" name="ucip_title"><br> + </h4> + + <h4>Graduate CIP Code Number: + <input type="text" name="gcip_code_number"><br> + </h4> + + <h4>Graduate CIP Title: + <input type="text" name="gcip_title"><br> + </h4> + + <h4>Scope and Size of Program: + <input type="text" name="size_of_program"><br> + </h4> + + <h4>Related Curriculum Proposals Being Submitted Simultaneously: + <input type="text" name="rcpbss"><br> + </h4> + + <br> + <h2>Requirements for Admission & Graduation</h2> + + <h4>Admission: + <input type="text" name="admission"><br> + </h4> + + <h4>Graduation: + <input type="text" name="graduation"><br> + </h4> + + <h4>Student Status: + <input type="text" name="student_status"><br> + </h4> + + <br> + <h2>Rationale</h2> + + <h4>General Merit of Proposal: + <input type="text" name="merit_of_proposal"><br> + </h4> + + <br> + <h2>Program Description</h2> + + <h4>Program Curriculum: + <input type="text" name="administration"><br> + </h4> + + <h4>Administration: + <input type="text" name="administration"><br> + </h4> + + <h4>Program Evauation: + <input type="text" name="program_evaluation"><br> + </h4> + + <br> + <h2>Resource Requirements</h2> + + <h4>Equipment Space Technology: + <select> + <option disabled selected value> -- select an option -- </option> + <option value="est_sufficient">Current Resources are Sufficient</option> + <option value="est_needed">Additional Resources are Needed</option> + </select> + </h4> + + <h4>Staffing Resources: + <select> + <option disabled selected value> -- select an option -- </option> + <option value="sr_sufficient">Current Resources are Sufficient</option> + <option value="sr_needed">Additional Resources are Needed</option> + </select> + </h4> + + <h4>Library Resources: + <select> + <option disabled selected value> -- select an option -- </option> + <option value="lr_sufficient">Current Resources are Sufficient</option> + <option value="lr_needed">Additional Resources are Needed</option> + </select> + </h4> + + <br> + <h2>Results of Consultations</h2> + + <h4>Consultations Requested: + <select> + <option disabled selected value> -- select an option -- </option> + <option value="consultations_yes">Yes</option> + <option value="consultations_no">No</option> + </select> + </h4> + + <br> + <h2>Documents</h2> + <h3>-Program Guide (Required)</h3> + <h3>-Consultation Letters</h3> + <h3>-Additional Supporting Documentation</h3> + </a> + + <a id="fadeableF" style="display: none;"> + + <br> + <h2>Quasi Curricular Proposal</h2> + + <h4>Quasi Curricular Reason: + <select> + <option disabled selected value> -- select an option -- </option> + <option value="qcr1">Change the name of an existing degree or degree-related + program (BA/BS, MA/MS, Ph.D. or minor, concentration or + any other type of certificate).</option> + <option value="qcr2">Dissolve or suspend an existing degree</option> + <option value="qcr3">Create or dissolve a department, school or college, or + other academic unit</option> + <option value="qcr4">Move a department from one college to another college or + academic unit</option> + <option value="qcr5">Change the name or structure of a department, school or + college, or academic unit</option> + <option value="qcr6">Change curriculum approval processes</option> + </select> + </h4> + + <br> + <h2>Rationale</h2> + + <h4>General Merit of Proposal: + <input type="text" name="merit_of_proposal"><br> + </h4> + + <br> + <h2>Curricular Effect</h2> + + <h4>Course Effect on Other Programs, Departments or Colleges: + <input type="text" name="course_effect_opdc"><br> + </h4> + + <br> + <h2>Documents</h2> + <h3>-Program Guide</h3> + <h3>-Library Resource Form</h3> + <h3>-Assessment</h3> + <h3>-Consultation Letters (Required)</h3> + <h3>-Additional Supporting Documentation</h3> + </a> + <input class="button" type=submit value=Create> + </form> + +</div> +</body> +<!--========================## end ##===============================================================--> + + <script type="text/javascript" src="{{ url_for('static', filename='javascript.js') }}"></script> diff --git a/src/html/download.html b/src/html/download.html @@ -0,0 +1,59 @@ +<!DOCTYPE html> +<html> +<head> + <link rel="stylesheet" href="{{ url_for('static',filename='styles/style.css') }}"> +</head> + +<body> +<!--=================$$ Start Of Download $$===========================--> +<form action="/navbar" method=POST> +<button name="home" type=submit class= "tablink">Home</button> +<button name="upload" type=submit class= "tablink">Upload</button> +<button name="download" type=submit class= "tablink">Download</button> +<button name="status" type=submit class= "tablink">Status</button> +</form> + +<!––The Download page––> +<div id="Download" class="tabcontent"> + <center> + <h1>Download Page</h1> + + <h3>Document Type</h3> + + <form action="" method=POST> + <select name="document"> + <option disabled selected value> -- select an option -- </option> + <option value="-a">Assessement Form</option> + <option value="-l">Library Form</option> + <option value="-s">Supporting Document</option> + <option value="-p">Program Guide</option> + <option value="-c">Consultation Letters</option> + </select> + <br> + <input class="button" type=submit value=Select> + </form> + + <br> + <br> + <h3>Version</h3> + + <form action="" method=GET> + <select name = "revision"> + {% if doc != "-c" %} + {% for r in revision %} + <option value="{{ r[0] }}">Version {{ loop.index }}</option> + {% endfor %} + {% else %} + {% for r in revision %} + <option value="{{ r[0] }}">Consultation Letter {{ loop.index }}</option> + {% endfor %} + {% endif %} + </select> + <br> + <input class="button" type=submit value=Download> + </form> + + </center> +</div> +<!--====================## end ##===========================--> + <script type="text/javascript" src="{{ url_for('static', filename='javascript.js') }}"></script> diff --git a/src/html/index.html b/src/html/index.html @@ -21,966 +21,50 @@ Description: Last edit: 4/3/19 -------------------------------------------------------------------------------> <head> - <link rel="stylesheet" href="style.css"> + <link rel="stylesheet" href="{{ url_for('static',filename='styles/style.css') }}"> </head> <body> <!--==============$$ Start of buttons $$==================================--> -<button class="tablink" onclick="openPage('Home', this, '#57150B')" id="defaultOpen">Home</button> -<button class="tablink" onclick="openPage('Upload', this, '#57150B')">Upload</button> -<button class="tablink" onclick="openPage('Download', this, '#57150B')">Download</button> -<button class="tablink" onclick="openPage('Status', this, '#57150B')">Status</button> +<form action="/navbar" method=POST> +<button name="home" type=submit class= "tablink">Home</button> +<button name="upload" type=submit class= "tablink">Upload</button> +<button name="download" type=submit class= "tablink">Download</button> +<button name="status" type=submit class= "tablink">Status</button> +</form> + <!--=============## end ##================================================--> <!--==============$$ Start Of Home Page $$================================--> <!––The Home page––> -<div id="Home" class="tabcontent"> +<div id="mainbody" class="tabcontent"> <!--======= Image For Home page =======--> <center> - <img src="img/Rowan_University_seal.svg.png" alt="Rowan University"> - <h1>Rowan Curricular Proposal Management System</h1> - </center> - - <a id="fadeableMain2" style="display: block;"> - - <!--===== Options for your deparment choice so you can login =======--> - <h4>Select Your Department: - <select id="department"> - <option disabled selected value> -- select an option -- </option> - <option value="af">Accounting & Finance</option> - <option value="a">Art</option> - <option value="b">Biology</option> - <option value="be">Biomedical Engineering</option> - <option value="ce">Chemical Engineering</option> - <option value="cb">Chemistry & Biochemistry</option> - <option value="cee">Civil & Environmental Eng.</option> - <option value="cs">Communication Studies</option> - <option value="cs">Computer Science</option> - <option value="esl">Ed Services & Leadership</option> - <option value="ece">Electrical & Computer Engin</option> - <option value="e">English</option> - <option value="es">Environmental Science</option> - <option value="eee">Experiential Engineering Education</option> - <option value="gps">Geography Pling & Sustainablty</option> - <option value="g">Geology</option> - <option value="hes">Health & Exercise Science</option> - <option value="h">History</option> - <option value="h">Honors</option> - <option value="iie">Interdiscipl. & Inclusive Edu</option> - <option value="j">Journalism</option> - <option value="llse">Lang Lit & Sociocultural Edu</option> - <option value="lj">Law/ Justice</option> - <option value="me">Management & Entrepreneurship</option> - <option value="mbis">Marketing & Buisness Info Sys</option> - <option value="m">Mathematics</option> - <option value="me">Mechanical Engineering</option> - <option value="mcb">Molecular & Cellular Biosci</option> - <option value="m">Music</option> - <option value="n">Nursing</option> - <option value="pr">Philosophy-Religion</option> - <option value="pa">Physics & Astronomy</option> - <option value="pse">Political Science & Economics</option> - <option value="p">Psychology</option> - <option value="pra">Public Relations-Advertising</option> - <option value="rtf">Radio/TV/Film</option> - <option value="steam">Sci Tech Eng Art & Math = STEAM</option> - <option value="sa">Sociology & Anthropology</option> - <option value="td">Theatre-Dance</option> - <option value="wl">World Languages</option> - <option value="wa">Writing Arts</option> - </select> - </h4> - - <!--========== Password word lock on Home Page ==============--> - <h4>Password: - <input type="password" name="pwd" id="pwd" value=""></input> - </h4> - - </a> - <!--====== Enter button for the password that you input =======--> - <center> - <h1> - <a href="#" class="button" onclick="mainappear(pwd, department, this);">Enter</a> - </h1> - </center> - - <!--========= Fields that can be found after entering password ============--> - <center> - <h2> - <a id="department_name"></a> - </h2> - </center> - - <a id="fadeableMain" style="display: none;"> - - <!--===========$$ Sponsor input $$================--> - <h4>Sponsor: - <input type="text" name="sponsor"><br> - </h4> - - <h4>Sponsor's Email Address: - <input type="text" name="sponsor_email"><br> - </h4> - - <h4>Co-Sponsor: - <input type="text" name="cosponsor"><br> - </h4> - - <h4>Co-Sponsor's Email Address: - <input type="text" name="cosponsor_email"><br> - </h4> - - <h4>Effective Term Year: - <select> - <option disabled selected value> -- select an option -- </option> - <option value="202040">202040 FALL 2020</option> - <option value="202020">202020 SPRING 2020</option> - <option value="201940">201940 FALL 2019</option> - <option value="201920">201920 SPRING 2019</option> - </select> - </h4> - <!--==========## end of fields after login ##==========--> - - <!--====== Deparments of the schools who can create proposing ===========--> - <h4>Proposing School/College: - <select> - <option disabled selected value> -- select an option -- </option> - <option value="school_buisness">College of Buisness</option> - <option value="school_art">College of Com. & Creative Art</option> - <option value="school_education">College of Education</option> - <option value="school_engineering">College of Engineering</option> - <option value="school_humanity">College of Hum. & Soc. Sci.</option> - <option value="school_performing">College of Performing Arts</option> - <option value="school_math">College of Sci & Math</option> - <option value="school_honors">Honors College</option> - <option value="school_environment">School of Earth & Environment</option> - <option value="school_health">School of Health Professions</option> - </select> - </h4> - - <!--==========$ These will be the different proposal types $===========--> - <h4>Curriculum Change Proposal Type: - <select onchange="fieldappear(this);"> - <option disabled selected value> -- select an option -- </option> - <option value="form_A">New Course</option> - <option value="form_B">Change to Existing Course</option> - <option value="form_C">New Degree/ Program</option> - <option value="form_D">Change to Existing Degree/ Program</option> - <option value="form_E">Accelerated Undergrad/ Grad Dual Degree Program</option> - <option value="form_F">Quasi Cerricular Proposal</option> - </select> - </h4> - - </a> - - <a id="fadeableA" style="display: none;"> - - <br> - - <h2>Course Information</h2> - - <h4>Course Subject: - <input type="text" name="course_subject"><br> - </h4> - - <h4>Credit Type: - <select> - <option disabled selected value> -- select an option -- </option> - <option value="ct_fixed">Fixed</option> - <option value="ct_variable">Variable</option> - </select> - </h4> - - <h4>Grade Mode: - <select> - <option disabled selected value> -- select an option -- </option> - <option value="gm_satisfactory">Satisfactory/Unsatisfactory</option> - <option value="gm_pass">Pass/No Credit</option> - <option value="gm_regular">Regular (A,B,C,etc.)</option> - </select> - </h4> - - <h4>Additional grade mode option/ include explenation: - <input type="text" name="additional_grade_mode"><br> - </h4> - - <h4>Course Number: - <input type="text" name="course_number"><br> - </h4> - - <h4>Student Credits: - <input type="text" name="student_credits"><br> - </h4> - - <h4>Faculty Credits: - <input type="text" name="faculty_credits"><br> - </h4> - - <h4>Course Title: - <input type="text" name="course_title"><br> - </h4> - - <h4>If student and faculty credits do not match please provide an explanation: - <input type="text" name="credit_explanation"><br> - </h4> - - <h4>Prerequisites (Include prefix(es) and title(s) unless there are none, then state NONE): - <input type="text" name="prerequisite"><br> - </h4> - - <h4>Co-Requisite(s): - <input type="text" name="corequisite"><br> - </h4> - - <h4> - <input type="checkbox" name="check1" value="rowan_core">Rowan Core<br> - </h4> - - <h4> - <input type="checkbox" name="check2" value="writing_intensive">Writing Intensive<br> - </h4> - - <h4>Course Description: - <input type="text" name="course_description"><br> - </h4> - - <h4> - <input type="checkbox" name="check3" value="writing_intensive">Could this be offered online or by Rowan Global now or in the future?<br> - </h4> - - <h4>Course Rationale: - <input type="text" name="course_rationale"><br> - </h4> - - <br> - <h2>Curricular Effect</h2> - - <h4>Elective/Required: - <select> - <option disabled selected value> -- select an option -- </option> - <option value="elective">Elective</option> - <option value="required">Required</option> - </select> - </h4> - - <h4>Course Effect for Students: - <input type="text" name="course_effect_s"><br> - </h4> - - <h4>Course Effect on Other Courses: - <input type="text" name="course_effect_oc"><br> - </h4> - - <h4>Course Effect on Other Programs, Departments or Colleges: - <input type="text" name="course_effect_opdc"><br> - </h4> - - <br> - <h2>Essence of the Course</h2> - - <h4>Topical Outline/Content: - <input type="text" name="topical_oc"><br> - </h4> - - <h4>Evaluation of Students and Grading Procedure: - <input type="text" name="eosagp"><br> - </h4> - - <h4>Course Evaluation and Assessment: - <input type="text" name="ceaa"><br> - </h4> - - <br> - <h2>Resource Requirements</h2> - - <h4>Equipment Space Technology: - <select> - <option disabled selected value> -- select an option -- </option> - <option value="est_sufficient">Current Resources are Sufficient</option> - <option value="est_needed">Additional Resources are Needed</option> - </select> - </h4> - - <h4>Staffing Resources: - <select> - <option disabled selected value> -- select an option -- </option> - <option value="sr_sufficient">Current Resources are Sufficient</option> - <option value="sr_needed">Additional Resources are Needed</option> - </select> - </h4> - - <h4>Library Resources: - <select> - <option disabled selected value> -- select an option -- </option> - <option value="lr_sufficient">Current Resources are Sufficient</option> - <option value="lr_needed">Additional Resources are Needed</option> - </select> - </h4> - - <br> - <h2>Results of Consultation</h2> - - <h4>Consultations Required: - <select> - <option disabled selected value> -- select an option -- </option> - <option value="consultations_yes">Yes</option> - <option value="consultations_no">No</option> - </select> - </h4> - - <br> - <h2>Documents</h2> - <h3>-Program Guide (Required)</h3> - <h3>-Library Resource Form (Required)</h3> - <h3>-Assessment (Required)</h3> - <h3>-Consultation Letters</h3> - <h3>-Additional Supporting Documentation</h3> - </a> - - <a id="fadeableB" style="display: none;"> - - <br> - <h2>Course Information</h2> - - <h4>Course Subject: - <input type="text" name="course_subject"><br> - </h4> - - <h4>Course Number: - <input type="text" name="course_number"><br> - </h4> - - <h4>Course Title: - <input type="text" name="course_title"><br> - </h4> - - <br> - <h2>Curricular Effect</h2> - - <h4>Elective/Required: - <select> - <option disabled selected value> -- select an option -- </option> - <option value="elective">Elective</option> - <option value="required">Required</option> - </select> - </h4> - - <h4>Course Effect for Students: - <input type="text" name="course_effect_s"><br> - </h4> - - <h4>Course Effect on Other Courses: - <input type="text" name="course_effect_oc"><br> - </h4> - - <h4>Course Effect on Other Programs, Departments or Colleges: - <input type="text" name="course_effect_opdc"><br> - </h4> - - <br> - <h2>Changes</h2> - - <h2>INSERT ADDING NEW COURSE CHANGE BOX WITH A FROM, TO, and EXPLENATION WHY</h2> - - <br> - <h2>Results of Consultations</h2> - - <h4>Consultations Required: - <select> - <option disabled selected value> -- select an option -- </option> - <option value="consultations_yes">Yes</option> - <option value="consultations_no">No</option> - </select> - </h4> - - <br> - <h2>Documents</h2> - <h3>-Program Guide (Required)</h3> - <h3>-Library Resource Form</h3> - <h3>-Consultation Letters</h3> - <h3>-Additional Supporting Documentation</h3> - </a> - - <a id="fadeableC" style="display: none;"> - - <br> -<!--===================$$ Options for Degree information $$================================--> - <h2>Degree Program Information</h2> - - <h4>Degree Program Credentials: - <select> - <option disabled selected value> -- select an option -- </option> - <option value="dpc_ba">B.A.</option> - <option value="dpc_bfa">B.F.A.</option> - <option value="dpc_bgs">B.G.S.</option> - <option value="dpc_bm">B.M.</option> - <option value="dpc_bs">B.S.</option> - <option value="dpc_bsn">B.S.N.</option> - <option value="dpc_cags">CAGS</option> - <option value="dpc_certif">Certif</option> - <option value="dpc_cogs">COGS</option> - <option value="dpc_cugs">CUGS</option> - <option value="dpc_edd">Ed.D.</option> - <option value="dpc_eds">Ed.S.</option> - <option value="dpc_gradcert">Grad. Cert.</option> - <option value="dpc_ma">M.A.</option> - <option value="dpc_mba">M.B.A.</option> - <option value="dpc_mem">M.E.M.</option> - <option value="dpc_med">M.Ed.</option> - <option value="dpc_mm">M.M.</option> - <option value="dpc_ms">M.S.</option> - <option value="dpc_msn">M.S.N.</option> - <option value="dpc_mst">M.S.T.</option> - <option value="dpc_phd">Ph.D.</option> - <option value="dpc_phdma">Ph.D. (including M.A.)</option> - <option value="dpc_phdms">Ph.D. (including M.S.)</option> - <option value="dpc_minor">Minor</option> - <option value="dpc_concentration">Concentration</option> - <option value="dpc_postbacc">Post-Bacc</option> - </select> -<!--===============## end of options ##=========================================--> - -<!--===============$$ Start of the Details of the proposal $$==============================--> - </h4> - - <h4>Degree Program Name: - <input type="text" name="degree_program_name"><br> - </h4> - - <h4>Date of BOT Academic Subcommittee Approval: - <input type="text" name="degree_program_name"><br> - </h4> - - <h4> - <input type="checkbox" name="check3" value="writing_intensive">Could this be offered online or by Rowan Global now or in the future?<br> - </h4> - - <h4>CIP Code Number: - <input type="text" name="cip_code_number"><br> - </h4> - - <h4>CIP Title: - <input type="text" name="cip_title"><br> - </h4> - - <h4>Scope and Size of Program: - <input type="text" name="saso_program"><br> - </h4> - - <h4>Related Curriculum Proposals Being Submitted Simultaneously: - <input type="text" name="rcpbss"><br> - </h4> - - <br> - <h2>Requirements for Admission & Graduation</h2> - - <h4>Admission: - <input type="text" name="admission"><br> - </h4> - - <h4>Graduation: - <input type="text" name="graduation"><br> - </h4> - - <h4>Student Status: - <input type="text" name="student_status"><br> - </h4> - - <br> - <h2>Rationale</h2> - - <h4>General Merit of Proposal: - <input type="text" name="merit_of_proposal"><br> - </h4> - - <h4>Relationship to Existing Programs of Offerings: - <input type="text" name="rtepoo"><br> - </h4> - - <br> - <h2>Program Description</h2> - - <h4>Administration: - <input type="text" name="administration"><br> - </h4> - - <h4>Program Evauation: - <input type="text" name="program_evaluation"><br> - </h4> - - <br> - <h2>Resource Requirements</h2> - - <h4>Equipment Space Technology: - <select> - <option disabled selected value> -- select an option -- </option> - <option value="est_sufficient">Current Resources are Sufficient</option> - <option value="est_needed">Additional Resources are Needed</option> - </select> - </h4> - - <h4>Staffing Resources: - <select> - <option disabled selected value> -- select an option -- </option> - <option value="sr_sufficient">Current Resources are Sufficient</option> - <option value="sr_needed">Additional Resources are Needed</option> - </select> - </h4> - - <h4>Library Resources: - <select> - <option disabled selected value> -- select an option -- </option> - <option value="lr_sufficient">Current Resources are Sufficient</option> - <option value="lr_needed">Additional Resources are Needed</option> - </select> - </h4> - - <br> - <h2>Results of Consultations</h2> - - <h4>Consultations Requested: - <select> - <option disabled selected value> -- select an option -- </option> - <option value="consultations_yes">Yes</option> - <option value="consultations_no">No</option> - </select> - </h4> - - <br> - <h2>Documents</h2> - <h3>-Program Guide (Required)</h3> - <h3>-Library Resource Form (Required)</h3> - <h3>-Assessment (Required)</h3> - <h3>-Consultation Letters</h3> - <h3>-Additional Supporting Documentation</h3> - </a> - - <a id="fadeableD" style="display: none;"> -<!--========================## end ##============================================--> - <br> -<!--===================== Start of degree info ==================================--> - <h2>Degree Program Information</h2> -<!--===================== Options for Degree programs ===========================--> - <h4>Degree Program Credentials: - <select> - <option disabled selected value> -- select an option -- </option> - <option value="dpc_ba">B.A.</option> - <option value="dpc_bfa">B.F.A.</option> - <option value="dpc_bgs">B.G.S.</option> - <option value="dpc_bm">B.M.</option> - <option value="dpc_bs">B.S.</option> - <option value="dpc_bsn">B.S.N.</option> - <option value="dpc_cags">CAGS</option> - <option value="dpc_certif">Certif</option> - <option value="dpc_cogs">COGS</option> - <option value="dpc_cugs">CUGS</option> - <option value="dpc_edd">Ed.D.</option> - <option value="dpc_eds">Ed.S.</option> - <option value="dpc_gradcert">Grad. Cert.</option> - <option value="dpc_ma">M.A.</option> - <option value="dpc_mba">M.B.A.</option> - <option value="dpc_mem">M.E.M.</option> - <option value="dpc_med">M.Ed.</option> - <option value="dpc_mm">M.M.</option> - <option value="dpc_ms">M.S.</option> - <option value="dpc_msn">M.S.N.</option> - <option value="dpc_mst">M.S.T.</option> - <option value="dpc_phd">Ph.D.</option> - <option value="dpc_phdma">Ph.D. (including M.A.)</option> - <option value="dpc_phdms">Ph.D. (including M.S.)</option> - <option value="dpc_minor">Minor</option> - <option value="dpc_concentration">Concentration</option> - <option value="dpc_postbacc">Post-Bacc</option> - </select> - </h4> - - <h4>Degree Program Name: - <input type="text" name="degree_program_name"><br> - </h4> - - <h4>Related Curriculum Proposals Being Submitted Simultaneously: - <input type="text" name="degree_program_name"><br> - </h4> - - <h4>Four or more changes: - <select> - <option disabled selected value> -- select an option -- </option> - <option value="four_changes_yes">Yes</option> - <option value="four_chanes_no">No</option> - </select> - </h4> - - <br> - <h2>Degree Program Changes</h2> - - <h4>INSERT ADDING NEW COURSE CHANGE BOX WITH A FROM, TO, and EXPLENATION WHY</h4> - - <br> - <h2>Results of Consultations</h2> - - <h4>Consultations Requested: - <select> - <option disabled selected value> -- select an option -- </option> - <option value="consultations_yes">Yes</option> - <option value="consultations_no">No</option> - </select> - </h4> - - <br> - <h2>Documents</h2> - <h3>-Program Guide (Required)</h3> - <h3>-Consultation Letters</h3> - <h3>-Additional Supporting Documentation</h3> - </a> - - <a id="fadeableE" style="display: none;"> - - <br> - <h2>Degree Program Information</h2> - - <h4>Undergraduate Degree Program Credential: - <select> - <option disabled selected value> -- select an option -- </option> - <option value="dpc_ba">B.A.</option> - <option value="dpc_bfa">B.F.A.</option> - <option value="dpc_bgs">B.G.S.</option> - <option value="dpc_bm">B.M.</option> - <option value="dpc_bs">B.S.</option> - <option value="dpc_bsn">B.S.N.</option> - <option value="dpc_cags">CAGS</option> - <option value="dpc_certif">Certif</option> - <option value="dpc_cogs">COGS</option> - <option value="dpc_cugs">CUGS</option> - <option value="dpc_edd">Ed.D.</option> - <option value="dpc_eds">Ed.S.</option> - <option value="dpc_gradcert">Grad. Cert.</option> - <option value="dpc_ma">M.A.</option> - <option value="dpc_mba">M.B.A.</option> - <option value="dpc_mem">M.E.M.</option> - <option value="dpc_med">M.Ed.</option> - <option value="dpc_mm">M.M.</option> - <option value="dpc_ms">M.S.</option> - <option value="dpc_msn">M.S.N.</option> - <option value="dpc_mst">M.S.T.</option> - <option value="dpc_phd">Ph.D.</option> - <option value="dpc_phdma">Ph.D. (including M.A.)</option> - <option value="dpc_phdms">Ph.D. (including M.S.)</option> - <option value="dpc_minor">Minor</option> - <option value="dpc_concentration">Concentration</option> - <option value="dpc_postbacc">Post-Bacc</option> - </select> - </h4> -<!--=========== Undergraduate Degree Program names ==============--> - <h4>Undergraduate Degree Program Name: - <input type="text" name="udpn"><br> - </h4> -<!--=================== Graduate Degree Programs options ========================--> - <h4>Graduate Degree Program Credential: - <select> - <option disabled selected value> -- select an option -- </option> - <option value="dpc_ba">B.A.</option> - <option value="dpc_bfa">B.F.A.</option> - <option value="dpc_bgs">B.G.S.</option> - <option value="dpc_bm">B.M.</option> - <option value="dpc_bs">B.S.</option> - <option value="dpc_bsn">B.S.N.</option> - <option value="dpc_cags">CAGS</option> - <option value="dpc_certif">Certif</option> - <option value="dpc_cogs">COGS</option> - <option value="dpc_cugs">CUGS</option> - <option value="dpc_edd">Ed.D.</option> - <option value="dpc_eds">Ed.S.</option> - <option value="dpc_gradcert">Grad. Cert.</option> - <option value="dpc_ma">M.A.</option> - <option value="dpc_mba">M.B.A.</option> - <option value="dpc_mem">M.E.M.</option> - <option value="dpc_med">M.Ed.</option> - <option value="dpc_mm">M.M.</option> - <option value="dpc_ms">M.S.</option> - <option value="dpc_msn">M.S.N.</option> - <option value="dpc_mst">M.S.T.</option> - <option value="dpc_phd">Ph.D.</option> - <option value="dpc_phdma">Ph.D. (including M.A.)</option> - <option value="dpc_phdms">Ph.D. (including M.S.)</option> - <option value="dpc_minor">Minor</option> - <option value="dpc_concentration">Concentration</option> - <option value="dpc_postbacc">Post-Bacc</option> - </select> - </h4> - - <h4>Graduate Degree Program Name: - <input type="text" name="gdpn"><br> - </h4> - - <h4>Undergraduate CIP Code Number: - <input type="text" name="ucip_code_number"><br> - </h4> - - <h4>Undergraduate CIP Title: - <input type="text" name="ucip_title"><br> - </h4> - - <h4>Graduate CIP Code Number: - <input type="text" name="gcip_code_number"><br> - </h4> - - <h4>Graduate CIP Title: - <input type="text" name="gcip_title"><br> - </h4> - - <h4>Scope and Size of Program: - <input type="text" name="size_of_program"><br> - </h4> - - <h4>Related Curriculum Proposals Being Submitted Simultaneously: - <input type="text" name="rcpbss"><br> - </h4> - - <br> - <h2>Requirements for Admission & Graduation</h2> - - <h4>Admission: - <input type="text" name="admission"><br> - </h4> - - <h4>Graduation: - <input type="text" name="graduation"><br> - </h4> - - <h4>Student Status: - <input type="text" name="student_status"><br> - </h4> - - <br> - <h2>Rationale</h2> - - <h4>General Merit of Proposal: - <input type="text" name="merit_of_proposal"><br> - </h4> - - <br> - <h2>Program Description</h2> - - <h4>Program Curriculum: - <input type="text" name="administration"><br> - </h4> - - <h4>Administration: - <input type="text" name="administration"><br> - </h4> - - <h4>Program Evauation: - <input type="text" name="program_evaluation"><br> - </h4> - - <br> - <h2>Resource Requirements</h2> - - <h4>Equipment Space Technology: - <select> - <option disabled selected value> -- select an option -- </option> - <option value="est_sufficient">Current Resources are Sufficient</option> - <option value="est_needed">Additional Resources are Needed</option> - </select> - </h4> - - <h4>Staffing Resources: - <select> - <option disabled selected value> -- select an option -- </option> - <option value="sr_sufficient">Current Resources are Sufficient</option> - <option value="sr_needed">Additional Resources are Needed</option> - </select> - </h4> - - <h4>Library Resources: - <select> - <option disabled selected value> -- select an option -- </option> - <option value="lr_sufficient">Current Resources are Sufficient</option> - <option value="lr_needed">Additional Resources are Needed</option> - </select> - </h4> - - <br> - <h2>Results of Consultations</h2> - - <h4>Consultations Requested: - <select> - <option disabled selected value> -- select an option -- </option> - <option value="consultations_yes">Yes</option> - <option value="consultations_no">No</option> - </select> - </h4> - - <br> - <h2>Documents</h2> - <h3>-Program Guide (Required)</h3> - <h3>-Consultation Letters</h3> - <h3>-Additional Supporting Documentation</h3> - </a> - - <a id="fadeableF" style="display: none;"> - - <br> - <h2>Quasi Curricular Proposal</h2> - - <h4>Quasi Curricular Reason: - <select> - <option disabled selected value> -- select an option -- </option> - <option value="qcr1">Change the name of an existing degree or degree-related - program (BA/BS, MA/MS, Ph.D. or minor, concentration or - any other type of certificate).</option> - <option value="qcr2">Dissolve or suspend an existing degree</option> - <option value="qcr3">Create or dissolve a department, school or college, or - other academic unit</option> - <option value="qcr4">Move a department from one college to another college or - academic unit</option> - <option value="qcr5">Change the name or structure of a department, school or - college, or academic unit</option> - <option value="qcr6">Change curriculum approval processes</option> - </select> - </h4> - - <br> - <h2>Rationale</h2> - - <h4>General Merit of Proposal: - <input type="text" name="merit_of_proposal"><br> - </h4> - - <br> - <h2>Curricular Effect</h2> - - <h4>Course Effect on Other Programs, Departments or Colleges: - <input type="text" name="course_effect_opdc"><br> - </h4> - - <br> - <h2>Documents</h2> - <h3>-Program Guide</h3> - <h3>-Library Resource Form</h3> - <h3>-Assessment</h3> - <h3>-Consultation Letters (Required)</h3> - <h3>-Additional Supporting Documentation</h3> - </a> - -</div> -<!--=================## end ##=========================================--> - -<!--=================$$ Start Of Download $$===========================--> -<!––The Download page––> -<div id="Download" class="tabcontent"> - <center> - <h1>Download Page</h1> - - - <h3>Proposal</h3> - - <select> - <option value="p1">Proposal 1</option> - <option value="p2">Proposal 2</option> - <option value="p3">Proposal 3</option> - <option value="p4">Proposal 4</option> - </select> - - <h3>Document Type</h3> - - <select> - <option disabled selected value> -- select an option -- </option> - <option value="d1">Program Guide</option> - <option value="d2">Library Resource Form</option> - <option value="d3">Assessment</option> - <option value="d4">Consultation Letters</option> - <option value="d5">Additional Supporting Documentation</option> - </select> - - <h3>Version</h3> - - <select> - <option disabled selected value> -- select an option -- </option> - <option value="v1">Version 1</option> - <option value="v2">Version 2</option> - </select> - - <h1> - <a href="#" class="button">Download</a> - </h1> - - </center> -</div> -<!--====================## end ##===========================--> - -<!--==============$$ Start of Upload Page $$========================--> -<!––The Upload page––> -<div id="Upload" class="tabcontent"> - <center> - <h1>Upload Page</h1> - + <img src="/static/img/Rowan_University_seal.svg.png" alt="Rowan University"> - <h3>Proposal</h3> - - <select> - <option value="p1">Proposal 1</option> - <option value="p2">Proposal 2</option> - <option value="p3">Proposal 3</option> - <option value="p4">Proposal 4</option> - </select> - - <h3>Document Type</h3> - - <select> - <option disabled selected value> -- select an option -- </option> - <option value="d1">Program Guide</option> - <option value="d2">Library Resource Form</option> - <option value="d3">Assessment</option> - <option value="d4">Consultation Letters</option> - <option value="d5">Additional Supporting Documentation</option> - </select> - - <h3>Attach Files</h3> + <h1>Rowan Curricular Proposal Management System</h1> - <form action="" method=post enctype=multipart/form-data> - <p> - <input type=file name=file> - </p> - </form> + <h3> Select an existing proposal </h3> <br> + <form action="" method=POST> + <select name = "proposal"> + <option disabled selected value> -- Select a Proposal -- </option> + {% for p in prop %} + <option value="{{ p[0] }}">{{ p[1] }}</option> + {% endfor %} + </select> + <br> + <input class="button" type=submit value="Select"> <br> + </form> + <h4> or <a href="{{ url_for('createProposal') }}">create a new one </a></h4> + <br> + <br> + <h4> <a href="{{ url_for('logout') }}">Logout</a></h4> - <h1> - <a href="#" class="button">Upload</a> - </h1> </center> </div> -<!--=======================## end ##==============================================================--> - -<!--=====================$$ Start of Status Page $$===============================================--> -<!––The Status page––> -<div id="Status" class="tabcontent"> - <center> - <h1>Status Page</h1> - </center> - - - <h3>Proposal</h3> - <select> - <option value="p1">Proposal 1</option> - <option value="p2">Proposal 2</option> - <option value="p3">Proposal 3</option> - <option value="p4">Proposal 4</option> - </select> - - <h3>Program Guide</h3> - - <h3>Library Resource Form</h3> - - <h3>Assessment</h3> - <h3>Consultation Letters</h3> - - <h3>Additional Supporting Documentation</h3> -</div> </body> <!--========================## end ##===============================================================--> - <script type="text/javascript" src="javascript.js"></script> - - - +======= +</html> diff --git a/src/html/login.html b/src/html/login.html @@ -0,0 +1,31 @@ +<!DOCTYPE html> +<html> +<head> + <link rel="stylesheet" href="{{ url_for('static',filename='styles/style.css') }}"> +</head> + +<body> +<!--==============$$ Start of buttons $$==================================--> + + +<!--=============## end ##================================================--> +<div id="Home" class="tabcontent"> + <!--===== Options for your deparment choice so you can login =======--> + <center> + <h4>Select Your Department: + <form action="" method=POST> + <select name = "department"> + <option disabled selected value> -- Select a Department -- </option> + {% for d in dept %} + <option value="{{ d[0] }}">{{ d[1] }}</option> + {% endfor %} + </select> + </h4> + <input class="button" type=submit value="Submit"> <br> + </center> + </form> +</div> +</body> +<!--========================## end ##===============================================================--> + + <script type="text/javascript" src="{{ url_for('static', filename='javascript.js') }}"></script> diff --git a/src/html/status.html b/src/html/status.html @@ -0,0 +1,136 @@ +<!DOCTYPE html> +<html> +<!------------------------------------------------------------------------------- + +Rowan Computer Science Dept Spring 2019 Senior Project Team +Rowan Curricular Proposal Mangagement System for Jack Myers rowan + +Senior Team Members: +Team Lead: John Kubach + Scrum Master: Joshua Jackson + Developer: Alex Kulplin + Developer: Jeffrey Podwats + Developer: Alaina Smith + Developer: Kyle Butera + +----------------------------------------------------------------------------- + +Description: + Using SVG and connecting frontend to backend we + Last edit: 4/3/19 +-------------------------------------------------------------------------------> + + <head> + <link rel="stylesheet" href="{{ url_for('static',filename='styles/style.css') }}"> + </head> +<body> +<form action="/navbar" method=POST> +<button name="home" type=submit class= "tablink">Home</button> +<button name="upload" type=submit class= "tablink">Upload</button> +<button name="download" type=submit class= "tablink">Download</button> +<button name="status" type=submit class= "tablink">Status</button> +</form> +<!--=====================$$ Start of Status Page $$===============================================--> +<!––The Status page––> +<div id="Status" class="tabcontent"> + <center> + <h1>Status Page</h1> + <h2>{{ prop[0] }}</h2> + <h3>{{ prop[1] }}</h3> + </center> +<!--========================== status of the purposal =============================================--> + <h3>Program Guide</h3> + <!--============================= SVG for the incomplete =============================================--> + {% if doc[0] == 0 %} + <svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 130.2 130.2"> + <circle class="path circle" fill="none" stroke="#D06079" stroke-width="6" stroke-miterlimit="10" cx="65.1" cy="65.1" r="62.1"/> + <line class="path line" fill="none" stroke="#D06079" stroke-width="6" stroke-linecap="round" stroke-miterlimit="10" x1="34.4" y1="37.9" x2="95.8" y2="92.3"/> + <line class="path line" fill="none" stroke="#D06079" stroke-width="6" stroke-linecap="round" stroke-miterlimit="10" x1="95.8" y1="38" x2="34.4" y2="92.2"/> + </svg> + <p class="error">Incomplete!</p> + {% else %} + <svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 130.2 130.2"> + <circle class="path circle" fill="none" stroke="#73AF55" stroke-width="6" stroke-miterlimit="10" cx="65.1" cy="65.1" r="62.1"/> + <polyline class="path check" fill="none" stroke="#73AF55" stroke-width="6" stroke-linecap="round" stroke-miterlimit="10" points="100.2,40.2 51.5,88.8 29.8,67.5 "/> + </svg> + <p class="Upload success">Oh Yeah!</p> + {% endif %} +<!--===================================== end ================================================--> + +<!--===================================== status of the program guide ==========================--> + <h3>Assessment Form</h3> + {% if doc[1] == 0 %} + <svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 130.2 130.2"> + <circle class="path circle" fill="none" stroke="#D06079" stroke-width="6" stroke-miterlimit="10" cx="65.1" cy="65.1" r="62.1"/> + <line class="path line" fill="none" stroke="#D06079" stroke-width="6" stroke-linecap="round" stroke-miterlimit="10" x1="34.4" y1="37.9" x2="95.8" y2="92.3"/> + <line class="path line" fill="none" stroke="#D06079" stroke-width="6" stroke-linecap="round" stroke-miterlimit="10" x1="95.8" y1="38" x2="34.4" y2="92.2"/> + </svg> + <p class="error">Incomplete!</p> + {% else %} + <svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 130.2 130.2"> + <circle class="path circle" fill="none" stroke="#73AF55" stroke-width="6" stroke-miterlimit="10" cx="65.1" cy="65.1" r="62.1"/> + <polyline class="path check" fill="none" stroke="#73AF55" stroke-width="6" stroke-linecap="round" stroke-miterlimit="10" points="100.2,40.2 51.5,88.8 29.8,67.5 "/> + </svg> + <p class="Upload success">Oh Yeah!</p> + {% endif %} + <!--==================================== end ==============================================--> + +<!--===================================== Library Resource Form Status ===========================--> + <h3>Library Resource Form</h3> + {% if doc[2] == 0 %} + <svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 130.2 130.2"> + <circle class="path circle" fill="none" stroke="#D06079" stroke-width="6" stroke-miterlimit="10" cx="65.1" cy="65.1" r="62.1"/> + <line class="path line" fill="none" stroke="#D06079" stroke-width="6" stroke-linecap="round" stroke-miterlimit="10" x1="34.4" y1="37.9" x2="95.8" y2="92.3"/> + <line class="path line" fill="none" stroke="#D06079" stroke-width="6" stroke-linecap="round" stroke-miterlimit="10" x1="95.8" y1="38" x2="34.4" y2="92.2"/> + </svg> + <p class="error">Incomplete!</p> + {% else %} + <svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 130.2 130.2"> + <circle class="path circle" fill="none" stroke="#73AF55" stroke-width="6" stroke-miterlimit="10" cx="65.1" cy="65.1" r="62.1"/> + <polyline class="path check" fill="none" stroke="#73AF55" stroke-width="6" stroke-linecap="round" stroke-miterlimit="10" points="100.2,40.2 51.5,88.8 29.8,67.5 "/> + </svg> + <p class="Upload success">Oh Yeah!</p> + {% endif %} + <!--====================================== end ============================================--> + + <!--======================================= Assement Status =======================================--> + <h3>Additional Supporting Documentation</h3> + {% if doc[3] == 0 %} + <svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 130.2 130.2"> + <circle class="path circle" fill="none" stroke="#D06079" stroke-width="6" stroke-miterlimit="10" cx="65.1" cy="65.1" r="62.1"/> + <line class="path line" fill="none" stroke="#D06079" stroke-width="6" stroke-linecap="round" stroke-miterlimit="10" x1="34.4" y1="37.9" x2="95.8" y2="92.3"/> + <line class="path line" fill="none" stroke="#D06079" stroke-width="6" stroke-linecap="round" stroke-miterlimit="10" x1="95.8" y1="38" x2="34.4" y2="92.2"/> + </svg> + <p class="error">Incomplete!</p> + {% else %} + <svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 130.2 130.2"> + <circle class="path circle" fill="none" stroke="#73AF55" stroke-width="6" stroke-miterlimit="10" cx="65.1" cy="65.1" r="62.1"/> + <polyline class="path check" fill="none" stroke="#73AF55" stroke-width="6" stroke-linecap="round" stroke-miterlimit="10" points="100.2,40.2 51.5,88.8 29.8,67.5 "/> + </svg> + <p class="Upload success">Oh Yeah!</p> + } + {% endif %} + <!--============================== end ===================================================--> + + <!--=============================== Consultation Letters Status commented out for now ============================--> + <h3>Consultation Letters</h3> + {% if doc[4] == 0 %} + <svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 130.2 130.2"> + <circle class="path circle" fill="none" stroke="#D06079" stroke-width="6" stroke-miterlimit="10" cx="65.1" cy="65.1" r="62.1"/> + <line class="path line" fill="none" stroke="#D06079" stroke-width="6" stroke-linecap="round" stroke-miterlimit="10" x1="34.4" y1="37.9" x2="95.8" y2="92.3"/> + <line class="path line" fill="none" stroke="#D06079" stroke-width="6" stroke-linecap="round" stroke-miterlimit="10" x1="95.8" y1="38" x2="34.4" y2="92.2"/> + </svg> + <p class="error">Incomplete!</p> + {% else %} + <svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 130.2 130.2"> + <circle class="path circle" fill="none" stroke="#73AF55" stroke-width="6" stroke-miterlimit="10" cx="65.1" cy="65.1" r="62.1"/> + <polyline class="path check" fill="none" stroke="#73AF55" stroke-width="6" stroke-linecap="round" stroke-miterlimit="10" points="100.2,40.2 51.5,88.8 29.8,67.5 "/> + </svg> + <p class="Upload success">Oh Yeah! {{ doc[4] }} consultation letters uploaded</p> + + {% endif %} +<!--=================================== end ===========================================--> +</body> +<!--========================## end ##===============================================================--> + + <script type="text/javascript" src="{{ url_for('static', filename='javascript.js') }}"></script> diff --git a/src/html/style.css b/src/html/style.css @@ -1,132 +1,142 @@ -<!DOCTYPE html> -<html> -<head> -<body> -<style> - ". - body - { - background: #FFF3DD; - background-color: #FFF3DD; - height: 100%; - margin-left: auto; - margin-right: auto; - margin-top: 0px; - font-family: Arial; - } - - html - { - background: #FFF3DD; - background-color: #FFF3DD; - height: 100%; - margin-left: auto; - margin-right: auto; - margin-top: 0px; - font-family: Arial; - } - - div - { - height: 100px; - width: 1000px; - padding: 10px; - border: 5px solid #57150B; - border-top: 50px solid #57150B; - margin-top: 0px; - margin-left: auto; - margin-right: auto; - } +body +{ + background: #FFF3DD; + background-color: #FFF3DD; + height: 100%; + margin-left: auto; + margin-right: auto; + margin-top: 0px; + font-family: Arial; +} - .button - { - background-color: #57150B; - border: none; - color: #FFDD4D; - padding: 15px 32px; - text-align: center; - text-decoration: none; - display: inline-block; - font-size: 16px; - margin: 4px 2px; - cursor: pointer; - } +html +{ + background: #FFF3DD; + background-color: #FFF3DD; + height: 100%; + margin-left: auto; + margin-right: auto; + margin-top: 0px; + font-family: Arial; +} - .input - { - background-color: #57150B; - border: none; - color: #FFDD4D; - padding: 15px 32px; - text-align: center; - text-decoration: none; - display: inline-block; - font-size: 16px; - margin: 4px 2px; - cursor: pointer; - } +div +{ + height: 100px; + width: 1000px; + padding: 10px; + border: 5px solid #57150B; + border-top: 50px solid #57150B; + margin-top: 0px; + margin-left: auto; + margin-right: auto; +} - h1 - { - color: #57150B; - margin-left: auto; - margin-right: auto; - } +.button +{ + background-color: #57150B; + border: none; + color: #FFDD4D; + padding: 15px 32px; + text-align: center; + text-decoration: none; + display: inline-block; + font-size: 16px; + margin: 4px 2px; + cursor: pointer; +} - h2 - { - color: #57150B; - margin-left: auto; - margin-right: auto; - } - - h3 - { - color: #57150B; - margin-left: auto; - margin-right: auto; - } +.navbox{ + width: 65em; + display: flex; + border-radius: 25px; + margin: 0 auto; + padding: 10px; + background-color: #40e0d0; +} +.nav { + margin: 0 auto; + display: inline; + overflow: hidden; + font-family: Arial; +} +.nav a { + margin:0 auto; + border-radius: 25px; + float: left; + font-size: 16px; + color: #000; + background-color: #40e0d0; + text-align: center; + padding: 10px 16px; + text-decoration: none; +} - h4 - { - color: #57150B; - margin-left: auto; - margin-right: auto; - } +.input +{ + background-color: #57150B; + border: none; + color: #FFDD4D; + padding: 15px 32px; + text-align: center; + text-decoration: none; + display: inline-block; + font-size: 16px; + margin: 4px 2px; + cursor: pointer; +} - .tablink - { - background-color: #57150B; - color: #FFCC00; - float: left; - border: none; - outline: none; - cursor: pointer; - padding: 14px 16px; - font-size: 17px; - width: 25%; - } +h1 +{ + color: #57150B; + margin-left: auto; + margin-right: auto; +} - .tablink:hover - { - background-color: #FFCC00; - color: #57150B; - } +h2 +{ + color: #57150B; + margin-left: auto; + margin-right: auto; +} - .tabcontent - { - color: #57150B; - display: none; - padding: 20px 20px; - height: auto; - } +h3 +{ + color: #57150B; + margin-left: auto; + margin-right: auto; +} -#Home {background-color: white;} -#Download {background-color: white;} -#Upload {background-color: white;} -#Status {background-color: white;} -" -</style> -</body> -</head> -</html> -\ No newline at end of file +h4 +{ + color: #57150B; + margin-left: auto; + margin-right: auto; +} + +.tablink +{ + background-color: #57150B; + color: #FFCC00; + float: left; + border: none; + outline: none; + cursor: pointer; + padding: 14px 16px; + font-size: 17px; + width: 25%; +} + +.tablink:hover +{ + background-color: #FFCC00; + color: #57150B; +} + +.tabcontent +{ + color: #57150B; + /* display: none; */ + padding: 20px 20px; + height: auto; +} diff --git a/src/html/upload.html b/src/html/upload.html @@ -0,0 +1,46 @@ +<!DOCTYPE html> +<html> +<head> + <link rel="stylesheet" href="{{ url_for('static',filename='styles/style.css') }}"> +</head> + +<body> +<!--==============$$ Start of Upload Page $$========================--> +<form action="/navbar" method=POST> +<button name="home" type=submit class= "tablink">Home</button> +<button name="upload" type=submit class= "tablink">Upload</button> +<button name="download" type=submit class= "tablink">Download</button> +<button name="status" type=submit class= "tablink">Status</button> +</form> +<!––The Upload page––> +<div id="Upload" class="tabcontent"> + <center> + <h1>Upload Page</h1> + + <form action="" method=POST enctype=multipart/form-data> + <h3>Document Type</h3> + <select name = "doc_select"> + <option value="-a" selected="selected">Assessement Form</option> + <option value="-l">Library Form</option> + <option value="-s">Supporting Document</option> + <option value="-p">Program Guide</option> + <option value="-c">Consultation Letters</option> + </select> + + <h3>Attach Files</h3> + <p> + <input type=file name=file> + </p> + <center> + <h1> + <input class="button" type=submit value=Upload> + </h1> + </center> + </form> +</div> +<!--=======================## end ##==============================================================--> +</div> +</body> +<!--========================## end ##===============================================================--> + + <script type="text/javascript" src="{{ url_for('static', filename='javascript.js') }}"></script> diff --git a/src/python/main.py b/src/python/main.py @@ -1,48 +1,20 @@ -""" ------------------------------------------------------------------------------ - -Rowan Computer Science Dept Spring 2019 Senior Project Team -Rowan Curricular Proposal Mangagement System for Jack Myers rowan - -Senior Team Members: -Team Lead: John Kubach - Scrum Master: Joshua Jackson - Developer: Alex Kulplin - Developer: Jeffrey Podwats - Developer: Alaina Smith - Developer: Kyle Butera - ------------------------------------------------------------------------------ - -Description: - This is the code for uploading necessary images to web page - - Last edit: 4/3/19 ------------------------------------------------------------------------------ -""" - -#==========================imports=============================================== -# Imports that are need will go in this box +import logging +logging.basicConfig(level=logging.DEBUG) import os import subprocess import img2pdf -#========================end===================================================== - -#=================connection===================================================== -# This will connect the back front end to the database setting flask up box from flask import Flask, request, redirect, url_for, send_from_directory, \ - render_template +render_template, session from flaskext.mysql import MySQL from werkzeug import secure_filename -#====================end========================================================== +import sys -#======================varibles for uploading===================================== UPLOAD_FOLDER = '/tmp/upload' ALLOWED_EXTENSIONS = set(['pdf', 'docx']) -#==========================end==================================================== -#=================================================================================== app = Flask(__name__) +app.secret_key = 'test' + mysql = MySQL() app.config['MYSQL_DATABASE_USER'] = 'root' app.config['MYSQL_DATABASE_PASSWORD'] = 'senior' @@ -50,63 +22,134 @@ app.config['MYSQL_DATABASE_DB'] = 'curricular_management' app.config['MYSQL_DATABASE_HOST'] = 'localhost' mysql.init_app(app) + +conn = mysql.connect() +cursor =conn.cursor() + app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER -#===================end============================================================= -#=================Checks file to see if allowed===================================== -# def allowed_file(filename): return '.' in filename and \ filename.rsplit('.', 1)[1] in ALLOWED_EXTENSIONS -#=======================end========================================================= -#============================================================================= -# +def set_proposal_session(proposal_id): + sql_query = """SELECT assessement_form_id, library_form_id, supporting_document_id, program_guide_id from proposal WHERE proposal_id = %s""" + cursor.execute(sql_query, proposal_id) + result = cursor.fetchone() + session['proposal'] = proposal_id + session['assessement'] = result[0] + session['library'] = result[1] + session['support'] = result[2] + session['program'] = result[3] -@app.route("/", methods=['GET', 'POST']) + +@app.route("/", methods=['GET', 'POST', 'PUT']) def index(): - conn = mysql.connect() - cursor = conn.cursor() + if not session.get('department'): + return redirect(url_for('login')) + + cursor.execute("SELECT proposal_id, proposal_title FROM proposal") + if request.method == 'POST': + prop_id = request.form['proposal'] + set_proposal_session(prop_id) + return redirect(url_for('status')) + + return render_template('index.html', prop=cursor.fetchall()) + +@app.route("/login", methods=['GET', 'POST']) +def login(): + cursor.execute("SELECT department_id, department_name FROM department") + if request.method == 'POST': + session['department'] = request.form['department'] + return redirect(url_for('index')) + + return render_template('login.html', dept=cursor.fetchall()) + +@app.route("/create") +def createProposal(): + return render_template('create.html') + +@app.route("/upload", methods=['GET', 'POST']) +def uploadpage(): if request.method == 'POST': file = request.files['file'] - doctype = request.form.get('doc_select') - uname = "Kubach" + doctype = request.form.get('doc_select') + uname = session['proposal'] if doctype == "-a": - sql_query = """INSERT INTO assessement_form_revision (assessement_form_id, assessement_form_file_path, assessement_form_datetime) values (1, %s, NOW())""" + doc_id = session['assessement'] + sql_query = """INSERT INTO assessement_form_revision (assessement_form_id, assessement_form_file_path, assessement_form_datetime) values (%s, %s, NOW())""" elif doctype == "-l": - sql_query = """INSERT INTO library_form_revision (library_form_id, library_form_file_path, library_form_datetime) values (1, %s, NOW())""" + doc_id = session['library'] + sql_query = """INSERT INTO library_form_revision (library_form_id, library_form_file_path, library_form_datetime) values (%s, %s, NOW())""" elif doctype == "-s": - sql_query = """INSERT INTO supporting_document_revision (supporting_document_id, supporting_document_file_path, supporting_document_datetime) values (1, %s, NOW())""" + doc_id = session['support'] + sql_query = """INSERT INTO supporting_document_revision (supporting_document_id, supporting_document_file_path, supporting_document_datetime) values (%s, %s, NOW())""" elif doctype == "-p": - sql_query = """INSERT INTO program_guide_revision (program_guide_id, program_guide_file_path, program_guide_datetime) values (1, %s, NOW())""" + doc_id = session['program'] + sql_query = """INSERT INTO program_guide_revision (program_guide_id, program_guide_file_path, program_guide_datetime) values (%s, %s, NOW())""" elif doctype == "-c": - sql_query = """INSERT INTO consult_letter_revision (consult_letter_id, consult_letter_file_path, consult_letter_datetime) values (1, %s, NOW())""" + #doc_id = session['consult'] + sql_query = """INSERT INTO consult_letter_revision (consult_letter_id, consult_letter_file_path, consult_letter_datetime) values (%s, %s, NOW())""" if file and allowed_file(file.filename): filename = secure_filename(file.filename) file.save(os.path.join(app.config['UPLOAD_FOLDER'], filename)) + # doctype = request.form.get('doc_select') + if filename.endswith('.pdf'): + # doctype = "-s" cmd = "./archiver.sh -n " + uname + " -f " + filename + " " + doctype if filename.endswith('.docx'): conv = "soffice --convert-to pdf /tmp/" + filename + " --outdir " + UPLOAD_FOLDER + " --headless" subprocess.call(conv, shell=True) - cmd = "./archiver.sh -n " + uname + " -f " + filename.replace(".docx", ".pdf") + " " + doctype + uname = "Kubach" + # doctype = "-s" + cmd = "./archiver.sh -n " + uname + " -f " + filename.replace(".docx",".pdf") + " " + doctype if filename.endswith('png'): conv = "convert" + filename + " --path " + UPLOAD_FOLDER + " --headless" subprocess.call(conv, shell=True) - + newFilename = subprocess.Popen(cmd, stdout=subprocess.PIPE, shell=True) cursor.execute(sql_query, newFilename.stdout.readlines()[0].strip()) conn.commit() - return redirect(url_for('index', doctype=doctype)) - return render_template('index.html') + return redirect(url_for('uploadpage', doctype = doctype)) + return render_template('upload.html') +@app.route("/download", methods=['GET', 'POST']) +def downloadpage(): + if request.method == 'POST': + document = request.form.get('document') + + if selectDoc == "-a": + sql_query = """SELECT assessement_form_file_path FROM assessement_form_revision WHERE assessement_form_id = %s""" + elif selectDoc == "-l": + sql_query = """SELECT library_form_file_path FROM library_form_revision WHERE library_form_id = %s""" + elif selectDoc == "-s": + sql_query = """SELECT assessement_form_file_path FROM assessement_form_revision WHERE assessement_form_id = %s""" + elif selectDoc == "-p": + sql_query = """SELECT assessement_form_file_path FROM assessement_form_revision WHERE assessement_form_id = %s""" + elif selectDoc == "-c": + sql_query = """SELECT assessement_form_file_path FROM assessement_form_revision WHERE assessement_form_id = %s""" + + elif request.method == 'GET': + selectVer = request.form.get('select_version') + #uploads = os.path.join(current_app.root_path, app.config['UPLOAD_FOLDER']) + #return send_file('/tmp/upload/Kubach_Assessement_Form_20190418040324.pdf',mimetype='application/pdf', as_attachment=True) + return send_from_directory(directory='/tmp/upload', filename='Kubach_Assessement_Form_20190404151301.pdf', as_attachment=True) + #return redirect(url_for('downloadpage', doctype = selectDoc)) + return send_file('/tmp/upload/Kubach_Assessement_Form_20190404151301.pdf', as_attachment=True) + #return send_from_directory(directory=uploads, filename="Kubach_Assessement_Form_20190418040324.pdf", as_attachment=True) + #return render_template('index.html') + #return render_template('download.html') + +@app.route("/status") +def status(): + return render_template('status.html') if __name__ == "__main__": app.run(host='0.0.0.0', port=5001, debug=True) -#============================================================================= -\ No newline at end of file