Repository: dotkom/onlineweb4

Issue:
Update field of study names
NTNU has seemingly updated the field of study options (read: http://www.ntnu.no/studier/mit/oppbygging/), but the changes don't seem to be consistent on NTNU's site.
We should probably edit the "Dette arrangementet er åpent for" groups on events to reflect the changes. The change itself should be easy, merely change FIELD_OF_STUDY_CHOICES in apps/authentication/models.py. 
The actual question boils down to whether or not we should change our site when it seems like NTNU hasn't fully committed to the change themselves.



Discussion:
As far as I know these are the actual new names. They might just not have propagated through the whole site. Just go ahead and fix it. 

While these seem to be the new names, should we still be using the small tags for the fields of study? Last time I updated this we pulled them from a table where they might as well just be abbreviations. Abbreviations, mind you, that I've never seen nor heard anyone use. I see the value in keeping BIT for the bachelor's degree, because that code actually means something outside of our system. We don't use these codes for anything else, and seeing as it took me half an eternity to find last time, I'm assuming that NTNU proper doesn't use it either. 

TL:DR; Followup question is if I should just remove the abbreviations/"codes" for the fields.

Where in the code is this? 

FIELD_OF_STUDY_CHOICES in apps/authentication/models.py, as mentioned in the original post.

Ah, right. All fields of study has a "emnekode" so just find the corresponding codes for the new names. 

The closest I can find are these: 
- Programvaresystemer (8565)
- Databaser og søk (8562)
- Kunstig intelligens (8564)
- Interaksjonsdesign, spill- og læringsteknologi (–)

from https://www.ntnu.no/studier/mit/opptak , but again I am not sure that those codes would benefit anyone. Also, it doesn't have a code for the new field. "MIT" covers all those fields, I can't find any indication that the specific field has its own "studieprogramkode". I'd figure that the "emnekode" as you called it would only apply to "emner", such as TDT4100. 

Edit: Also, those aren't consistent with what we use for the older programs such as "Spillteknologi", which I at this point am convinced are mere abbreviations. We ran into the trouble of finding these codes last time we went on this rodeo.

@hernil are the above the "emnekode" you want? Doesn't seem like the individual fields have a meaningful code that would have any benefit of being on the site. If it's this hard to find, then I'm not sure if the end user will know the code, or have any use of it. Even at an administrative level, have we ever handled the groups separately for arrangements (rule bundles?), or are they all slumped together as master students regardless? 

You're correct. Seems there's no such thing anymore. Just go ahead and remove them! 

Silly me, forgot to do what I originally intended to do (adding the new field of study). Will fix momentarily.


Resolving patch:
diff --git a/apps/authentication/migrations/0022_auto_20160714_1347.py b/apps/authentication/migrations/0022_auto_20160714_1347.py
new file mode 100644
--- /dev/null
+++ b/apps/authentication/migrations/0022_auto_20160714_1347.py
@@ -0,0 +1,20 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.9.7 on 2016-07-14 11:47
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('authentication', '0021_auto_20160331_0940'),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name='onlineuser',
+            name='field_of_study',
+            field=models.SmallIntegerField(choices=[(0, 'Gjest'), (1, 'Bachelor i Informatikk'), (10, 'Programvaresystemer'), (11, 'Databaser og søk'), (12, 'Algoritmer og datamaskiner'), (13, 'Spillteknologi'), (14, 'Kunstig intelligens'), (15, 'Helseinformatikk'), (16, 'Interaksjonsdesign, spill- og læringsteknologi'), (30, 'Annen mastergrad'), (80, 'PhD'), (90, 'International'), (100, 'Annet Onlinemedlem')], default=0, verbose_name='studieretning'),
+        ),
+    ]
diff --git a/apps/authentication/models.py b/apps/authentication/models.py
--- a/apps/authentication/models.py
+++ b/apps/authentication/models.py
@@ -24,6 +24,7 @@
     (13, _('Spillteknologi')),
     (14, _('Kunstig intelligens')),
     (15, _('Helseinformatikk')),
+    (16, _('Interaksjonsdesign, spill- og læringsteknologi')),
     (30, _('Annen mastergrad')),
     (80, _('PhD')),
     (90, _('International')),


Test patch: