Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
0e4f281
ac-2: added sample excel sheet to add new students and deleted unnece…
Anunaya07 Feb 16, 2023
821c814
Merge remote-tracking branch 'origin/test-temp' into ac-2
akshatnema Feb 17, 2023
bf8a101
Merge branch 'main' into ac-2
akshatnema Feb 18, 2023
0df8bfe
Merge branch 'main' into ac-2
akshatnema Mar 15, 2023
2a037b8
Merge branch 'main' into ac-2
akshatnema Mar 15, 2023
4c842d5
Merge branch 'main' into ac-2
akshatnema Mar 18, 2023
bfca3e9
Merge branch 'main' into ac-2
akshatnema Mar 19, 2023
115d684
Merge branch 'main' into ac-2
akshatnema Mar 23, 2023
18b2a1b
AC-2: Replaced .xlsx file with .xls file (#1124)
Anunaya07 Mar 25, 2023
e8a612e
Merge branch 'main' into ac-2
akshatnema Mar 26, 2023
cf56e9d
created apis for AC2 module
Divyanshu-iiitdmj Feb 17, 2024
49f6cbd
created apis for AC2 module
Divyanshu-iiitdmj Feb 17, 2024
c2aab55
created apis for AC2 module
Divyanshu-iiitdmj Feb 17, 2024
c2360b6
added apis for AC2 module and created backlog model
Divyanshu-iiitdmj Feb 18, 2024
b8ffd74
created functionalities for pre registration configuration , also cre…
Divyanshu-iiitdmj Mar 3, 2024
09387f0
removing postgres data files and migrations file
Divyanshu-iiitdmj Mar 3, 2024
d01b943
Remove ignored files from repository
Divyanshu-iiitdmj Mar 3, 2024
a57c078
removing postgres data files and migrations file
Divyanshu-iiitdmj Mar 3, 2024
13943ee
removing postgres data files
Divyanshu-iiitdmj Mar 3, 2024
c150d4a
functionality for faculty to view assigned course and generate roll list
Divyanshu-iiitdmj Mar 8, 2024
fe530a8
Wrong details displayed : course name in place of course code
Divyanshu-iiitdmj Mar 9, 2024
3d927fe
Removed migrations file
Divyanshu-iiitdmj Mar 10, 2024
a801ad5
Changed the gitignore file
Divyanshu-iiitdmj Mar 10, 2024
5f5b05f
Merge pull request #1319 from Divyanshusir/courseRegistration
ChaudharyRaman Mar 11, 2024
927d7ee
Updated PR AC2-Course registration after the changes and integration …
Divyanshusir Mar 20, 2024
6d49351
Merge branch 'staging' into ac-2
abhi87374 Mar 21, 2024
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
14 changes: 13 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,17 @@ node_modules/
FusionIIIT/static/
package-lock.json

# migrations

docker-entrypoint.sh


FusionIIIT/applications/eis/migrations/

postgres_data

# sample files from media/Adminstrator
!media/Administrator/academic_procedures/sample_courses_allotment.xls
!media/Administrator/academic_procedures/sample_student_profile.xlsx

migrations/

1 change: 0 additions & 1 deletion FusionIIIT/applications/academic_information/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,3 @@ class Curriculum_InstructorAdmin(admin.ModelAdmin):
admin.site.register(Holiday)
admin.site.register(Curriculum,CurriculumAdmin)

#Hello!
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ class Meta:

class CurriculumSerializer(serializers.ModelSerializer):
course_id = CourseSerializer()

class Meta:
model = Curriculum
fields = ('curriculum_id','course_code','course_id','credits','course_type',
Expand Down
2 changes: 1 addition & 1 deletion FusionIIIT/applications/academic_information/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class Student(models.Model):
'''
Current Purpose : To store information pertinent to a user who is also a student



ATTRIBUTES :

Expand Down
57 changes: 37 additions & 20 deletions FusionIIIT/applications/academic_information/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@



from applications.academic_procedures.views import acad_proced_global_context
from applications.academic_procedures.views import acad_proced_global_context , get_sem_courses
from applications.programme_curriculum.models import Batch


Expand Down Expand Up @@ -107,7 +107,6 @@ def get_context(request):
# course_type = Constants.COURSE_TYPE
# timetable = Timetable.objects.all()
# exam_t = Exam_timetable.objects.all()

procedures_context = acad_proced_global_context()

try:
Expand Down Expand Up @@ -842,12 +841,16 @@ def generatexlsheet(request):
"""
if user_check(request):
return HttpResponseRedirect('/academic-procedures/')

# print(request.POST)
try:
batch = request.POST['batch']
course = Courses.objects.get(id = request.POST['course'])
batch = request.POST['batch']#batch hai year wala (2020 , 21)
course_id = int(request.POST['course']) # id of course in integer
course = course = Courses.objects.get(id=course_id)

# print(course.name)
obj = course_registration.objects.all().filter(course_id = course)
except Exception as e:
print(str(e))
batch=""
course=""
curr_key=""
Expand Down Expand Up @@ -1029,9 +1032,14 @@ def generate_preregistration_report(request):
max_width = max(max_width,len(choices_of_current_student))

for choice in range(1,len(choices_of_current_student)+1):
current_choice = InitialRegistration.objects.get(student_id=student, semester_id__semester_no=sem,course_slot_id = slot,priority = choice)
# #print("current choice is ",current_choice)
z.append(str(current_choice.course_id.code)+"-"+str(current_choice.course_id.name))
try:
current_choice = InitialRegistration.objects.get(student_id=student, semester_id__semester_no=sem, course_slot_id=slot, priority=choice)
z.append(str(current_choice.course_id.code) + "-" + str(current_choice.course_id.name))
except :
z.append("No registration found")
# current_choice = InitialRegistration.objects.get(student_id=student, semester_id__semester_no=sem,course_slot_id = slot,priority = choice)
# # #print("current choice is ",current_choice)
# z.append(str(current_choice.course_id.code)+"-"+str(current_choice.course_id.name))

data.append(z)
m+=1
Expand Down Expand Up @@ -1169,9 +1177,9 @@ def add_new_profile (request):
}
if request.method == 'POST' and request.FILES:
profiles=request.FILES['profiles']
excel = xlrd.open_workbook(file_contents=profiles.read())
excel = xlrd.open_workbook(profiles.name,file_contents=profiles.read())
sheet=excel.sheet_by_index(0)
for i in range(sheet.nrows):
for i in range(1,sheet.nrows):
roll_no=sheet.cell(i,0).value
first_name=str(sheet.cell(i,1).value)
last_name=str(sheet.cell(i,2).value)
Expand All @@ -1191,7 +1199,7 @@ def add_new_profile (request):
category=""
phone_no=0
address=""
dept=str(sheet.cell(i,12).value)
dept=str(sheet.cell(i,11).value)
specialization=str(sheet.cell(i,12).value)
hall_no=None

Expand All @@ -1209,14 +1217,14 @@ def add_new_profile (request):
batch_year=request.POST['Batch']

batch = Batch.objects.all().filter(name = programme_name, discipline__acronym = dept, year = batch_year).first()

user = User.objects.create_user(
username=roll_no,
password='hello123',
first_name=first_name,
last_name=last_name,
email=email,
)


einfo = ExtraInfo.objects.create(
id=roll_no,
Expand Down Expand Up @@ -1253,6 +1261,11 @@ def add_new_profile (request):
working=user,
designation=desig,
)

user.save()
einfo.save()
stud_data.save()
hold_des.save()

sem_id = Semester.objects.get(curriculum = batch.curriculum, semester_no = sem)
course_slots = CourseSlot.objects.all().filter(semester = sem_id)
Expand Down Expand Up @@ -2063,14 +2076,15 @@ def view_all_student_data(request):
"specailization": student.specialization,
"gender" : student.id.sex,
"category": student.category,
"pwd_status": student.pwd_status,
# "pwd_status": student.pwd_status,
"pwd_status": False,
"Mobile": student.id.phone_no,
"dob" : student.id.date_of_birth,
"emailid" : student.id.user.email,
"father_name": student.father_name,
"father_mobile_no": student.father_mobile_no,
# "father_mobile_no": student.father_mobile_no,
"mother_name": student.mother_name,
"mother_mobile_no": student.mother_mobile_no,
# "mother_mobile_no": student.mother_mobile_no,
"address": student.id.address
}
data.append(obj)
Expand Down Expand Up @@ -2140,9 +2154,9 @@ def generatestudentxlsheet(request):
data = None
else:
if(request_rollno != ""):
students = Student.objects.select_related('batch_id', 'id__user', 'batch_id__discipline', 'id').filter(id = request_rollno).only('batch', 'id__id', 'id__user', 'programme','pwd_status', 'father_mobile_no', 'mother_mobile_no', 'batch_id__discipline__acronym', 'specialization', 'id__sex', 'category', 'id__phone_no', 'id__date_of_birth', 'id__user__first_name', 'id__user__last_name', 'id__user__email', 'father_name', 'mother_name', 'id__address')
students = Student.objects.select_related('batch_id', 'id__user', 'batch_id__discipline', 'id').filter(id = request_rollno).only('batch', 'id__id', 'id__user', 'programme', 'batch_id__discipline__acronym', 'specialization', 'id__sex', 'category', 'id__phone_no', 'id__date_of_birth', 'id__user__first_name', 'id__user__last_name', 'id__user__email', 'father_name', 'mother_name', 'id__address')
else:
students = Student.objects.select_related('batch_id', 'id__user', 'batch_id__discipline', 'id').filter(**filter_names).order_by('id').all().only('batch', 'id__id', 'id__user', 'programme','pwd_status', 'father_mobile_no', 'mother_mobile_no', 'batch_id__discipline__acronym', 'specialization', 'id__sex', 'category', 'id__phone_no', 'id__date_of_birth', 'id__user__first_name', 'id__user__last_name', 'id__user__email', 'father_name', 'mother_name', 'id__address')
students = Student.objects.select_related('batch_id', 'id__user', 'batch_id__discipline', 'id').filter(**filter_names).order_by('id').all().only('batch', 'id__id', 'id__user', 'programme', 'batch_id__discipline__acronym', 'specialization', 'id__sex', 'category', 'id__phone_no', 'id__date_of_birth', 'id__user__first_name', 'id__user__last_name', 'id__user__email', 'father_name', 'mother_name', 'id__address')
for i in students:
obj = []
obj.append(i.batch)
Expand All @@ -2153,14 +2167,17 @@ def generatestudentxlsheet(request):
obj.append(i.specialization)
obj.append(i.id.sex)
obj.append(i.category)
obj.append(i.pwd_status)
#obj.append(i.pwd_status)
obj.append(None)
obj.append(i.id.phone_no)
obj.append(i.id.date_of_birth)
obj.append(i.id.user.email)
obj.append(i.father_name)
obj.append(i.father_mobile_no)
#obj.append(i.father_mobile_no)
obj.append(None)
obj.append(i.mother_name)
obj.append(i.mother_mobile_no)
# obj.append(i.mother_mobile_no)
obj.append(None)
obj.append(i.id.address)
data.append(obj)
data.sort()
Expand Down
44 changes: 39 additions & 5 deletions FusionIIIT/applications/academic_procedures/api/serializers.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
from rest_framework.authtoken.models import Token
from rest_framework import serializers

from applications.academic_procedures.models import (ThesisTopicProcess, InitialRegistrations,
FinalRegistrations, SemesterMarks,
BranchChange)
from applications.academic_procedures.models import (ThesisTopicProcess, InitialRegistrations,InitialRegistration,
FinalRegistration, FinalRegistrations, SemesterMarks,
BranchChange , StudentRegistrationChecks, Semester, backlog_course , CourseSlot , FeePayments , course_registration)

from applications.academic_information.api.serializers import (CurriculumInstructorSerializer,
CurriculumSerializer)
from applications.globals.api.serializers import (UserSerializer, HoldsDesignationSerializer)
CurriculumSerializer , CourseSerializer , StudentSerializers )
from applications.globals.api.serializers import (UserSerializer, HoldsDesignationSerializer , ExtraInfoSerializer)

class ThesisTopicProcessSerializer(serializers.ModelSerializer):

Expand All @@ -27,6 +27,24 @@ class Meta:
model = FinalRegistrations
fields = ('__all__')

class InitialRegistrationSerializer(serializers.ModelSerializer):

class Meta:
model = InitialRegistration
fields = ('__all__')

class FinalRegistrationSerializer(serializers.ModelSerializer):

class Meta:
model = FinalRegistration
fields = ('__all__')

class StudentRegistrationChecksSerializer(serializers.ModelSerializer):
class Meta:
model = StudentRegistrationChecks
fields = '__all__'


class SemesterMarksSerializer(serializers.ModelSerializer):

class Meta:
Expand All @@ -38,3 +56,19 @@ class BranchChangeSerializer(serializers.ModelSerializer):
class Meta:
model = BranchChange
fields = ('__all__')

class SemesterSerializer(serializers.ModelSerializer):

class Meta:
model = Semester
fields = ('__all__')

class CourseRegistrationSerializer(serializers.ModelSerializer):
class Meta:
model = course_registration
fields = ('__all__')

class CourseSlotSerializer(serializers.ModelSerializer):
class Meta:
model = CourseSlot
fields = ('__all__')
41 changes: 35 additions & 6 deletions FusionIIIT/applications/academic_procedures/api/urls.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,41 @@
from django.conf.urls import url

from . import views


urlpatterns = [
url(r'^stu/details', views.academic_procedures_student, name='student_procedures'),
url(r'^stu/pre_registration' , views.student_pre_registration , name = 'pre_registration'),
url(r'^stu/final_registration' , views.student_final_registration , name = 'final_registration'),
url(r'^stu/view_registration' , views.student_view_registration , name = 'view_registration'),
url(r'^stu/view_offered_courses' , views.view_offered_courses , name = 'student_view_offered_courses'),
url(r'^stu/backlog_courses', views.student_backlog_courses , name = 'student_backlog_courses'),
url(r'^stu/add_course' , views.add_course , name ='add_course') ,
url(r'^stu/drop_course' , views.drop_course , name = 'drop_course'),
# url(r'^stu/replaceCourse' , views.replaceCourse , name = 'replaceCourse')



url(r'^acad/view_registrations' , views.acad_view_reigstrations , name='acad_view_registrations'),
url(r'^acad/get_course_list' , views.get_course_list , name = 'get_course_list' ),
url(r'^acad/configure_pre_registration' , views.configure_pre_registration_date , name = 'configure_pre_registration'),
url(r'^acad/configure_final_registration' , views.configure_final_registration_date , name = 'configure_final_registration'),
url(r'^acad/add_course_to_slot' , views.add_course_to_slot , name = 'add_course_to_slot'),
url(r'^acad/remove_course_from_slot' , views.remove_course_from_slot , name = 'remove_course_from_slot'),
url(r'^get_next_sem_courses' , views.get_next_sem_courses , name= 'get_next_sem_courses'),


url(r'^fac/view_assigned_courses' , views.faculty_assigned_courses , name = 'faculty_assigned_courses'),
# url(r'^fac/get_roll_list' , views.fetch_roll_list , name = 'fetch_roll_list'),



url(r'^get_user_info' , views.get_user_info , name = 'get_user_info'),

# these urls were designed previously and are not working any more

url(r'^fac/', views.academic_procedures_faculty, name='faculty_procedures'),
url(r'^stu/', views.academic_procedures_student, name='student_procedures'),
url(r'^addThesis/', views.add_thesis, name='add_thesis'),
url(r'^approve_thesis/(?P<id>[0-9]+)/', views.approve_thesis, name='approve_thesis'),
# url(r'^fac/', views.academic_procedures_faculty, name='faculty_procedures'),
# url(r'^stu', views.academic_procedures_student, name='student_procedures'),
# url(r'^addThesis/', views.add_thesis, name='add_thesis'),
# url(r'^approve_thesis/(?P<id>[0-9]+)/', views.approve_thesis, name='approve_thesis')

]
]
Loading