diff --git a/FusionIIIT/Fusion/fusion.db b/FusionIIIT/Fusion/fusion.db index 1fe84e47f..062185ab7 100644 Binary files a/FusionIIIT/Fusion/fusion.db and b/FusionIIIT/Fusion/fusion.db differ diff --git a/FusionIIIT/applications/office_module/admin.py b/FusionIIIT/applications/office_module/admin.py index ee6be80ec..bbb24aa07 100644 --- a/FusionIIIT/applications/office_module/admin.py +++ b/FusionIIIT/applications/office_module/admin.py @@ -1,5 +1,4 @@ from django.contrib import admin - from .models import * admin.site.register(Requisitions) @@ -15,3 +14,11 @@ admin.site.register(registrar_establishment_section) admin.site.register(registrar_director_section) admin.site.register(Assistantship) + +admin.site.register(LTC) +admin.site.register(CPDA) +admin.site.register(Auto_fair_claim) +admin.site.register(Teaching_credits1) +admin.site.register(Assigned_Teaching_credits) +admin.site.register(Lab1) +admin.site.register(TA_assign) diff --git a/FusionIIIT/applications/office_module/apps.py b/FusionIIIT/applications/office_module/apps.py index 3712941b0..4fbaa4a93 100644 --- a/FusionIIIT/applications/office_module/apps.py +++ b/FusionIIIT/applications/office_module/apps.py @@ -2,4 +2,4 @@ class OfficeModuleConfig(AppConfig): - name = 'applications.office_module' + name = 'applications.office_module' \ No newline at end of file diff --git a/FusionIIIT/applications/office_module/custom_filers.py b/FusionIIIT/applications/office_module/custom_filers.py new file mode 100644 index 000000000..16db159e5 --- /dev/null +++ b/FusionIIIT/applications/office_module/custom_filers.py @@ -0,0 +1,5 @@ +from django import template + +@register.filter +def strip_double_quotes(quoted_string): + return quoted_string.replace('"', '') \ No newline at end of file diff --git a/FusionIIIT/applications/office_module/forms.py b/FusionIIIT/applications/office_module/forms.py index 6e039ed9b..cd98e55f6 100644 --- a/FusionIIIT/applications/office_module/forms.py +++ b/FusionIIIT/applications/office_module/forms.py @@ -1,8 +1,6 @@ from django import forms - from .models import * - class Requisitionform(forms.ModelForm): class Meta: model=Requisitions diff --git a/FusionIIIT/applications/office_module/models.py b/FusionIIIT/applications/office_module/models.py index cc92cacb1..06dab50bb 100644 --- a/FusionIIIT/applications/office_module/models.py +++ b/FusionIIIT/applications/office_module/models.py @@ -1,19 +1,14 @@ -import datetime - from django.db import models - -from applications.academic_information.models import (Course, Grades, - Instructor, Meeting, Spi, - Student) -from applications.academic_procedures.models import Thesis +import datetime +from datetime import datetime +from applications.academic_information.models import Student, Grades, Meeting +from applications.globals.models import Staff, Faculty, ExtraInfo, Designation,HoldsDesignation, DepartmentInfo from applications.filetracking.models import Tracking -from applications.globals.models import (DepartmentInfo, Designation, - ExtraInfo, Faculty, HoldsDesignation, - Staff) from applications.leave.models import Leave - from .models_office_students import * +from applications.academic_information.models import Student, Instructor, Spi, Grades, Course +from applications.academic_procedures.models import Thesis class Constants: DAY_CHOICES = ( @@ -102,7 +97,7 @@ class Constants: ('rail', 'RAIL') ) - TICK_TYPE = ( + PHD_COURSES = ( ('Computer Graphics', 'Computer Graphics'), ('Machine Learning', 'Machine Learning'), ('Image Processing','Image Processing'), @@ -162,6 +157,14 @@ class Constants: ) +FEST_TYPE = ( + ('0', "Abhikalpan"), + ('1', "Gusto"), + ('2', "Tarang"), + ('3', "Inter-IIIT"), + +) + class Assistantship(models.Model): @@ -492,12 +495,12 @@ class Teaching_credits1(models.Model): name = models.CharField(max_length=100) programme = models.CharField(max_length=100) branch = models.CharField(max_length=100) - course1 = models.CharField(choices=Constants.TICK_TYPE, - max_length=100, default='NO') - course2 = models.CharField(choices=Constants.TICK_TYPE, - max_length=100, default='NO') - course3 = models.CharField(choices=Constants.TICK_TYPE, - max_length=100, default='NO') + course1 = models.CharField(choices=Constants.PHD_COURSES, + max_length=100) + course2 = models.CharField(choices=Constants.PHD_COURSES, + max_length=100) + course3 = models.CharField(choices=Constants.PHD_COURSES, + max_length=100) tag = models.IntegerField(default=0) class Meta: db_table = 'Teaching_credits1' @@ -507,29 +510,40 @@ def __str__(self): class Assigned_Teaching_credits(models.Model): roll_no = models.ForeignKey(Teaching_credits1, on_delete=models.CASCADE) - assigned_course = models.CharField(max_length=100,default='NO') + assigned_course = models.CharField(max_length=100) class Meta: db_table = 'Assigned_Teaching_credits' + def __str__(self): + return str(self.roll_no) -class Lab(models.Model): - lab = models.CharField(max_length=10) +class Lab1(models.Model): + lab_name = models.CharField(max_length=50, primary_key=True) #Lab name lab_instructor = models.CharField(max_length=30) day = models.CharField(max_length=10,choices=Constants.DAY_CHOICES, default='Monday') - s_time = models.CharField(max_length=6, default='0:00') - e_time = models.CharField(max_length=6, default='0:00') + s_time = models.TimeField(default ='10:00:00') + e_time = models.TimeField(default ='12:00:00') + + #e_time = models.DateTimeField(max_length=6, default='0:00') class Meta: db_table = 'Lab' def __str__(self): - return str(self.lab) + return str(self.lab_name) class TA_assign(models.Model): - roll_no = models.ForeignKey(ExtraInfo, on_delete=models.CASCADE, related_name='TA_id') - lab = models.ForeignKey(Lab, on_delete=models.CASCADE) + #roll_no = models.ForeignKey(ExtraInfo, on_delete=models.CASCADE, related_name='TA_id') + lab_name = models.ForeignKey(Lab1, on_delete=models.CASCADE) + roll_no = models.IntegerField(primary_key=True) + name = models.CharField(max_length=100, default ='student_name') + + #lab_name = models.CharField(max_length=50, primary_key=True) #Lab name balance = models.IntegerField(default=2) + start_date = models.DateField() + end_date = models.DateTimeField() + class Meta: db_table = 'TA_assign' def __str__(self): - return str(self.id) + return str(self.roll_no) diff --git a/FusionIIIT/applications/office_module/models_office_students.py b/FusionIIIT/applications/office_module/models_office_students.py index a8fc14313..f8024b2da 100644 --- a/FusionIIIT/applications/office_module/models_office_students.py +++ b/FusionIIIT/applications/office_module/models_office_students.py @@ -1,69 +1,69 @@ -import datetime - -from django.db import models -from django.utils.translation import gettext as _ - -from applications.globals.models import ExtraInfo - - -class Constants: - - APPROVAL_TYPE = ( - ('APPROVED', 'Approved'), - ('PENDING', 'Pending'), - ) - - HALL_NO = ( - ('HALL-1','hall-1'), - ('HALL-3','hall-3'), - ('HALL-4','hall-4'), - ) - - CLUB_TYPE = ( - ('TECHNICAL', 'technical'), - ('CULTURAL', 'cultural'), - ('SPORTS', 'sports'), - ) - - - -class DeanS_approve_committes(models.Model): - id = models.AutoField(primary_key=True) - convener=models.ForeignKey(ExtraInfo, on_delete=models.CASCADE ,related_name='convener') - faculty_incharge=models.ForeignKey(ExtraInfo, on_delete=models.CASCADE ,related_name='facultyincharge') - date_approved=models.DateField(null=True, blank=True) - description=models.CharField(max_length=200) - - def __str__(self): - return self.convener + '-' + self.dateofapproval - -class hostel_guestroom_approval(models.Model): - id = models.AutoField(primary_key=True) - intender=models.ForeignKey(ExtraInfo, on_delete=models.CASCADE) - hall_no=models.CharField(max_length=5, choices=Constants.HALL_NO ,default='') - arrival_date=models.DateField(_("Date"), default=datetime.date.today) - departure_date=models.DateField(null=True, blank=True) - status=models.CharField(max_length=20, choices=Constants.APPROVAL_TYPE ,default='Pending') - - def __str__(self): - return self.hall_no + '-' + self.status - - -class hostel_allotment(models.Model): - id = models.AutoField(primary_key=True) - hall_no=models.CharField(max_length=5, choices=Constants.HALL_NO ,default='') - allotment_file=models.FileField(upload_to='uploads/') - description=models.CharField(max_length=200) - - def __str__(self): - return '{} - {}'.format(self.hall_no, self.allotment_file) - -class Budget(models.Model): - id=models.AutoField(primary_key=True) - budget_type=models.CharField(max_length=20) - club_type=models.CharField(max_length=20, choices=Constants.CLUB_TYPE, default='') - budget_allocated=models.PositiveIntegerField(default=0) - budget_expenditure=models.PositiveIntegerField(default=0) - budget_available=models.PositiveIntegerField(default=0) - # def __str__(self): - # return self.budget_type + '-' + self.budget_allocated +import datetime + +from django.db import models +from django.utils.translation import gettext as _ +from applications.globals.models import ExtraInfo + + + +class Constants: + + APPROVAL_TYPE = ( + ('APPROVED', 'Approved'), + ('PENDING', 'Pending'), + ) + + HALL_NO = ( + ('HALL-1','hall-1'), + ('HALL-3','hall-3'), + ('HALL-4','hall-4'), + ) + + CLUB_TYPE = ( + ('TECHNICAL', 'technical'), + ('CULTURAL', 'cultural'), + ('SPORTS', 'sports'), + ) + + + +class DeanS_approve_committes(models.Model): + id = models.AutoField(primary_key=True) + convener=models.ForeignKey(ExtraInfo, on_delete=models.CASCADE ,related_name='convener') + faculty_incharge=models.ForeignKey(ExtraInfo, on_delete=models.CASCADE ,related_name='facultyincharge') + date_approved=models.DateField(null=True, blank=True) + description=models.CharField(max_length=200) + + def __str__(self): + return self.convener + '-' + self.dateofapproval + +class hostel_guestroom_approval(models.Model): + id = models.AutoField(primary_key=True) + intender=models.ForeignKey(ExtraInfo, on_delete=models.CASCADE) + hall_no=models.CharField(max_length=5, choices=Constants.HALL_NO ,default='') + arrival_date=models.DateField(_("Date"), default=datetime.date.today) + departure_date=models.DateField(null=True, blank=True) + status=models.CharField(max_length=20, choices=Constants.APPROVAL_TYPE ,default='Pending') + + def __str__(self): + return self.hall_no + '-' + self.status + + +class hostel_allotment(models.Model): + id = models.AutoField(primary_key=True) + hall_no=models.CharField(max_length=5, choices=Constants.HALL_NO ,default='') + allotment_file=models.FileField(upload_to='uploads/') + description=models.CharField(max_length=200) + + def __str__(self): + return '{} - {}'.format(self.hall_no, self.allotment_file) + +class Budget(models.Model): + id=models.AutoField(primary_key=True) + budget_type=models.CharField(max_length=20) + club_type=models.CharField(max_length=20, choices=Constants.CLUB_TYPE, default='') + budget_allocated=models.PositiveIntegerField(default=0) + budget_expenditure=models.PositiveIntegerField(default=0) + budget_available=models.PositiveIntegerField(default=0) + # def __str__(self): + # return self.budget_type + '-' + self.budget_allocated diff --git a/FusionIIIT/applications/office_module/urls.py b/FusionIIIT/applications/office_module/urls.py index e0888271b..90fd5406d 100644 --- a/FusionIIIT/applications/office_module/urls.py +++ b/FusionIIIT/applications/office_module/urls.py @@ -1,6 +1,5 @@ from django.conf.urls import url from django.views.decorators.csrf import csrf_exempt - from . import views app_name = 'office' @@ -35,6 +34,11 @@ url(r'^officeOfHOD/$', views.officeOfHOD, name='officeOfHOD'), url(r'^officeOfHOD/submit/$',views.teaching_form,name='teaching_form'), url(r'^officeOfHOD/work/$',views.hod_work,name='hod_work'), + url(r'^officeOfHOD/lab/$',views.lab_details,name='lab_details'), + url(r'^officeOfHOD/assign_ta/$',views.assign_ta,name='assign_ta'), + + + url(r'^genericModule/', views.genericModule, name='genericModule'), url(r'^deleteitem/(?P[0-9]+)',views.delete_item, name='delete_item'), url(r'^deletevendor/(?P[0-9]+)',views.delete_vendor, name='delete_vendor'), diff --git a/FusionIIIT/applications/office_module/views.py b/FusionIIIT/applications/office_module/views.py index 79c98b0bc..632edb6f0 100644 --- a/FusionIIIT/applications/office_module/views.py +++ b/FusionIIIT/applications/office_module/views.py @@ -1,23 +1,21 @@ -import datetime -from datetime import date, datetime - -from django.contrib.auth import authenticate, login +from .models import Project_Reallocation,Project_Closure,Project_Extension,Project_Registration +from django.shortcuts import render from django.contrib.auth.decorators import login_required -from django.db.models import Q +from applications.globals.models import ExtraInfo, Designation, User, HoldsDesignation +from applications.scholarships.models import Mcm +from applications.academic_procedures.models import Thesis +from applications.globals.models import HoldsDesignation from django.http import HttpResponse, HttpResponseRedirect -from django.shortcuts import get_object_or_404, render +from .models import * +import datetime from django.utils import timezone - -from applications.academic_procedures.models import Thesis -from applications.globals.models import (Designation, ExtraInfo, - HoldsDesignation, User) -from applications.scholarships.models import Mcm - from .forms import * -from .models import * -from .models import (Project_Closure, Project_Extension, Project_Reallocation, - Project_Registration) +from django.db.models import Q from .views_office_students import * +from django.shortcuts import render +from datetime import date, datetime +from django.shortcuts import get_object_or_404, render +from django.contrib.auth import authenticate, login def officeOfDeanRSPC(request): @@ -258,8 +256,11 @@ def upload(request): @login_required(login_url='/accounts/login') def officeOfHOD(request): pro = Teaching_credits1.objects.filter(tag=0) + #pro = Teaching_credits1.objects.all() pro1 = Assigned_Teaching_credits.objects.all() - context = {'pro':pro,'pro1':pro1} + lab = Lab1.objects.all() + assign_ta = TA_assign.objects.all() + context = {'pro':pro,'pro1':pro1,'lab':lab, 'assign_ta':assign_ta} return render(request, "officeModule/officeOfHOD/officeOfHOD.html", context) @@ -542,28 +543,70 @@ def teaching_form(request): course1=request.POST.get('course1') course2=request.POST.get('course2') course3=request.POST.get('course3') + print(course1) request_obj = Teaching_credits1(roll_no=roll_no,name=name, programme=programme, branch=branch, course1=course1, course2=course2, course3=course3) print("===================================================================") request_obj.save() context={} - return render(request,"officeModule/officeOfHOD/tab4content4.html",context) + #return HttpResponseRedirect(request,"officeModule/officeOfHOD/",context) + return HttpResponseRedirect('/office/officeOfHOD/') + @login_required def hod_work(request): roll_no=request.POST.get('roll_no') tc = Teaching_credits1.objects.get(roll_no=roll_no) assigned_course=request.POST.get('assigned_course') + print('this is course ') + print(assigned_course) request_obj1 = Assigned_Teaching_credits(roll_no=tc,assigned_course=assigned_course) request_obj1.save() tc.tag=1 tc.save() context={} - return render(request,"officeModule/officeOfHOD/tab4content4.html",context) + #return render(request,"officeModule/officeOfHOD/tab4content4.html",context) + return HttpResponseRedirect('/office/officeOfHOD/') """return HttpResponseRedirect('')""" """return render(request,"officeModule/officeOfHOD/tab4content1.html",context)""" +@login_required +def lab_details(request): + lab_name=request.POST.get('lab_name') + lab_instructor=request.POST.get('lab_instructor') + day=request.POST.get('day') + s_time=request.POST.get('s_time') + e_time=request.POST.get('e_time') + request_obj = Lab(lab_name=lab_name, lab_instructor=lab_instructor, day=day, s_time=s_time, e_time=e_time) + print("===================================================================") + request_obj.save() + context={} + #return HttpResponseRedirect(request,"officeModule/officeOfHOD/",context) + return HttpResponseRedirect('/office/officeOfHOD/') + + +def remove2(x): + return x[1:-1] + + +@login_required +def assign_ta(request): + roll_no=request.POST.get('roll_no') + lab_name=request.POST.get('lab_name') + #lname = lab_name.replace('\"','') + #lname = lab_name.lstrip('\"') + #lname = remove2(lab_name) + #print('this is',lname) + name=request.POST.get('name') + start_date=request.POST.get('start_date') + end_date=request.POST.get('end_date') + request_obj = TA_assign(roll_no=roll_no, lab_name=lab_name, name=name, start_date=start_date, end_date=end_date) + print("===================================================================") + request_obj.save() + context={} + #return HttpResponseRedirect(request,"officeModule/officeOfHOD/",context) + return HttpResponseRedirect('/office/officeOfHOD/') def genericModule(request): diff --git a/FusionIIIT/applications/office_module/views_office_students.py b/FusionIIIT/applications/office_module/views_office_students.py index 3c7bf3491..95ea021bc 100644 --- a/FusionIIIT/applications/office_module/views_office_students.py +++ b/FusionIIIT/applications/office_module/views_office_students.py @@ -1,164 +1,160 @@ -import json - -from django.contrib.auth.decorators import login_required -from django.http import HttpResponse, HttpResponseRedirect -from django.shortcuts import get_object_or_404, render - -from applications.academic_information.models import Meeting -from applications.globals.models import * -from applications.gymkhana.models import Club_budget, Club_info - -from .models import Budget, Constants, hostel_allotment - - -@login_required -def officeOfDeanStudents(request): - budget_app= Club_budget.objects.all().filter(status='open'); - past_budget=Club_budget.objects.all().exclude(status='open'); - minutes=Meeting.objects.all().filter(minutes_file=""); - final_minutes=Meeting.objects.all().exclude(minutes_file=""); - hall_allotment=hostel_allotment.objects.all() - clubNew= Club_info.objects.all().filter(status='open') - club =Club_info.objects.all().exclude(status='open') - budgets=Club_info.objects.all().filter(status='confirmed') - approved_budgets=Club_budget.objects.all().filter(status='confirmed') - budget_allotment= Club_info.objects.all().filter(status='confirmed' , alloted_budget=0) - budget_alloted = Club_info.objects.all().exclude(alloted_budget=0) - designation = HoldsDesignation.objects.all().filter(working=request.user) - desig = list(HoldsDesignation.objects.all().filter(working = request.user).values_list('designation')) - b = [i for sub in desig for i in sub] - roll_=[] - for i in b : - name_ = get_object_or_404(Designation, id = i) - roll_.append(str(name_.name)) - - all_designation=[] - for i in designation: - all_designation.append(str(i.designation)) - HALL_NO = (('HALL-1','hall-1'),('HALL-3','hall-3'),('HALL-4','hall-4')) - hall=[] - hostel_file= hostel_allotment.objects.all() - for i in HALL_NO: - if(str(i[1]) not in [j.hall_no for j in hostel_file]): - hall.append(str(i[1])) - print(roll_) - context = {'meetingMinutes':minutes, - 'final_minutes':final_minutes, - 'hall': hall, - 'hall_allotment':hall_allotment, - 'budget_app':budget_app, - 'p_budget':past_budget, - 'clubNew':clubNew, - 'club':club, - 'budgets':budgets, - 'approved_budgets':approved_budgets, - 'budget_allotment':budget_allotment, - 'budget_alloted' : budget_alloted, - 'all_designation' : roll_, - } - return render(request, "officeModule/officeOfDeanStudents/officeOfDeanStudents.html", context) - -@login_required -def holdingMeeting(request): - title= request.POST.get('title') - date = request.POST.get('date') - Time = request.POST.get('time') - Venue = request.POST.get('venue') - Agenda = request.POST.get('Agenda') - p=Meeting(title=title,venue=Venue,date=date,time=Time,agenda=Agenda); - p.save() - return HttpResponse('ll') - -@login_required -def meetingMinutes(request): - file=request.FILES['minutes_file'] - id=request.POST.get('id') - b=Meeting.objects.get(pk=id) - b.minutes_file=file - b.save() - return HttpResponseRedirect('/office/officeOfDeanStudents') - -@login_required -def hostelRoomAllotment(request): - file=request.FILES['hostel_file'] - hall_no=request.POST.get('hall_no') - p=hostel_allotment(allotment_file=file,hall_no=hall_no) - p.save() - return HttpResponseRedirect('/office/officeOfDeanStudents') - -@login_required -def budgetApproval(request): - id_r=request.POST.getlist('check') - remark=request.POST.getlist('remark') - for i in range(len(id_r)): - a=Club_budget.objects.get(id=id_r[i]); - a.status='confirmed' - a.remarks=request.POST.get(id_r[i]) - budget= request.POST.get('amount '+ id_r[i]) - spentBudget=a.club.spent_budget - availBudget= a.club.avail_budget - b=Club_info.objects.get(club_name = a.club.club_name ) - b.spent_budget= (spentBudget+int(budget)) - b.avail_budget= (availBudget- int(budget)) - a.save() - b.save() - return HttpResponseRedirect('/office/officeOfDeanStudents') - -@login_required -def budgetRejection(request): - id_r=request.POST.getlist('check') - remark=request.POST.getlist('remark') - for i in range(len(id_r)): - a=Club_budget.objects.get(id=id_r[i]); - a.status='rejected' - a.remarks=request.POST.get(id_r[i]) - a.save() - return HttpResponseRedirect('/office/officeOfDeanStudents') - - -@login_required -def clubApproval(request): - id_r=request.POST.getlist('check') - for i in range(len(id_r)): - a=Club_info.objects.get(pk=id_r[i]) - co_ordinator= a.co_ordinator.id.user - co_co = a.co_coordinator.id.user - a.status='confirmed' - a.save() - designation = get_object_or_404(Designation, name="co-ordinator") - designation1 = get_object_or_404(Designation, name="co co-ordinator") - HoldsDesig= HoldsDesignation(user=co_ordinator,working=co_ordinator,designation=designation) - HoldsDesig.save() - HoldsDesig = HoldsDesignation( user= co_co, working= co_co, designation=designation1) - HoldsDesig.save() - return HttpResponseRedirect('/office/officeOfDeanStudents') - -@login_required -def clubRejection(request): - id_r=request.POST.getlist('check') - for i in range(len(id_r)): - a=Club_info.objects.get(pk=id_r[i]); - a.status='rejected' - a.save() - return HttpResponseRedirect('/office/officeOfDeanStudents') - -@login_required -def budgetAllot(request): - id_r=request.POST.get('id') - budget= request.POST.get('budget') - a= Club_info.objects.get(pk=id_r) - a.alloted_budget=int(budget) - a.avail_budget= int(budget) - a.save() - return HttpResponseRedirect('/office/officeOfDeanStudents') - -@login_required -def budgetAllotEdit(request): - id_r=request.POST.get('id') - budget= request.POST.get('budget') - a= Club_info.objects.get(pk=id_r) - a.alloted_budget=int(budget) - a.avail_budget= int(budget) - a.spent_budget= int(0) - a.save() - return HttpResponseRedirect('/office/officeOfDeanStudents') +from django.shortcuts import render , get_object_or_404 +from django.http import HttpResponse , HttpResponseRedirect +from applications.academic_information.models import Meeting +from .models import Constants,hostel_allotment,Budget +from applications.gymkhana.models import Club_budget,Club_info +from applications.globals.models import * +import json +from django.contrib.auth.decorators import login_required + +@login_required +def officeOfDeanStudents(request): + budget_app= Club_budget.objects.all().filter(status='open'); + past_budget=Club_budget.objects.all().exclude(status='open'); + minutes=Meeting.objects.all().filter(minutes_file=""); + final_minutes=Meeting.objects.all().exclude(minutes_file=""); + hall_allotment=hostel_allotment.objects.all() + clubNew= Club_info.objects.all().filter(status='open') + club =Club_info.objects.all().exclude(status='open') + budgets=Club_info.objects.all().filter(status='confirmed') + approved_budgets=Club_budget.objects.all().filter(status='confirmed') + budget_allotment= Club_info.objects.all().filter(status='confirmed' , alloted_budget=0) + budget_alloted = Club_info.objects.all().exclude(alloted_budget=0) + designation = HoldsDesignation.objects.all().filter(working=request.user) + desig = list(HoldsDesignation.objects.all().filter(working = request.user).values_list('designation')) + b = [i for sub in desig for i in sub] + roll_=[] + for i in b : + name_ = get_object_or_404(Designation, id = i) + roll_.append(str(name_.name)) + + all_designation=[] + for i in designation: + all_designation.append(str(i.designation)) + HALL_NO = (('HALL-1','hall-1'),('HALL-3','hall-3'),('HALL-4','hall-4')) + hall=[] + hostel_file= hostel_allotment.objects.all() + for i in HALL_NO: + if(str(i[1]) not in [j.hall_no for j in hostel_file]): + hall.append(str(i[1])) + print(roll_) + context = {'meetingMinutes':minutes, + 'final_minutes':final_minutes, + 'hall': hall, + 'hall_allotment':hall_allotment, + 'budget_app':budget_app, + 'p_budget':past_budget, + 'clubNew':clubNew, + 'club':club, + 'budgets':budgets, + 'approved_budgets':approved_budgets, + 'budget_allotment':budget_allotment, + 'budget_alloted' : budget_alloted, + 'all_designation' : roll_, + } + return render(request, "officeModule/officeOfDeanStudents/officeOfDeanStudents.html", context) + +@login_required +def holdingMeeting(request): + title= request.POST.get('title') + date = request.POST.get('date') + Time = request.POST.get('time') + Venue = request.POST.get('venue') + Agenda = request.POST.get('Agenda') + p=Meeting(title=title,venue=Venue,date=date,time=Time,agenda=Agenda); + p.save() + return HttpResponse('ll') + +@login_required +def meetingMinutes(request): + file=request.FILES['minutes_file'] + id=request.POST.get('id') + b=Meeting.objects.get(pk=id) + b.minutes_file=file + b.save() + return HttpResponseRedirect('/office/officeOfDeanStudents') + +@login_required +def hostelRoomAllotment(request): + file=request.FILES['hostel_file'] + hall_no=request.POST.get('hall_no') + p=hostel_allotment(allotment_file=file,hall_no=hall_no) + p.save() + return HttpResponseRedirect('/office/officeOfDeanStudents') + +@login_required +def budgetApproval(request): + id_r=request.POST.getlist('check') + remark=request.POST.getlist('remark') + for i in range(len(id_r)): + a=Club_budget.objects.get(id=id_r[i]); + a.status='confirmed' + a.remarks=request.POST.get(id_r[i]) + budget= request.POST.get('amount '+ id_r[i]) + spentBudget=a.club.spent_budget + availBudget= a.club.avail_budget + b=Club_info.objects.get(club_name = a.club.club_name ) + b.spent_budget= (spentBudget+int(budget)) + b.avail_budget= (availBudget- int(budget)) + a.save() + b.save() + return HttpResponseRedirect('/office/officeOfDeanStudents') + +@login_required +def budgetRejection(request): + id_r=request.POST.getlist('check') + remark=request.POST.getlist('remark') + for i in range(len(id_r)): + a=Club_budget.objects.get(id=id_r[i]); + a.status='rejected' + a.remarks=request.POST.get(id_r[i]) + a.save() + return HttpResponseRedirect('/office/officeOfDeanStudents') + + +@login_required +def clubApproval(request): + id_r=request.POST.getlist('check') + for i in range(len(id_r)): + a=Club_info.objects.get(pk=id_r[i]) + co_ordinator= a.co_ordinator.id.user + co_co = a.co_coordinator.id.user + a.status='confirmed' + a.save() + designation = get_object_or_404(Designation, name="co-ordinator") + designation1 = get_object_or_404(Designation, name="co co-ordinator") + HoldsDesig= HoldsDesignation(user=co_ordinator,working=co_ordinator,designation=designation) + HoldsDesig.save() + HoldsDesig = HoldsDesignation( user= co_co, working= co_co, designation=designation1) + HoldsDesig.save() + return HttpResponseRedirect('/office/officeOfDeanStudents') + +@login_required +def clubRejection(request): + id_r=request.POST.getlist('check') + for i in range(len(id_r)): + a=Club_info.objects.get(pk=id_r[i]); + a.status='rejected' + a.save() + return HttpResponseRedirect('/office/officeOfDeanStudents') + +@login_required +def budgetAllot(request): + id_r=request.POST.get('id') + budget= request.POST.get('budget') + a= Club_info.objects.get(pk=id_r) + a.alloted_budget=int(budget) + a.avail_budget= int(budget) + a.save() + return HttpResponseRedirect('/office/officeOfDeanStudents') + +@login_required +def budgetAllotEdit(request): + id_r=request.POST.get('id') + budget= request.POST.get('budget') + a= Club_info.objects.get(pk=id_r) + a.alloted_budget=int(budget) + a.avail_budget= int(budget) + a.spent_budget= int(0) + a.save() + return HttpResponseRedirect('/office/officeOfDeanStudents') diff --git a/FusionIIIT/templates/officeModule/officeOfHOD/alerts.html b/FusionIIIT/templates/officeModule/officeOfHOD/alerts.html index 14d5a581b..73938e8ee 100644 --- a/FusionIIIT/templates/officeModule/officeOfHOD/alerts.html +++ b/FusionIIIT/templates/officeModule/officeOfHOD/alerts.html @@ -1,7 +1,7 @@ {% load static %} {% block alerts %} -
+
{% comment %}A single card starts here!{% endcomment %}
diff --git a/FusionIIIT/templates/officeModule/officeOfHOD/officeOfHOD.html b/FusionIIIT/templates/officeModule/officeOfHOD/officeOfHOD.html index 9a1a96aac..03a73af90 100644 --- a/FusionIIIT/templates/officeModule/officeOfHOD/officeOfHOD.html +++ b/FusionIIIT/templates/officeModule/officeOfHOD/officeOfHOD.html @@ -40,10 +40,10 @@ {% comment %}The Tab-Menu ends here!{% endcomment %} @@ -69,17 +80,17 @@ The central-rail segment starts here! {% endcomment %}
- + {% comment %}The Publications starts here!{% endcomment %}
{% block form2 %} - {% include 'officeModule/officeOfHOD/tab2.html' %} + {% include 'officeModule/officeOfHOD/tab5.html' %} {% endblock %}
{% comment %}The Publications ends here!{% endcomment %} - - + + {% comment %}The Publications starts here!{% endcomment %}
{% block form3 %} @@ -88,7 +99,7 @@
{% comment %}The Publications ends here!{% endcomment %} - + {% comment %}The Publications starts here!{% endcomment %}
{% block form4 %} @@ -98,6 +109,20 @@
{% comment %}The Publications ends here!{% endcomment %} + {% comment %}The test starts here!{% endcomment %} +
+ {% block form5 %} + {% include 'officeModule/officeOfHOD/tab2.html' %} + {% endblock %} + +
+ {% comment %}The test ends here!{% endcomment %} +
+ {% block form6 %} + {% include 'officeModule/officeOfHOD/tab1.html' %} + {% endblock %} + +
{% comment %}The central-rail segment ends here!{% endcomment %} @@ -106,14 +131,9 @@
-

- Office of HOD -

-
-
@@ -122,7 +142,7 @@

Loading ...

-
+
{% block alerts %} {% include 'officeModule/officeOfHOD/alerts.html' %} {% endblock %} @@ -165,4 +185,4 @@

} -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/FusionIIIT/templates/officeModule/officeOfHOD/tab1.html b/FusionIIIT/templates/officeModule/officeOfHOD/tab1.html index f6ec65913..10b95ab61 100644 --- a/FusionIIIT/templates/officeModule/officeOfHOD/tab1.html +++ b/FusionIIIT/templates/officeModule/officeOfHOD/tab1.html @@ -1,29 +1,53 @@ -{% block tab1 %} - - {% comment %}The tab menu starts here!{% endcomment %} - - -
-
- {% block tab1content1 %} - {% include 'officeModule/officeOfHOD/tab1content1.html' %} - {% endblock %} -
-
- -
-
- {% block tab1content2 %} - {% include 'officeModule/officeOfHOD/tab1content2.html' %} - {% endblock %} -
-
-{% endblock tab1 %} \ No newline at end of file +{% block tab1 %} + + {% comment %}The tab menu starts here!{% endcomment %} + + + +
+
+ {% block tab1content1 %} + {% include 'officeModule/officeOfHOD/tab1content1.html' %} + {% endblock %} +
+
+ +
+
+ {% block tab1content2 %} + {% include 'officeModule/officeOfHOD/tab1content2.html' %} + {% endblock %} +
+
+
+
+ {% block tab1content3 %} + {% include 'officeModule/officeOfHOD/tab1content3.html' %} + {% endblock %} +
+
+
+
+ {% block tab1content4 %} + {% include 'officeModule/officeOfHOD/tab1content4.html' %} + {% endblock %} +
+
+ +{% endblock tab1 %} diff --git a/FusionIIIT/templates/officeModule/officeOfHOD/tab1content1.html b/FusionIIIT/templates/officeModule/officeOfHOD/tab1content1.html index 68e1e7a02..210cb5eeb 100644 --- a/FusionIIIT/templates/officeModule/officeOfHOD/tab1content1.html +++ b/FusionIIIT/templates/officeModule/officeOfHOD/tab1content1.html @@ -1,55 +1,55 @@ -
- {% comment %}The add a new skill Accordian starts here!{% endcomment %} -
- -
-
- - -
-
- -
-
- - -
- -
- - -
- -
- - -
-
- -
- - -
- -
- - -
- -
- -
-
-
- -
-
+
+ {% comment %}The add a new skill Accordian starts here!{% endcomment %} +
+ +
+
+ + +
+
+ +
+
+ + +
+ +
+ + +
+ +
+ + +
+
+ +
+ + +
+ +
+ + +
+ +
+ +
+
+
+ +
+
\ No newline at end of file diff --git a/FusionIIIT/templates/officeModule/officeOfHOD/tab1content2.html b/FusionIIIT/templates/officeModule/officeOfHOD/tab1content2.html index 932572119..7f537f36a 100644 --- a/FusionIIIT/templates/officeModule/officeOfHOD/tab1content2.html +++ b/FusionIIIT/templates/officeModule/officeOfHOD/tab1content2.html @@ -1,10 +1,59 @@ - - - - - Title - - - - - \ No newline at end of file +
+ + {% comment %}The add a new skill Accordian starts here!{% endcomment %} +
+
Auto Fare Claim Form
+
+
+
+
+ + +
+ +
+ + +
+
+ + +
+
+ + +
+ +
+ + +
+ +
+ + +
+
+ +
+ + +
+ +
+ + +
+ + +
+ +
+
+
+ +
+
+
diff --git a/FusionIIIT/templates/officeModule/officeOfHOD/tab1content3.html b/FusionIIIT/templates/officeModule/officeOfHOD/tab1content3.html new file mode 100644 index 000000000..dc29e94cf --- /dev/null +++ b/FusionIIIT/templates/officeModule/officeOfHOD/tab1content3.html @@ -0,0 +1,118 @@ +
+ + {% comment %}The add a new skill Accordian starts here!{% endcomment %} +
+
Application for grant of LTC
+
+
+
+
+ + +
+ +
+ + +
+ +
+ + +
+
+ + +
+
+ + +
+ +
+ + +
+ +
+ + +
+
+ +
+
+ + +
+ +
+ + +
+
+
+ Duration +
+
+
+ +
+
+ + +
+
+
+ +
+ +
+
+ + +
+
+
+
+ +
+ + +
+ +
+ + +
+ +
+
+ + +
+ +
+ + +
+
+ + +
+ +
+
+
+ +
+
+
\ No newline at end of file diff --git a/FusionIIIT/templates/officeModule/officeOfHOD/tab1content4.html b/FusionIIIT/templates/officeModule/officeOfHOD/tab1content4.html new file mode 100644 index 000000000..4b9f630c1 --- /dev/null +++ b/FusionIIIT/templates/officeModule/officeOfHOD/tab1content4.html @@ -0,0 +1,149 @@ +
+ + {% comment %}The add a new skill Accordian starts here!{% endcomment %} + +
+ +
+ + +
+ +
+ Work +
+ +
+
+ +
+
+ + +
+
+
+ +
+ +
+
+ + +
+
+
+
+

