Skip to content

CCE Minor Core Functionality (Edit/View/Withdraw/Modify)#1428

Open
bledsoef wants to merge 92 commits intodevelopmentfrom
1399_EditFunctionality
Open

CCE Minor Core Functionality (Edit/View/Withdraw/Modify)#1428
bledsoef wants to merge 92 commits intodevelopmentfrom
1399_EditFunctionality

Conversation

@bledsoef
Copy link
Contributor

@bledsoef bledsoef commented Mar 17, 2025

Issue Description

Fixes #1399

  • Once a proposal is submitted, we cannot currently modify its status (edit, view, withdraw or mark as completed). We need to add functionality to the action dropdown that will allow us to do so.

Changes

  • Implemented necessary permissions to allow students to view their minor profile and create proposals.
  • Updated all input fields in Request Other Engagement and Summer Experience forms to now populate with existing data, if possible.
  • Added new routes to minor/routes.py that load the page with proper permissions.
  • Updated the statuses for proposals to match that of Course Proposals.
  • Once a proposal is approved by an admin, it can no longer be edited by the student who put it in, only by an admin.
  • Added functionality to quickly approve or unapprove a proposal at any stage.

Testing

  • Reset database.
  • Go to the Minor Management page in the Admin dropdown.
  • Select any student's name and go to the Manage Proposals tab.
  • Create a new Other Engagement and Summer Experience.
  • Mess around with editing data, saving, and making sure it is populated when you go to edit or view it again.
  • Run the tests and ensure they work.

While testing, look out for a few things:

  • Is the PR functional? Are there any bugs?
  • Is page navigation intuitive? Are the required things for creating a proposal clear for our users?
  • Are color conventions and webpage design choices clear and in accordance with how we use colors in the rest of the app?

If the above look good, then the PR can be stepped towards merging.

@bledsoef bledsoef changed the title CCE Minor Edit Functionality CCE Minor Edit/View Functionality Mar 17, 2025
@ojmakinde
Copy link
Contributor

ojmakinde commented Mar 18, 2025

mid pr i'll be honest (i haven't looked at it)

@Kafui123 Kafui123 force-pushed the 1399_EditFunctionality branch from 4c30034 to 7f8682a Compare April 2, 2025 20:23
Base automatically changed from 1395_NewCCEMinorPortal to development April 4, 2025 20:23
@bledsoef bledsoef marked this pull request as ready for review April 7, 2025 21:22
@bledsoef bledsoef self-assigned this Apr 7, 2025
@bledsoef bledsoef requested a review from Copilot April 7, 2025 21:30
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 6 out of 12 changed files in this pull request and generated no comments.

Files not reviewed (6)
  • app/templates/minor/cceMinorProposalManagement.html: Language not supported
  • app/templates/minor/companyOrganizationInformation.html: Language not supported
  • app/templates/minor/profile.html: Language not supported
  • app/templates/minor/requestOtherEngagement.html: Language not supported
  • app/templates/minor/summerExperience.html: Language not supported
  • app/templates/minor/supervisorInformation.html: Language not supported
Comments suppressed due to low confidence (2)

app/controllers/minor/routes.py:88

  • [nitpick] The function name 'createSummerExperienceExperience' is redundant and may be unclear. Consider renaming it to something like 'createSummerExperienceRequest' to better reflect its purpose.
def createSummerExperienceExperience(username):

app/logic/minor.py:42

  • [nitpick] The error message in the updateSummerExperience function reads 'Error saving summer experience' which may be misleading in an update operation. Consider revising the message to indicate an update failure.
def updateSummerExperience(proposalID, formData):

@bakobagassas bakobagassas removed the request for review from JohnCox2211 January 6, 2026 17:12
@RueHaile RueHaile requested a review from BrianRamsay January 7, 2026 23:25
Gbayi added 6 commits March 1, 2026 16:07
… engagements, fixed a previous existing bug, and improved validation mechanisms.
…newly created file row items. Need to fix.
…Pages were loading twice, due to an unnecessary AJAX request, and flashes were getting lost in the multiple loads as a result.
@ojmakinde ojmakinde requested a review from RueHaile March 4, 2026 14:48
@ojmakinde ojmakinde requested a review from MImran2002 March 4, 2026 20:08
Copy link
Contributor

