From 1a104b31085005ec496be310acd6608c52590228 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 26 Nov 2021 23:20:53 +0530 Subject: [PATCH 1/2] Add new degree for BS-MS --- constants/degrees.py | 7 ++++++- migrations/0006_alter_degree_code.py | 18 ++++++++++++++++++ utils/rights.py | 2 +- 3 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 migrations/0006_alter_degree_code.py diff --git a/constants/degrees.py b/constants/degrees.py index 1e96be3..36853dd 100644 --- a/constants/degrees.py +++ b/constants/degrees.py @@ -9,6 +9,7 @@ BACHELOR_OF_ARCHITECTURE = 'barch' INTEGRATED_MASTER_OF_SCIENCE = 'imsc' INTEGRATED_MASTER_OF_TECHNOLOGY = 'imt' +BACHELOR_OF_SCIENCE_MASTER_OF_SCIENCE = 'bsms' GRADUATE_DEGREES = ( ( BACHELOR_OF_TECHNOLOGY, @@ -34,6 +35,10 @@ INTEGRATED_MASTER_OF_TECHNOLOGY, 'Int. M.Tech - Integrated Master of Technology', ), + ( + BACHELOR_OF_SCIENCE_MASTER_OF_SCIENCE, + 'BS-MS - Bachelor of Science - Master of Science', + ), ) # Postgraduate degrees @@ -98,4 +103,4 @@ + POSTGRADUATE_DEGREES + DOCTORATE_DEGREES + POSTDOCTORATE_DEGREES -) + ) diff --git a/migrations/0006_alter_degree_code.py b/migrations/0006_alter_degree_code.py new file mode 100644 index 0000000..90ff7e2 --- /dev/null +++ b/migrations/0006_alter_degree_code.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.8 on 2021-11-26 15:44 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('shell', '0005_auto_20200110_1922'), + ] + + operations = [ + migrations.AlterField( + model_name='degree', + name='code', + field=models.CharField(choices=[('btech', 'B.Tech. - Bachelor of Technology'), ('idd', 'Int. M.Tech. - Integrated Dual Degree'), ('bsc', 'B.Sc. - Bachelor of Science'), ('barch', 'B.Arch. - Bachelor of Architecture'), ('imsc', 'Int. M.Sc. - Integrated Master of Science'), ('imt', 'Int. M.Tech - Integrated Master of Technology'), ('bsms', 'BS-MS - Bachelor of Science - Master of Science'), ('mtech', 'M.Tech. - Master of Technology'), ('msc', 'M.Sc. - Master of Science'), ('march', 'M.Arch. - Master of Architecture'), ('murp', 'M.U.R.P - Master of Urban and Regional Planning'), ('pgdip', 'P.G. Dip. - Post-graduate Diploma'), ('mba', 'M.B.A. - Master of Business Administration'), ('mca', 'M.C.A. - Master of Computer Applications'), ('phd', 'Ph.D. - Doctor of Philosophy'), ('pdoc', 'Post Doc. - Post-doctorate')], max_length=7, unique=True), + ), + ] diff --git a/utils/rights.py b/utils/rights.py index 91e7de8..a1f1d8c 100644 --- a/utils/rights.py +++ b/utils/rights.py @@ -70,4 +70,4 @@ def has_helpcentre_rights(user): :return: True if the user has privileges, False otherwise """ - return get_rights_for_semester(semester_no=4, user=user) + return get_rights_for_semester(semester_no=4, user=user, right_if_not_student=True) From 2dbbc0c2af9847eb92a3f9c877e29a05579c09eb Mon Sep 17 00:00:00 2001 From: root Date: Fri, 26 Nov 2021 23:56:02 +0530 Subject: [PATCH 2/2] Add new degrees, centres and departments --- constants/centres.py | 10 ++++++++++ constants/degrees.py | 8 +++++++- constants/departments.py | 5 +++++ migrations/0007_auto_20211126_2353.py | 28 +++++++++++++++++++++++++++ 4 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 migrations/0007_auto_20211126_2353.py diff --git a/constants/centres.py b/constants/centres.py index cf02943..8b541de 100644 --- a/constants/centres.py +++ b/constants/centres.py @@ -5,6 +5,8 @@ # Academic centres ALTERNATE_HYDRO_ENERGY_CENTRE = 'ahec' CENTRE_FOR_NANOTECHNOLOGY = 'cnt' +CENTRE_FOR_ARITFICIAL_INTELLIGENCE_AND_DATA_SCIENCE = 'caids' +CONTINUING_EDUCATION_CENTRE_AND_QIP_CENTRE = 'cecqc' ACADEMIC_CENTRES = ( ( @@ -15,6 +17,14 @@ CENTRE_FOR_NANOTECHNOLOGY, 'Centre for Nanotechnology' ), + ( + CENTRE_FOR_ARITFICIAL_INTELLIGENCE_AND_DATA_SCIENCE, + 'Centre for Aritificial Intelligence and Data Science' + ), + ( + CONTINUING_EDUCATION_CENTRE_AND_QIP_CENTRE, + 'Continuing Education Centre and QIP Centre' + ) ) # Centres of excellence diff --git a/constants/degrees.py b/constants/degrees.py index 36853dd..9107f04 100644 --- a/constants/degrees.py +++ b/constants/degrees.py @@ -49,6 +49,8 @@ POSTGRADUATE_DIPLOMA_COURSE = 'pgdip' MASTER_OF_BUSINESS_ADMINISTRATION = 'mba' MASTER_OF_COMPUTER_APPLICATIONS = 'mca' +MASTER_OF_DESIGN = 'mdes' + POSTGRADUATE_DEGREES = ( ( MASTER_OF_TECHNOLOGY, @@ -78,6 +80,10 @@ MASTER_OF_COMPUTER_APPLICATIONS, 'M.C.A. - Master of Computer Applications', ), + ( + MASTER_OF_DESIGN, + 'Master of Design', + ) ) # Doctorate degrees @@ -103,4 +109,4 @@ + POSTGRADUATE_DEGREES + DOCTORATE_DEGREES + POSTDOCTORATE_DEGREES - ) +) diff --git a/constants/departments.py b/constants/departments.py index 39906cc..773c407 100644 --- a/constants/departments.py +++ b/constants/departments.py @@ -12,6 +12,7 @@ CHEMISTRY_DEPARTMENT = 'cyd' CIVIL_ENGINEERING_DEPARTMENT = 'ced' COMPUTER_SCIENCE_AND_ENGINEERING_DEPARTMENT = 'csed' +DEPARTMENT_OF_DESIGN = 'dd' EARTH_SCIENCES_DEPARTMENT = 'esd' EARTHQUAKE_DEPARTMENT = 'eqd' ELECTRICAL_ENGINEERING_DEPARTMENT = 'eed' @@ -58,6 +59,10 @@ COMPUTER_SCIENCE_AND_ENGINEERING_DEPARTMENT, 'Computer Science and Engineering Department' ), + ( + DEPARTMENT_OF_DESIGN, + 'Department of Design' + ), ( EARTH_SCIENCES_DEPARTMENT, 'Earth Sciences Department' diff --git a/migrations/0007_auto_20211126_2353.py b/migrations/0007_auto_20211126_2353.py new file mode 100644 index 0000000..b6d2ea7 --- /dev/null +++ b/migrations/0007_auto_20211126_2353.py @@ -0,0 +1,28 @@ +# Generated by Django 3.2.8 on 2021-11-26 18:23 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('shell', '0006_alter_degree_code'), + ] + + operations = [ + migrations.AlterField( + model_name='centre', + name='code', + field=models.CharField(choices=[('ahec', 'Alternate Hydro Energy Centre'), ('cnt', 'Centre for Nanotechnology'), ('caids', 'Centre for Aritificial Intelligence and Data Science'), ('cecqc', 'Continuing Education Centre and QIP Centre'), ('cedmm', 'Centre of Excellence in Disaster Mitigation and Management'), ('cts', 'Centre for Transportation Systems'), ('chs', 'Centre for Himalayan Studies'), ('ceudm', 'Centre of Excellence in Urban Design and Management'), ('mgcl', 'Mahatma Gandhi Central Library'), ('cec', 'Continuing Education Centre'), ('icc', 'Institute Computer Centre'), ('iic', 'Institute Instrumentation Centre'), ('iprc', 'Intellectual Property Rights Cell'), ('etc', 'Education Technology Cell'), ('ih', 'Institute Hospital'), ('tides', 'Tides Incubation Centre')], max_length=7, unique=True), + ), + migrations.AlterField( + model_name='degree', + name='code', + field=models.CharField(choices=[('btech', 'B.Tech. - Bachelor of Technology'), ('idd', 'Int. M.Tech. - Integrated Dual Degree'), ('bsc', 'B.Sc. - Bachelor of Science'), ('barch', 'B.Arch. - Bachelor of Architecture'), ('imsc', 'Int. M.Sc. - Integrated Master of Science'), ('imt', 'Int. M.Tech - Integrated Master of Technology'), ('bsms', 'BS-MS - Bachelor of Science - Master of Science'), ('mtech', 'M.Tech. - Master of Technology'), ('msc', 'M.Sc. - Master of Science'), ('march', 'M.Arch. - Master of Architecture'), ('murp', 'M.U.R.P - Master of Urban and Regional Planning'), ('pgdip', 'P.G. Dip. - Post-graduate Diploma'), ('mba', 'M.B.A. - Master of Business Administration'), ('mca', 'M.C.A. - Master of Computer Applications'), ('mdes', 'Master of Design'), ('phd', 'Ph.D. - Doctor of Philosophy'), ('pdoc', 'Post Doc. - Post-doctorate')], max_length=7, unique=True), + ), + migrations.AlterField( + model_name='department', + name='code', + field=models.CharField(choices=[('ased', 'Applied Science and Engineering Department'), ('arcd', 'Architecture and Planning Department'), ('btd', 'Biotechnology Department'), ('ched', 'Chemical Engineering Department'), ('cyd', 'Chemistry Department'), ('ced', 'Civil Engineering Department'), ('csed', 'Computer Science and Engineering Department'), ('dd', 'Department of Design'), ('esd', 'Earth Sciences Department'), ('eqd', 'Earthquake Department'), ('eed', 'Electrical Engineering Department'), ('eced', 'Electronics and Communication Engineering Department'), ('hsd', 'Humanities and Social Sciences Department'), ('hyd', 'Hydrology Department'), ('hred', 'Hydro and Renewable Energy Department'), ('msd', 'Management Studies Department'), ('mad', 'Mathematics Department'), ('mied', 'Mechanical and Industrial Engineering Department'), ('mmed', 'Metallurgical and Materials Engineering Department'), ('ptd', 'Paper Technology Department'), ('phd', 'Physics Department'), ('pped', 'Polymer and Process Engineering Department'), ('wrdmd', 'Water Resources Development and Management Department'), ('qip', 'Quality Improvement Programme')], max_length=7, unique=True), + ), + ]