+
+
Approval of Extra Duty for Claiming Compensatory Off
+
+ +
+
+ + +
+ +
+ + +
+ +
+ +
+
+ + +
+ +
+ + +
+
+ +
+ + +
+ +
+ + +
+

+ +
+
Details of actual days and time of work
+
+ +
+
+ + +
+ +
+ + +
+ +
+ +
+
+ + +
+ +
+ + +
+ +
+ + +
+
+
+ Time to do assigned work +
+
+
+ + +
+ +
+ + +
+
+ + +
+ +
+
+
+ +
+
+
\ No newline at end of file diff --git a/FusionIIIT/templates/officeModule/officeOfHOD/tab1content5.html b/FusionIIIT/templates/officeModule/officeOfHOD/tab1content5.html new file mode 100644 index 000000000..e69de29bb diff --git a/FusionIIIT/templates/officeModule/officeOfHOD/tab2.html b/FusionIIIT/templates/officeModule/officeOfHOD/tab2.html index de69b9a9d..cf0971c77 100644 --- a/FusionIIIT/templates/officeModule/officeOfHOD/tab2.html +++ b/FusionIIIT/templates/officeModule/officeOfHOD/tab2.html @@ -6,14 +6,17 @@ CSE - + ECE - - + + ME - + + Lab details + +

