Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create new degrees, departments & centres #15

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 10 additions & 0 deletions constants/centres.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = (
(
Expand All @@ -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
Expand Down
11 changes: 11 additions & 0 deletions constants/degrees.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand All @@ -44,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,
Expand Down Expand Up @@ -73,6 +80,10 @@
MASTER_OF_COMPUTER_APPLICATIONS,
'M.C.A. - Master of Computer Applications',
),
(
MASTER_OF_DESIGN,
'Master of Design',
)
)

# Doctorate degrees
Expand Down
5 changes: 5 additions & 0 deletions constants/departments.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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'
Expand Down
18 changes: 18 additions & 0 deletions migrations/0006_alter_degree_code.py
Original file line number Diff line number Diff line change
@@ -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),
),
]
28 changes: 28 additions & 0 deletions migrations/0007_auto_20211126_2353.py
Original file line number Diff line number Diff line change
@@ -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),
),
]
2 changes: 1 addition & 1 deletion utils/rights.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)