Skip to content

feat: add extend deadline functionality for mentee submissions#103

Open
tejasai2007 wants to merge 9 commits into
amfoss:developfrom
tejasai2007:extend
Open

feat: add extend deadline functionality for mentee submissions#103
tejasai2007 wants to merge 9 commits into
amfoss:developfrom
tejasai2007:extend

Conversation

@tejasai2007

Copy link
Copy Markdown
Contributor

This PR adds backend support for extending mentee task submission deadlines, enabling mentors or administrators to modify deadline dates during emergency or unexpected situations.

@thet1nk3r3r thet1nk3r3r left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please go through the comments @tejasai2007 , and give explanation
looking forward!

Comment thread app/routes/progress.py Outdated
raise HTTPException(status_code=400, detail="Task Already Extended")
return extended

@router.patch("/update-extend-deadline", response_model= ExtendOut)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

can you brief me about why update-extend-deadline is needed and hows it different from extend-deadline , and why does it need a separate end point
why can not it be included in the extend-deadline, or maybe add a conditional logic

Comment thread app/db/crud.py
db.refresh(submission)
return submission

def submit_task(db: Session, submission_id: int,reference_link:str):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

shouldnt we have a logic to reject tasks when the deadline is crossed

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this part i was planning to commit in issue #97

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

fair enough

Comment thread app/db/crud.py Outdated
'''


def extend_date(db:Session,extended_date:date,submission_id:int,reason:str,mentor_id :int):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

how are we exactly extending the date, are we calculating the no.days needed for the task to be complete from the start date and then extending the days to the result we've got? if so I dont see the code to it

Comment thread app/db/crud.py Outdated
db.commit()
db.refresh(extended)
return extended
def update_extend_date(db:Session,extended_date:date,extended_id : int):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

i dont think update_extend_date is needed, i dont get why this is here

@thet1nk3r3r

Copy link
Copy Markdown
Member

@tejasai2007 please do mention the issue this pr solves

@tejasai2007

Copy link
Copy Markdown
Contributor Author

This pr is to resolve issue #91

@tejasai2007 tejasai2007 force-pushed the extend branch 2 times, most recently from 9d53d29 to 87c201b Compare March 7, 2026 22:07
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.

2 participants