@@ -23,6 +26,27 @@ {% endblock %}
+
+
+ {% block tab2content2 %} + {% include 'officeModule/officeOfHOD/tab2content2.html' %} + {% endblock %} +
+
+
+
+ {% block tab2content3 %} + {% include 'officeModule/officeOfHOD/tab2content3.html' %} + {% endblock %} +
+
+
+
+ {% block tab2content4 %} + {% include 'officeModule/officeOfHOD/tab2content4.html' %} + {% endblock %} +
+
+ - -{% endblock tab2 %} \ No newline at end of file +{% endblock tab2 %} diff --git a/FusionIIIT/templates/officeModule/officeOfHOD/tab2content2.html b/FusionIIIT/templates/officeModule/officeOfHOD/tab2content2.html new file mode 100644 index 000000000..c6dd72ccd --- /dev/null +++ b/FusionIIIT/templates/officeModule/officeOfHOD/tab2content2.html @@ -0,0 +1,92 @@ +
+ + {% comment %}The add a new skill Accordian starts here!{% endcomment %} +
+
ECE lab
+
+
+
+ + {% if request.user.extrainfo.user == 'vkgupta' %} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
9:00-10:0010:00-11:0011:00-12:0012:00-01:0002:30-03:3003:30-04:3004:30-05:30
Monday
Tuesday
Wednesday
Thursday
Friday
+ {% endif %} +
+ +
+ +
diff --git a/FusionIIIT/templates/officeModule/officeOfHOD/tab2content3.html b/FusionIIIT/templates/officeModule/officeOfHOD/tab2content3.html new file mode 100644 index 000000000..7d126a2df --- /dev/null +++ b/FusionIIIT/templates/officeModule/officeOfHOD/tab2content3.html @@ -0,0 +1,174 @@ +
+ + {% comment %}The add a new skill Accordian starts here!{% endcomment %} +
+
ME LAB
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
9:00-10:0010:00-11:0011:00-12:0012:00-01:0002:30-03:3003:30-04:3004:30-05:30
Monday
Tuesday
Wednesday
Thursday
Friday
+
+ + +
+
Mechatronics lab
+
+ +
+ {% if request.user.extrainfo.user == 'vkgupta' %} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
9:00-10:0010:00-11:0011:00-12:0012:00-01:0002:30-03:3003:30-04:3004:30-05:30
Monday
Tuesday
Wednesday
Thursday
Friday
+ {% endif %} +
+
+ +
diff --git a/FusionIIIT/templates/officeModule/officeOfHOD/tab2content4.html b/FusionIIIT/templates/officeModule/officeOfHOD/tab2content4.html new file mode 100644 index 000000000..46b32f19b --- /dev/null +++ b/FusionIIIT/templates/officeModule/officeOfHOD/tab2content4.html @@ -0,0 +1,68 @@ +{% block tab5 %} + +