@bakobagassas bakobagassas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when I try to submit a draft, it asks me to check the community and identity box, although I chose to check Power and Inequality.

Image

{% endif %}
<option value="withdraw">Withdraw</option>
{% if g.current_user.isCeltsAdmin == True %}
<option {{'disabled' if proposal.status != "Approved" else ''}} value="Complete">Mark as Completed</option>
Copy link
Contributor

@MImran2002 MImran2002 Mar 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when you go back to edit, should the flask be changed so that it reminds that "mark as completed edit something" instead of approval? and Can a proposal marked as completed be edited again?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great thought. I think the implementation of this depends on what the purpose of the CCE minor functionality is:

  • do we want to use the CCE minor proposal feature as a way to backlog existing engagements so virtual logs exists?
  • or do we want to use it for hard/strict tracking of proposals in their entirety?

if the former is the case, we don't need to add extenuating difficulty around editing proposals post-approval. If the latter is the case, then sure.

@BrianRamsay, thoughts?

@MImran2002
Copy link
Contributor

These are some fixes and potential fixes:

Docstring update: There are some docstrings that needs to be updated like app/controllers/minor/routes.py/createOtherEngagementRequest and createSummerExperienceRequest

Peewee alternative: app/logic/fileHandler.py in line 34-35 where isFileInEvent = AttachmentUpload.select().where(AttachmentUpload.event_id == self.eventId, ... retrieve a boolean and later on it is check if it exist and we create the attachment instead we can possibly use this: create obj, created = AttachmentUpload.get_or_create( to combine the two peewee and remove the explicit if logic

UI bugs:
1st: When the proposal is submitted by a student and they decide to edit there will be a flash saying "once approved ..." appear I believe the flash of warning when the proposal is approved you can edit it anymore should only be shown when the student click submit button instead of selecting either view or edit.

2nd: Interestingly, when the proposal is created and the student go to view all the forms cannot be filled but there is a delete button in attachment that can be deleted in the view setting; this seems to be a UI only no database affected I believe however, on the edit side the delete button doesn't appear if there is a pre-existing attachment and the only way to change attachment is by uploading a new one.
View:
Screenshot 2026-03-06 at 6 17 15 PM
Edit:
Screenshot 2026-03-06 at 6 17 01 PM

@ojmakinde
Copy link
Contributor

ojmakinde commented Mar 8, 2026

2nd: Interestingly, when the proposal is created and the student go to view all the forms cannot be filled but there is a delete button in attachment that can be deleted in the view setting; this seems to be a UI only no database affected I believe however, on the edit side the delete button doesn't appear if there is a pre-existing attachment and the only way to change attachment is by uploading a new one.

Great catch. I will fix.

@ojmakinde
Copy link
Contributor

when I try to submit a draft, it asks me to check the community and identity box, although I chose to check Power and Inequality.
Image

Hey, I had fixed this bug. Did you pull? I tried to reproduce this but I couldn't.

@ojmakinde ojmakinde requested a review from bakobagassas March 8, 2026 06:55
@github-actions
Copy link

github-actions bot commented Mar 8, 2026

View Code Coverage

@RueHaile
Copy link
Contributor

RueHaile commented Mar 9, 2026

image Why is it taking 'e' alone as an input for that field that should be a number? Is it an exception? For the website filed make sure that we are accounting for all the inputs that the users can put, such as a single letter, so we need gardrales to only accept the fields that we want. which is a website, so have an expectation for a "www.xyz." The input value attribute we accept should specify an initial value for an input field. image

@RueHaile
Copy link
Contributor

RueHaile commented Mar 9, 2026

Steps

  1. Create a CCE minor request summer experience on studnet-side/ I picked Collins
  2. Go in as an admin and try to approve that cce minor. The admin, both Dr. Heggan and Brian, aren't able to approve, edit it, or mark it as complete. There is a logic issue it?
image

@bakobagassas
Copy link
Contributor

Related to Rue's latest comment:

I verified: edit, approve, mark as completed all work. You should try to pull and update the branch

@bakobagassas
Copy link
Contributor

image

We cannot input letters into the hours box, but we don't get an indication saying that it is not working because we need to input a number and not letter. Is that okay?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add an edit feature and distinguush between editing and creating a Summer Experience or Other Engagement

8 participants