Skip to content

Commit

Permalink
Remove institution references
Browse files Browse the repository at this point in the history
  • Loading branch information
Thaddeus McCleary committed Mar 9, 2022
1 parent 36f9f71 commit ebb5950
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 166 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Seatsmart",
"productName": "Seatsmart",
"version": "1.9.10",
"version": "2.0.0",
"author": "Thaddeus McCleary",
"description": "a classroom participation tracking application",
"scripts": {
Expand Down
Binary file removed src/assets/tiger.png
Binary file not shown.
150 changes: 8 additions & 142 deletions src/views/ChartCreation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<h6 v-if="progress == 1">Enter the columns and rows of seating in the classroom:</h6>
<h6 v-if="progress == 2 && mode == 'new'">Fill in information about the class:</h6>
<h6 v-if="progress == 2 && mode == 'edit'">Edit information about the class:</h6>
<h6 v-if="progress == 3 && mode == 'new'">Create a student list or import the XLSX from TigerCentral <button class="modal-button" @click="modalOpen = true">(?)</button></h6>
<h6 v-if="progress == 3 && mode == 'new'">Create a student list</h6>
<h6 v-if="progress == 3 && mode == 'edit'">Edit the student list:</h6>
</header>
<section id="diagram">
Expand All @@ -24,7 +24,7 @@
<h5 class="select-label">How many chairs will you use in each row?</h5>
</div>
<select name="columns" v-model="classChart.columns">
<option
<option
v-for="(columnOption, index) in columnOptions"
:key="`columnOption${index}`"
:value="columnOption"
Expand All @@ -36,7 +36,7 @@
<h5 class="select-label">How many rows will you use?</h5>
</div>
<select name="rows" v-model="classChart.rows">
<option
<option
v-for="(rowOption, index) in rowOptions"
:key="`rowOption${index}`"
:value="rowOption"
Expand Down Expand Up @@ -71,7 +71,7 @@
<h5 class="select-label">Year</h5>
</div>
<select name="year" v-model="classChart.year">
<option
<option
v-for="(year, index) in years"
:key="`year${index}`"
:value="year"
Expand All @@ -88,20 +88,13 @@
</section>
<section id="formThree" v-if="progress == 3">
<div class="form-container-large">
<h3 v-if="mode === 'new'">Import or Create Class Roster</h3>
<h3 v-if="mode === 'new'">Create Class Roster</h3>
<h3 v-else>Edit Class Roster</h3>
<div class="input-area">
<drop :class="[over ? 'drop-bold-outline' : 'drop-light-outline', 'drop-area']" @drop="handleDrop" @dragover="over = true" @dragleave="over = false" v-if="mode === 'new' && !importSuccess">
<button class="drop-area-button" @click="handleOpen">import roster</button>
<span>or drag and drop here <button class="modal-button-white" @click="modalOpen = true">(?)</button></span>
</drop>
<div class="drop-area" v-else-if="mode === 'new' && importSuccess">
<button class="drop-area-button" @click="resetImport">import a different file</button>
</div>
<div class="label-row black-border">
<span>First Name</span>
<span>Last Name</span>
<span>Tiger ID</span>
<span>ID</span>
</div>
<div ref="formArea">
<div class="form-group" v-for="(student, index) in classStudents" :key="index">
Expand All @@ -125,35 +118,6 @@
<section id="progressNodes">
<ProgressNodes :steps="steps" :progress="progress" />
</section>
<transition name="fade">
<Modal v-if="modalOpen" v-on:trigger-close="modalOpen = false" :dismissable="true" size="large">
<template slot="content">
<div class="modal-header">
<h1>Import a Roster (FHSU Users)</h1>
</div>
<div class="modal-body">
<div class="step">
<img src="@/assets/tiger.png" alt="FHSU tiger">
<h4>Teaching > Course Rosters on Tiger Central</h4>
<h4>1</h4>
</div>
<div class="step">
<img src="@/assets/excel.svg" alt="Excel file icon">
<h4>Click on the Excel icon next to a course</h4>
<h4>2</h4>
</div>
<div class="step">
<img src="@/assets/import.svg" alt="import icon">
<h4>import or drag the Excel file into Seatsmart</h4>
<h4>3</h4>
</div>
</div>
<div class="modal-footer">
<button class="modal-footer-button" @click="modalOpen = false">Got it</button>
</div>
</template>
</Modal>
</transition>
<transition name="fade">
<Modal v-if="alertModalOpen" v-on:trigger-close="alertModalOpen = false" :dismissable="true" size="small">
<template slot="content">
Expand Down Expand Up @@ -208,21 +172,19 @@ export default {
return {
mode: 'new',
alertMessage: '',
modalOpen: false,
alertModalOpen: false,
over: false,
progress: 1,
steps: 3,
years: [],
importSuccess: false,
classChart: {
columns: 2,
rows: 1,
name: null,
semester: null,
year: null,
_id: null,
archived: null
archived: null
},
classStudents: [
{
Expand Down Expand Up @@ -367,7 +329,7 @@ export default {
let scope = this
setTimeout(function() {
let lastInput = scope.classStudents.length - 1
scope.$refs[lastInput][0].focus()
}, 300, scope)
},
Expand All @@ -378,102 +340,6 @@ export default {
}
this.classStudents.splice(index, 1)
},
handleDrop(data, event) {
event.preventDefault()
const files = event.dataTransfer.files
let path = event.dataTransfer.files.item(0).path
this.processXLSX(path)
},
handleOpen() {
let path = dialog.showOpenDialog({ properties: ['openFile'] })
// in case they click 'cancel' on the dialog box
if (path !== undefined) {
this.processXLSX(path[0])
}
},
processXLSX(path) {
var workbook = XLSX.readFile(path)
console.log(workbook)
// FHSU-specific processing
var worksheet = workbook.Sheets['Course Roster']
var keys = Object.keys(worksheet)
var ids = []
var names = []
var students = []
var statuses = []
for (let i=0; i<keys.length; i++) {
if (keys[i][0] === 'A') {
names.push(worksheet[keys[i]].v)
} else if (keys[i][0] === 'B') {
ids.push(worksheet[keys[i]].v)
} else if (keys[i][0] === 'D') {
statuses.push(worksheet[keys[i]].v)
}
}
for (let i=0; i<names.length; i++) {
if (statuses[i] === 'EN') {
students.push({
name: names[i],
id: ids[i],
status: statuses[i]
})
}
}
for (let i=0; i<students.length; i++) {
let split = students[i].name.split(',')
let lastName = split[0]
let firstName = split[1].slice(1)
this.classStudents.push({
firstName: firstName,
lastName: lastName,
tigerID: '' + students[i].id + '',
selected: false,
highlight: '',
class: this.classChart._id,
seat: {
row: null,
column: null
}
})
}
this.classStudents.shift()
if (this.classStudents.length === 0) {
this.alertMessage = 'Please check the file type (xlsx) and try again.'
} else {
this.alertMessage = ''
this.importSuccess = true
this.over = false
}
},
resetImport() {
this.importSuccess = false
this.over = false
this.classStudents = [{
firstName: null,
lastName: null,
tigerID: null,
selected: false,
highlight: '',
class: null,
seat: {
row: null,
column: null
}
}]
},
routeBack() {
if (this.classChart._id !== null && this.mode == 'new') {
db.deleteSomething('classes' ,{_id: this.classChart._id})
Expand Down
38 changes: 15 additions & 23 deletions src/views/Student.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
<transition name="fade">
<aside id="leftPanel">
<h1>{{ student.firstName }} {{ student.lastName }}</h1>
<div id="tigerArea" v-if="student.tigerID !== null && student.tigerID !== ''">
<img src="@/assets/tiger.png" id="tigerLogo" alt="FHSU tiger logo">
<div id="idArea" v-if="student.tigerID !== null && student.tigerID !== ''">
<h5>{{ student.tigerID }}</h5>
</div>
<div id="titleContainer">
Expand All @@ -13,13 +12,13 @@
</transition>
</div>
<transition name="fade">
<SeatingDiagram
:compact="true"
:inverted="true"
:rows="classInfo.rows"
:columns="classInfo.columns"
:selected="`${this.student.seat.row},${this.student.seat.column}`"
:classID="classInfo._id"
<SeatingDiagram
:compact="true"
:inverted="true"
:rows="classInfo.rows"
:columns="classInfo.columns"
:selected="`${this.student.seat.row},${this.student.seat.column}`"
:classID="classInfo._id"
:title="classInfo.name"
v-on:change-route="changeStudents"
/>
Expand All @@ -34,10 +33,10 @@
</div>
<section id="switchArea" v-if="activitiesLoaded">
<p>
<span class="switch-label">notes</span>
<span class="switch-label">notes</span>
<button :class="[showActivities ? 'on' : 'off' ,'switch']" @click="toggleRecordsDisplay">
<img src="@/assets/switch-circle.svg" alt="switch circle">
</button>
</button>
<span class="switch-label">activities</span>
</p>
</section>
Expand Down Expand Up @@ -159,7 +158,7 @@
{type: 'button', label: 'Toggle Notes/Activities', method: function() {toggleRecordsDisplay()}},
{type: 'spacer', size: 'flexible'},
{type: 'button', label: '📝', method: function() {openModal('note')}}
]"
]"
/>
</div>
</template>
Expand Down Expand Up @@ -314,7 +313,7 @@ export default {
}
}
return trendArr
},
monthTrend() {
Expand Down Expand Up @@ -463,7 +462,7 @@ export default {
this.activitySessions = studentResults
this.activitiesLoaded = true
}
}
})
},
startEdit(note) {
Expand Down Expand Up @@ -731,22 +730,15 @@ main {
text-align: right;
}
#tigerArea {
#idArea {
margin-top: 15px;
}
#tigerArea > h5 {
display: inline-block;
#idArea > h5 {
color: var(--yellow);
font-size: 18px;
}
#tigerLogo {
width: 24px;
vertical-align: middle;
margin-right: 10px;
}
#titleContainer {
min-height: 80px;
}
Expand Down

0 comments on commit ebb5950

Please sign in to comment.