LAB FORM

+ +
+ {% comment %}The add a new skill Accordian starts here!{% endcomment %} +
+ {% csrf_token %} + +
+
+ + +
+ +
+ + +
+ +
+ +
+
+ + + +
+ +
+ +
+
+ + > +
+
+
+ +
+ +
+
+ + > +
+
+
+ +
+ +
+ +
+ +
+
+ +{% endblock tab5 %} diff --git a/FusionIIIT/templates/officeModule/officeOfHOD/tab3content1.html b/FusionIIIT/templates/officeModule/officeOfHOD/tab3content1.html index c00b2448a..2ca9841b5 100644 --- a/FusionIIIT/templates/officeModule/officeOfHOD/tab3content1.html +++ b/FusionIIIT/templates/officeModule/officeOfHOD/tab3content1.html @@ -1,21 +1,45 @@ -
+ {% comment %}The add a new skill Accordian starts here!{% endcomment %} - +
- + {% csrf_token %}
- - - - - + {% for obj1 in lab %} + + {% endfor %} + + + {% comment %} try this again + {% with lname=obj1.lab_name %}{% endwith %} + + {% endcomment %} + +
- - + + + +
+ + +
+ +
+ + +
+ +

{% for obj1 in lab %} + + {% endfor %} +

+ +
Date and Time
@@ -25,17 +49,17 @@
- +
- +
- +
@@ -51,4 +75,4 @@

