-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'development' of github.com:BCStudentSoftwareDevTeam/cel…
…ts into import-user-logging-crontab
- Loading branch information
Showing
76 changed files
with
3,142 additions
and
1,819 deletions.
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
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. |
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 |
---|---|---|
@@ -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, | ||
) | ||
|
||
|
||
|
Oops, something went wrong.