Repository: kartoza/prj.app

Issue:
Course Language
Since QGIS is a multinational, multilingual effort, the certification program would allow courses in other languages besides English. 

![course](https://user-images.githubusercontent.com/24369355/29557962-59872d9e-8733-11e7-8d08-8ff71decd995.png)



Discussion:

Resolving patch:
diff --git a/django_project/certification/forms.py b/django_project/certification/forms.py
--- a/django_project/certification/forms.py
+++ b/django_project/certification/forms.py
@@ -272,6 +272,7 @@ class Meta:
             'course_type',
             'course_convener',
             'training_center',
+            'language',
             'start_date',
             'end_date',
             'template_certificate',
@@ -290,6 +291,7 @@ def __init__(self, *args, **kwargs):
                 Field('course_convener',
                       css_class='form-control chosen-select'),
                 Field('training_center', css_class='form-control'),
+                Field('language', css_class='form-control'),
                 Field('start_date', css_class='form-control'),
                 Field('end_date', css_class='form-control'),
                 Field('template_certificate', css_class='form-control'),
diff --git a/django_project/certification/migrations/0016_course_language.py b/django_project/certification/migrations/0016_course_language.py
new file mode 100644
--- /dev/null
+++ b/django_project/certification/migrations/0016_course_language.py
@@ -0,0 +1,19 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('certification', '0015_auto_20180207_1243'),
+    ]
+
+    operations = [
+        migrations.AddField(
+            model_name='course',
+            name='language',
+            field=models.CharField(default='English', max_length=200, null=True, help_text='A language that the Course will be conducted in, e.g. English.', blank=True),
+        ),
+    ]
diff --git a/django_project/certification/models/course.py b/django_project/certification/models/course.py
--- a/django_project/certification/models/course.py
+++ b/django_project/certification/models/course.py
@@ -32,6 +32,15 @@ class Course(models.Model):
         blank=True,
     )
 
+    language = models.CharField(
+        help_text=_(
+            'A language that the Course will be conducted in, e.g. English.'),
+        max_length=200,
+        default=_('English'),
+        null=True,
+        blank=True,
+    )
+
     start_date = models.DateField(
         _('Start date'),
         help_text=_('Course start date'),


Test patch:
diff --git a/django_project/certification/tests/model_factories.py b/django_project/certification/tests/model_factories.py
--- a/django_project/certification/tests/model_factories.py
+++ b/django_project/certification/tests/model_factories.py
@@ -76,6 +76,8 @@ class Meta:
         model = Course
 
     name = factory.sequence(lambda n: u'Test course name %s' % n)
+    language = factory.sequence(
+        lambda n: u'Test course language %s' % n)
     course_convener = factory.SubFactory(CourseConvenerF)
     certifying_organisation = factory.SubFactory(CertifyingOrganisationF)
     course_type = factory.SubFactory(CourseTypeF)
diff --git a/django_project/certification/tests/test_models.py b/django_project/certification/tests/test_models.py
--- a/django_project/certification/tests/test_models.py
+++ b/django_project/certification/tests/test_models.py
@@ -187,6 +187,7 @@ def test_Course_create(self):
 
         # check if model attributes exists.
         self.assertTrue(model.name is not None)
+        self.assertTrue(model.language is not None)
         self.assertTrue(model.course_convener is not None)
         self.assertTrue(model.certifying_organisation is not None)
         self.assertTrue(model.course_type is not None)