-
\ No newline at end of file +
diff --git a/FusionIIIT/templates/officeModule/officeOfHOD/tab4content1.html b/FusionIIIT/templates/officeModule/officeOfHOD/tab4content1.html index ca5b407f1..d8890847a 100644 --- a/FusionIIIT/templates/officeModule/officeOfHOD/tab4content1.html +++ b/FusionIIIT/templates/officeModule/officeOfHOD/tab4content1.html @@ -1,10 +1,11 @@ {% block tab4content1 %} {% for obj in pro %} + {% csrf_token %} {% comment %}The add a new skill Accordian starts here!{% endcomment %}
- {% csrf_token %} - + +
@@ -15,7 +16,7 @@
- +
@@ -26,27 +27,27 @@
- +
- +
- +
- +
- +
- +
- +
- +

-{% endfor %} +{% endfor %} {% endblock %} diff --git a/FusionIIIT/templates/officeModule/officeOfHOD/tab4content2.html b/FusionIIIT/templates/officeModule/officeOfHOD/tab4content2.html index 20ae8ebf3..926178f0f 100644 --- a/FusionIIIT/templates/officeModule/officeOfHOD/tab4content2.html +++ b/FusionIIIT/templates/officeModule/officeOfHOD/tab4content2.html @@ -14,13 +14,13 @@ {% for obj1 in pro1 %} - - + + {% endfor %} - +

