-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Export Bonner Spreadsheet Features #1388
Open
WackyWeaver
wants to merge
23
commits into
development
Choose a base branch
from
1378-cohort-export
base: development
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
611a310
started making us and route changes for the different spreadsheets
WackyWeaver 31b320b
Still fixing buttons and new routes
WackyWeaver 581b707
Attempted a streamline of the saving process, James
ojmakinde 0bdf28a
Attempted to get cohorts iteratively, added the export-button class, …
ojmakinde 05b424a
Removed redundant logic. Established the new spreadsheet ordering sys…
ojmakinde 6a0f6b8
Successfully added Bonner Event columns to the Spreadsheet
ojmakinde 6a30957
Initial attempt at implementing the query logic
ojmakinde e17ae3b
Fixed the basic query for getting requirement events by name. Need to…
ojmakinde d3373dd
Implemented query to retrieve Bonner Events and populate spreadsheet …
ojmakinde 8277da8
Naive approach for All Bonner Meeting data retrieval implemented. Tes…
ojmakinde 2399c3c
Naive approach for All Bonner Meeting data retrieval implemented. Tes…
ojmakinde 1e21e56
Merge branch '1378-cohort-export' of https://github.com/BCStudentSoft…
ojmakinde 91ab003
Wrote basics of SQL script. Need to implement
ojmakinde 20d454f
Wrote SQL Script boilerplate. Probably doesn't work???
ojmakinde 7c3a03a
Mostly fixed SQL script
ojmakinde a5099e9
fixed type in SQL script and program id in test data
WackyWeaver 6d0de8d
Unmerged development, due to failing prod-backup transfer. Improved S…
ojmakinde 666ac65
Removed redundant url call in JavaScript. Modified the file download …
ojmakinde 80f3889
Removed test data changes
ojmakinde 2875a27
Merge branch 'development' of https://github.com/BCStudentSoftwareDev…
WackyWeaver cbe9b2a
Added requested changes to html UI layout for spreadsheet buttons
WackyWeaver 000022e
Additional changes for added dynamism
ojmakinde 6a34389
Added the dynamic selection
ojmakinde File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
DROP PROCEDURE IF EXISTS populateRequirementMatch; | ||
DELIMITER // | ||
|
||
create procedure populateRequirementMatch() | ||
begin | ||
declare event_id int; | ||
declare event_name varchar(100); | ||
declare done boolean default false; | ||
|
||
-- bonner variables | ||
declare bonner_orient, all_bonner, service_trip, soph_exchange, junior_recommitment int; | ||
declare legacy_training, learning_pres, bonner_congress, leadership_institute int; | ||
|
||
declare event_info cursor for select event.id, LOWER(event.name) from celts.event join celts.program on event.program_id=program.id where program.isBonnerScholars = 1; | ||
declare continue handler for not found set done = TRUE; | ||
|
||
open event_info; | ||
|
||
events_loop: LOOP | ||
fetch event_info into event_id, event_name; | ||
if done then leave events_loop; | ||
end if; | ||
if event_name like "%orientatio%" then | ||
insert into celts.requirementmatch (requirement_id, event_id) values (1, event_id); | ||
elseif event_name like '%ll bonner meet%' then | ||
insert into celts.requirementmatch (requirement_id, event_id) values (2, event_id); | ||
elseif event_name like '%service trip%' then | ||
insert into celts.requirementmatch (requirement_id, event_id) values (3, event_id); | ||
elseif event_name like '%xchange%' then | ||
insert into celts.requirementmatch (requirement_id, event_id) values (4, event_id); | ||
elseif event_name like '%recommitment%' then | ||
insert into celts.requirementmatch (requirement_id, event_id) values (5, event_id); | ||
elseif event_name like '%legacy%' then | ||
insert into celts.requirementmatch (requirement_id, event_id) values (6, event_id); | ||
elseif event_name like '%presentation%' then | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hey @BrianRamsay, what do you think of this, line 35? We're trying to catch Senior Presentation. Do you think just 'presentation' is too vague? (Asking here so I don't forget in person) |
||
insert into celts.requirementmatch (requirement_id, event_id) values (7, event_id); | ||
elseif event_name like '%congress%' then | ||
insert into celts.requirementmatch (requirement_id, event_id) values (8, event_id); | ||
elseif event_name like '%institute%' then | ||
insert into celts.requirementmatch (requirement_id, event_id) values (9, event_id); | ||
else select event_id, event_name; | ||
end if; | ||
/* selecting it so we can see the failing event on the console */ | ||
end loop; | ||
close event_info; | ||
end // | ||
|
||
DELIMITER ; | ||
|
||
call populateRequirementMatch() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments might be useful here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, they might be. However, I don't think there's any single part of the logic too esoteric to warrant any comments, if you ask me.