Skip to content

Commit

Permalink
Merge branch 'development' of github.com:BCStudentSoftwareDevTeam/cel…
Browse files Browse the repository at this point in the history
…ts into import-user-logging-crontab
  • Loading branch information
hoerstl committed Nov 6, 2024
2 parents 37b8bb8 + af0501a commit 34af8bf
Show file tree
Hide file tree
Showing 76 changed files with 3,142 additions and 1,819 deletions.
14 changes: 14 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## Issue Description

Fixes #add issue number
- Add issue description

## Changes

- Use bullet points to provide a description of added changes.
- Add images, where possible, to provide more context to your changes.

## Testing

- Use `backticks` to highlight shell commands or file directories in your test descriptions.
- Use bullet points to provide a concise description of testing procedure.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@
* default python is Python 3

## Getting Started With CELTS in a devcontainer
1. If on Windows 10, make sure your Windows install is in developer mode so that core.symlinks will be set properly: https://learn.microsoft.com/en-us/windows/apps/get-started/enable-your-device-for-development (requires admin privileges)
1. Windows
* If on Windows 10, make sure your Windows install is in developer mode so that core.symlinks will be set properly: https://learn.microsoft.com/en-us/windows/apps/get-started/enable-your-device-for-development (requires admin privileges)
* In git-bash, set `git config --global core.symlink true` and cross your fingers
* It's possible after the final setup is done in VSCode you will need to fix the symlink in `database` and `app/scripts`
3. Set up an SSH agent with your GitHub SSH key. https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent
4. Open repository directory in VSCode (either clone with VSCode or install git yourself and clone with ```git clone git@github.com:BCStudentSoftwareDevTeam/celts.git```)
5. Follow prompts to install Dev Container extension and open project in dev container
Expand Down Expand Up @@ -98,7 +101,7 @@ If you want to test with actual emails, use an email other than outlook to test
1. Set up two factor authentication on your Gmail (Security Settings)
2. Create an App Password through your Gmail. This 16 character password can only be viewed once, so make sure to save it. (NOTE: You won't have the option to create an app password unless step one is completed)
3. Inside of your secret_config.yaml file set the MAIL_USERNAME and MAIL_DEFAULT_SENDER as your Gmail, set the MAIL_PASSWORD as your new app password as, and set ALWAYS_SEND_MAIL as True. If you want emails to go to their real recipients, remove MAIL_OVERRIDE_ALL from your config or set it to "".
4. For testing purposes, change the email of the student and supervisor to match another email that can receive your test emails (or you can use MAIL_OVERRIDE_ALL to send everything to the address specified.
4. For testing purposes, change the email of the student and supervisor to match another email that can receive your test emails or you can use MAIL_OVERRIDE_ALL to send everything to the address specified.

### SSDT Documentation
This is SSDT Documentation that contains details, references, workflow, system administration, etc. You are welcome to contribute to it and/or review it:
Expand All @@ -107,4 +110,4 @@ http://ssdt-documentation.berea.edu/

This is a permissions spreadsheet that lists all possible roles a user could have in the application and what permissions they are allowed. If you are adding a new role or feature please update this document:

https://docs.google.com/spreadsheets/d/1RQao6WqHZFZo0rYBPnuwnhvVI856ysqTaY0a5m3IR1Q/edit?usp=sharing
https://docs.google.com/spreadsheets/d/1RQao6WqHZFZo0rYBPnuwnhvVI856ysqTaY0a5m3IR1Q/edit?usp=sharing
5 changes: 5 additions & 0 deletions app/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ def load_currentTerm():
session['current_term'] = model_to_dict(term)
g.current_term = term

import datetime
@app.before_request
def load_currentDateTime():
g.currentDateTime = datetime.datetime.now()

from flask import request
@app.context_processor
def load_visibleAccordion():
Expand Down
22 changes: 19 additions & 3 deletions app/controllers/admin/minor.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,36 @@
from flask import render_template, g, abort
from flask import render_template, g, abort, request, redirect, url_for

from app.models.user import User

from app.controllers.admin import admin_bp

from app.logic.minor import getMinorInterest, getMinorProgress
from app.logic.minor import getMinorInterest, getMinorProgress, toggleMinorInterest

@admin_bp.route('/admin/cceMinor', methods=['GET'])
@admin_bp.route('/admin/cceMinor', methods=['POST','GET'])
def manageMinor():

if not g.current_user.isAdmin:
abort(403)

if request.method == 'POST':
interested_students = request.form.getlist('interestedStudents[]')

for i in interested_students:
user = User.get(username=i)
if not user.minorInterest:
toggleMinorInterest(i)


interestedStudentsList = getMinorInterest()
interestedStudentEmailString = ';'.join([student['email'] for student in interestedStudentsList])
sustainedEngagement = getMinorProgress()


return render_template('/admin/cceMinor.html',
interestedStudentsList = interestedStudentsList,
interestedStudentEmailString = interestedStudentEmailString,
sustainedEngagement = sustainedEngagement,
)



Loading

0 comments on commit 34af8bf

Please sign in to comment.