@@ -28,4 +28,3 @@ {% endblock %} - \ No newline at end of file diff --git a/FusionIIIT/templates/officeModule/officeOfHOD/tab4content3.html b/FusionIIIT/templates/officeModule/officeOfHOD/tab4content3.html index 185d183f5..78996483e 100644 --- a/FusionIIIT/templates/officeModule/officeOfHOD/tab4content3.html +++ b/FusionIIIT/templates/officeModule/officeOfHOD/tab4content3.html @@ -4,7 +4,7 @@

Teaching Credits Application Form



{% comment %}The add a new skill Accordian starts here!{% endcomment %}
{% csrf_token %} - +
@@ -15,9 +15,9 @@

Teaching Credits Application Form



- +
- +
@@ -36,14 +36,14 @@

Teaching Credits Application Form



- +
- +
- + @@ -53,8 +53,8 @@

Teaching Credits Application Form



- + @@ -64,8 +64,8 @@

Teaching Credits Application Form



- + @@ -75,8 +75,11 @@

Teaching Credits Application Form



+ + +
-
@@ -87,14 +90,29 @@

Teaching Credits Application Form




- {% endblock %} \ No newline at end of file + {% endblock %} diff --git a/FusionIIIT/templates/officeModule/officeOfHOD/tab5.html b/FusionIIIT/templates/officeModule/officeOfHOD/tab5.html new file mode 100644 index 000000000..8286ca49b --- /dev/null +++ b/FusionIIIT/templates/officeModule/officeOfHOD/tab5.html @@ -0,0 +1,7 @@ +{% block tab5 %} + + +hello + + +{% endblock tab5 %} diff --git a/FusionIIIT/templates/officeModule/officeOfHOD/tab5content1.html b/FusionIIIT/templates/officeModule/officeOfHOD/tab5content1.html new file mode 100644 index 000000000..8f02e2da6 --- /dev/null +++ b/FusionIIIT/templates/officeModule/officeOfHOD/tab5content1.html @@ -0,0 +1,100 @@ +{% block tab4content3 %} +

New Tab



+
+ {% comment %}The add a new skill Accordian starts here!{% endcomment %} +
+ {% csrf_token %} + +
+
+ + +
+ +
+ + +
+ +
+ +
+
+ + +
+ +
+ + +
+ +
+ +
+
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ +
+ +
+
+
+ +
+
+
+ + + {% endblock %} diff --git a/FusionIIIT/templates/officeModule/officeOfHOD/work/tab1content3.html b/FusionIIIT/templates/officeModule/officeOfHOD/work/tab1content3.html index df64417c1..7f537f36a 100644 --- a/FusionIIIT/templates/officeModule/officeOfHOD/work/tab1content3.html +++ b/FusionIIIT/templates/officeModule/officeOfHOD/work/tab1content3.html @@ -16,7 +16,7 @@
- +
@@ -34,12 +34,12 @@
- +
- +
@@ -56,4 +56,4 @@

-
\ No newline at end of file +