Skip to content
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

Slc status final branch #1233

Merged
merged 4 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/controllers/admin/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@

from app.controllers.admin import admin_bp


@admin_bp.route('/switch_user', methods=['POST'])
def switchUser():
if app.env == "production":
Expand Down
4 changes: 3 additions & 1 deletion app/controllers/serviceLearning/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ def slcEditProposal(courseID):
if g.current_user.isCeltsAdmin or g.current_user in courseInstructors or isCourseCreator:
course = Course.get_by_id(courseID)
courseStatus = CourseStatus.get_by_id(course.status)
print("Type of courseStatus:", type(courseStatus))
seedyjahateh marked this conversation as resolved.
Show resolved Hide resolved
courseStatusInt = courseStatus.get_id()
approved = 3
# Condition to check the route you are comming from
Expand All @@ -69,14 +70,15 @@ def slcEditProposal(courseID):
filePaths = FileHandler(courseId=course.id).retrievePath(associatedAttachments)

terms = selectSurroundingTerms(g.current_term, 0)

return render_template('serviceLearning/slcNewProposal.html',
course = course,
questionanswers = questionAnswers,
terms = terms,
statusOfCourse = statusOfCourse,
courseInstructor = courseInstructor,
filePaths = filePaths,
courseStatus = courseStatus,
redirectTarget = getRedirectTarget())

else:
Expand Down
4 changes: 2 additions & 2 deletions app/models/course.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from app.models.courseStatus import CourseStatus
from app.models.note import Note
from app.models.user import User
from peewee import CharField, FloatField, BooleanField, ForeignKeyField, TextField
seedyjahateh marked this conversation as resolved.
Show resolved Hide resolved

class Course(baseModel):
courseName = CharField()
Expand All @@ -18,5 +19,4 @@ class Course(baseModel):
isAllSectionsServiceLearning = BooleanField(default=False)
isRegularlyOccurring = BooleanField(default=False)
isPreviouslyApproved = BooleanField(default=False)
hasSlcComponent = BooleanField(default=False)

hasSlcComponent = BooleanField(default=False)
5 changes: 4 additions & 1 deletion app/models/courseStatus.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
from app.models import*
# from app.models import*
from app.models import baseModel
from peewee import CharField

seedyjahateh marked this conversation as resolved.
Show resolved Hide resolved

class CourseStatus(baseModel):
status = CharField()
Expand Down
13 changes: 12 additions & 1 deletion app/templates/serviceLearning/slcProposal.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
<h2 class="text-center pt-4 pb-2"> New Proposal For Service-Learning Course</h2>
<h2 class="text-center pt-4 pb-2">Proposal For Service-Learning Course</h2>

<h3 class="text-center pb-4">Proposal Status:
<span style="color: rgb(12, 8, 245);">
seedyjahateh marked this conversation as resolved.
Show resolved Hide resolved
{{ courseStatus.status }}
</span>
</h3>
seedyjahateh marked this conversation as resolved.
Show resolved Hide resolved

<p class="text-center fw-bold"> Please review the <a class="guidelines" href="#">service-learning course guidelines</a> before completing this form </p>
<div class="container-fluid">
<div class="row">
Expand Down Expand Up @@ -198,3 +205,7 @@ <h2 class="text-center pt-4 pb-2"> New Proposal For Service-Learning Course</h2>
</div>
<input value={{course.id}} name="courseID" hidden/>
</div>

<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
2 changes: 1 addition & 1 deletion app/templates/serviceLearning/slcQuestionnaire.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<link rel="stylesheet" href="{{url_for('static', filename ='css/slcQuestionnaire.css')}}">
{% endblock %}

<h2 class="text-center pt-4">New Service-Learning Course</h2>
<h2 class="text-center pt-4">For New Service-Learning Courses</h2>
<p class="text-center fw-bold"> Please review the <a class="guidelines" href="#">service-learning course guidelines</a> before completing this form </p>
<p>Referring to the Criteria for Service-Learning Course Designation/ALE Requirement met through Service-Learning, please address the following in a
one-page proposal narrative. You might aim for approximately 500 words in total. Attach your syllabus (or the one form the most recent time that the course was taught). If you are in the process of
Expand Down
Loading