Skip to content

Commit

Permalink
Merge pull request #1684 from Akashsah2003/latest_staging
Browse files Browse the repository at this point in the history
fix(academics): Removed miscellaneous tab in academics for student
  • Loading branch information
dvjsharma authored Jan 13, 2025
2 parents 7f35837 + 8e821ac commit e56ce06
Show file tree
Hide file tree
Showing 4 changed files with 311 additions and 12 deletions.
21 changes: 19 additions & 2 deletions FusionIIIT/applications/academic_procedures/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,8 @@ def academic_procedures_student(request):
pre_registration_date_flag, prd_start_date= get_pre_registration_eligibility(current_date, user_sem, year)
final_registration_date_flag = get_final_registration_eligibility(current_date)
add_or_drop_course_date_flag = get_add_or_drop_course_date_eligibility(current_date)
swayam_registration_flag = get_swayam_registration_eligibility(current_date, user_sem, year)
print("Swayam Registration: ", user_sem, swayam_registration_flag)
pre_registration_flag = False
final_registration_flag = False

Expand Down Expand Up @@ -575,6 +577,7 @@ def academic_procedures_student(request):
'courses_list': next_sem_branch_course,
'fee_payment_mode_list' : fee_payment_mode_list,
'next_sem_registration_courses': next_sem_registration_courses,
'current_sem_registration_courses': current_sem_branch_course,
'final_registration_choice' : final_registration_choice,
'unavailable_courses_nextsem' : unavailable_courses_nextsem,
'performance_list' : performance_list,
Expand Down Expand Up @@ -607,6 +610,7 @@ def academic_procedures_student(request):
'adc_date_flag': add_or_drop_course_date_flag,
'pre_registration_flag' : pre_registration_flag,
'final_registration_flag': final_registration_flag,
'swayam_registration_flag': swayam_registration_flag,
'swayam_courses_count':swayam_courses_count,
# 'final_r': final_register_1,

Expand All @@ -623,8 +627,8 @@ def academic_procedures_student(request):
'hos_d':hos_d,
'tot_d':tot_d,
'attendence':attendence,
'backlogCourseList' : backlogCourseList,
'auto_backlog_courses_list' : auto_backlog_courses_list,
# 'backlogCourseList' : backlogCourseList,
# 'auto_backlog_courses_list' : auto_backlog_courses_list,
'BranchChangeForm': BranchChangeForm(),
'BranchFlag':branchchange_flag,
'assistantship_flag' : student_status,
Expand Down Expand Up @@ -1419,6 +1423,19 @@ def get_course_verification_date_eligibilty(current_date):
return False
except Exception as e:
return False

def get_swayam_registration_eligibility(current_date, user_sem, year):
try:
swayam_registration_date = Calendar.objects.all().filter(description=f"Swayam Registration {user_sem} {year}").first()
print(swayam_registration_date, user_sem, year)
swayam_start_date = swayam_registration_date.from_date
swayam_end_date = swayam_registration_date.to_date
if current_date>=swayam_start_date and current_date<=swayam_end_date:
return True
else :
return False
except Exception as e:
return False

def get_user_branch(user_details):
return user_details.department.name
Expand Down
20 changes: 13 additions & 7 deletions FusionIIIT/templates/academic_procedures/academic.html
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@
<i class="right floated chevron right icon"></i>
</a>
{% endif %}
<a class="item" data-tab="Miscellaneous">Miscellaneous
<!-- <a class="item" data-tab="Miscellaneous">Miscellaneous
<i class="right floated chevron right icon"></i>
</a>
</a> -->
<a class="item" data-tab="eight" style="display: none;">
Apply for Leave
<i class="right floated chevron right icon"></i>
Expand Down Expand Up @@ -168,15 +168,18 @@
</div>
<div class="ui tab segment" data-tab="miscellaneous_1">
<div class="ui pointing secondary menu">
<a class=" active item" data-tab="next_courses" style="width: 33%;">
<a class=" active item" data-tab="next_courses" style="width: 20%;">
Courses
</a>
<a class="item" data-tab="pre_registration" style="width: 33%;">
<a class="item" data-tab="pre_registration" style="width: 20%;">
Pre-Registration
</a>
<a class=" item" data-tab="final_registration" style="width: 33%;">
<a class=" item" data-tab="final_registration" style="width: 20%;">
Final-Registration
</a>
<a class=" item" data-tab="swayam_registration" style="width: 20%;">
Swayam-Registration
</a>
</div>

<div class="ui active tab segment" data-tab="next_courses" >
Expand All @@ -188,9 +191,12 @@
<div class="ui tab segment" data-tab="final_registration">
{% include 'academic_procedures/finalregister.html' %}
</div>
<div class="ui tab segment" data-tab="swayam_registration">
{% include 'academic_procedures/swayamregister.html' %}
</div>
</div>

<div class="ui tab segment" data-tab="Miscellaneous" style="width: 110%" >
<!-- <div class="ui tab segment" data-tab="Miscellaneous" style="width: 110%" >
<div class="ui pointing secondary menu">
<a class=" active item" data-tab="miscellaneous_2" >
Check Dues
Expand Down Expand Up @@ -282,7 +288,7 @@
{% include 'academic_procedures/replace.html' %}
</div>
</div>
</div> -->


<div class="ui tab segment" data-tab="four">
Expand Down
7 changes: 4 additions & 3 deletions FusionIIIT/templates/academic_procedures/backlog.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% load static %}
<center><b>Backlog Courses</b></center>
<div class="ui vertical segment" style="width: 100%">
<!-- <table class="ui very basic celled sortable table" style="width: 100%">
<!-- <div class="ui vertical segment" style="width: 100%">
<table class="ui very basic celled sortable table" style="width: 100%">
<thead>
<tr style="background-color: #f1f1f1">
<th style="10%">Course Name</th>
Expand All @@ -17,7 +17,7 @@
{% endfor %}
</tr>
{% endfor %}
</table> -->
</table>
<table class="ui celled medium table orange" style="width: 100%">
<thead>
<tr style="background-color: #f1f1f1">
Expand Down Expand Up @@ -74,3 +74,4 @@
});
}
</script>
-->
Loading

0 comments on commit e56ce06

Please sign in to comment.