{"action":"created","comment":{"url":"https://api.github.com/repos/uclouvain/osis/pulls/comments/199156590","pull_request_review_id":133222893,"id":199156590,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5OTE1NjU5MA==","diff_hunk":"@@ -0,0 +1,86 @@\n+##############################################################################\n+#\n+#    OSIS stands for Open Student Information System. It's an application\n+#    designed to manage the core business of higher education institutions,\n+#    such as universities, faculties, institutes and professional schools.\n+#    The core business involves the administration of students, teachers,\n+#    courses, programs and so on.\n+#\n+#    Copyright (C) 2015-2018 Université catholique de Louvain (http://www.uclouvain.be)\n+#\n+#    This program is free software: you can redistribute it and/or modify\n+#    it under the terms of the GNU General Public License as published by\n+#    the Free Software Foundation, either version 3 of the License, or\n+#    (at your option) any later version.\n+#\n+#    This program is distributed in the hope that it will be useful,\n+#    but WITHOUT ANY WARRANTY; without even the implied warranty of\n+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+#    GNU General Public License for more details.\n+#\n+#    A copy of this license - GNU General Public License - is available\n+#    at the root of the source code of this program.  If not,\n+#    see http://www.gnu.org/licenses/.\n+#\n+##############################################################################\n+from django import forms\n+from django.utils.translation import ugettext_lazy as _\n+\n+from base.models import campus, education_group_type\n+from base.models.education_group import EducationGroup\n+from base.models.education_group_year import EducationGroupYear\n+from base.models.enums import education_group_categories\n+from base.forms.education_group.create import CreateOfferYearEntityForm\n+\n+\n+class EditionEducationGroupYearForm(forms.ModelForm):\n+    education_group_year = None\n+\n+    class Meta:\n+        model = EducationGroupYear\n+        fields = [\"acronym\", \"partial_acronym\", \"education_group_type\", \"title\", \"title_english\",\n+                  \"academic_year\", \"main_teaching_campus\", \"remark\", \"remark_english\", \"credits\", \"enrollment_enabled\",\n+                  \"partial_deliberation\", \"academic_type\", \"admission_exam\",\n+                  \"university_certificate\", \"duration\", \"duration_unit\", \"dissertation\",\n+                  \"internship\", \"primary_language\", \"other_language_activities\",\n+                  \"keywords\", \"active\", \"schedule_type\",\n+                  \"education_group\", \"enrollment_campus\",\n+                  \"other_campus_activities\", \"funding\", \"funding_direction\", \"funding_cud\",\n+                  \"funding_direction_cud\",\n+                  \"diploma_printing_title\", \"diploma_printing_orientation\", \"professional_title\", \"min_credits\",\n+                  \"max_credits\"]\n+\n+    def __init__(self, *args, **kwargs):\n+        self.education_group_year = kwargs.get('instance', None)\n+        super().__init__(*args, **kwargs)\n+        self.prepare_fields()\n+\n+    def prepare_fields(self):\n+        self.fields[\"academic_year\"].required = False\n+        self.fields[\"education_group\"].required = False\n+        self.fields[\"main_teaching_campus\"].queryset = campus.find_main_campuses()\n+        self.fields[\"education_group_type\"].queryset = \\\n+            education_group_type.find_by_category(education_group_categories.TRAINING)\n+        self.fields[\"education_group_type\"].required = True\n+\n+    def clean(self):\n+        cleaned_data = self.cleaned_data\n+        cleaned_data['academic_year'] = self.education_group_year.academic_year\n+        cleaned_data['education_group'] = self.education_group_year.education_group\n+        return cleaned_data\n+\n+\n+class EducationGroupForm(forms.ModelForm):\n+\n+    class Meta:\n+        model = EducationGroup\n+        fields = ['start_year', 'end_year']\n+\n+    def __init__(self, *args, **kwargs):","path":"base/forms/education_group/edition.py","position":79,"original_position":79,"commit_id":"34f2ac7f29518ed379c2a81921af1035eb0c19f7","original_commit_id":"34f2ac7f29518ed379c2a81921af1035eb0c19f7","user":{"login":"matrixise","id":38737,"node_id":"MDQ6VXNlcjM4NzM3","avatar_url":"https://avatars2.githubusercontent.com/u/38737?v=4","gravatar_id":"","url":"https://api.github.com/users/matrixise","html_url":"https://github.com/matrixise","followers_url":"https://api.github.com/users/matrixise/followers","following_url":"https://api.github.com/users/matrixise/following{/other_user}","gists_url":"https://api.github.com/users/matrixise/gists{/gist_id}","starred_url":"https://api.github.com/users/matrixise/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matrixise/subscriptions","organizations_url":"https://api.github.com/users/matrixise/orgs","repos_url":"https://api.github.com/users/matrixise/repos","events_url":"https://api.github.com/users/matrixise/events{/privacy}","received_events_url":"https://api.github.com/users/matrixise/received_events","type":"User","site_admin":false},"body":"pas utile","created_at":"2018-06-29T13:22:20Z","updated_at":"2018-06-29T13:23:05Z","html_url":"https://github.com/uclouvain/osis/pull/3877#discussion_r199156590","pull_request_url":"https://api.github.com/repos/uclouvain/osis/pulls/3877","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/uclouvain/osis/pulls/comments/199156590"},"html":{"href":"https://github.com/uclouvain/osis/pull/3877#discussion_r199156590"},"pull_request":{"href":"https://api.github.com/repos/uclouvain/osis/pulls/3877"}}},"pull_request":{"url":"https://api.github.com/repos/uclouvain/osis/pulls/3877","id":198004650,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk4MDA0NjUw","html_url":"https://github.com/uclouvain/osis/pull/3877","diff_url":"https://github.com/uclouvain/osis/pull/3877.diff","patch_url":"https://github.com/uclouvain/osis/pull/3877.patch","issue_url":"https://api.github.com/repos/uclouvain/osis/issues/3877","number":3877,"state":"open","locked":false,"title":"Osis 1330","user":{"login":"verpoorten","id":5947635,"node_id":"MDQ6VXNlcjU5NDc2MzU=","avatar_url":"https://avatars2.githubusercontent.com/u/5947635?v=4","gravatar_id":"","url":"https://api.github.com/users/verpoorten","html_url":"https://github.com/verpoorten","followers_url":"https://api.github.com/users/verpoorten/followers","following_url":"https://api.github.com/users/verpoorten/following{/other_user}","gists_url":"https://api.github.com/users/verpoorten/gists{/gist_id}","starred_url":"https://api.github.com/users/verpoorten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/verpoorten/subscriptions","organizations_url":"https://api.github.com/users/verpoorten/orgs","repos_url":"https://api.github.com/users/verpoorten/repos","events_url":"https://api.github.com/users/verpoorten/events{/privacy}","received_events_url":"https://api.github.com/users/verpoorten/received_events","type":"User","site_admin":false},"body":"Référence Jira : OSIS-\r\n\r\nVérifier les points suivants : \r\n- [ ] Ouvrir une release task Jira si le ticket génère une tâche pour la release : \r\n    - modification de configuration\r\n    - table à synchroniser en entier, etc.\r\n- [ ] Uniformiser les modèles osis-portal avec les changements effectués dans osis si nécessaire\r\n- [ ] Permissions et droits d’accès mettre à jour la documentation si : \r\n    - on rajoute/modifie une permission\r\n    - on rajoute/modifie un groupe d’utilisateurs, etc.\r\n","created_at":"2018-06-28T11:51:58Z","updated_at":"2018-06-29T13:23:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"706873272c7a7af1ac805356d09b661be0eadf27","assignee":{"login":"verpoorten","id":5947635,"node_id":"MDQ6VXNlcjU5NDc2MzU=","avatar_url":"https://avatars2.githubusercontent.com/u/5947635?v=4","gravatar_id":"","url":"https://api.github.com/users/verpoorten","html_url":"https://github.com/verpoorten","followers_url":"https://api.github.com/users/verpoorten/followers","following_url":"https://api.github.com/users/verpoorten/following{/other_user}","gists_url":"https://api.github.com/users/verpoorten/gists{/gist_id}","starred_url":"https://api.github.com/users/verpoorten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/verpoorten/subscriptions","organizations_url":"https://api.github.com/users/verpoorten/orgs","repos_url":"https://api.github.com/users/verpoorten/repos","events_url":"https://api.github.com/users/verpoorten/events{/privacy}","received_events_url":"https://api.github.com/users/verpoorten/received_events","type":"User","site_admin":false},"assignees":[{"login":"verpoorten","id":5947635,"node_id":"MDQ6VXNlcjU5NDc2MzU=","avatar_url":"https://avatars2.githubusercontent.com/u/5947635?v=4","gravatar_id":"","url":"https://api.github.com/users/verpoorten","html_url":"https://github.com/verpoorten","followers_url":"https://api.github.com/users/verpoorten/followers","following_url":"https://api.github.com/users/verpoorten/following{/other_user}","gists_url":"https://api.github.com/users/verpoorten/gists{/gist_id}","starred_url":"https://api.github.com/users/verpoorten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/verpoorten/subscriptions","organizations_url":"https://api.github.com/users/verpoorten/orgs","repos_url":"https://api.github.com/users/verpoorten/repos","events_url":"https://api.github.com/users/verpoorten/events{/privacy}","received_events_url":"https://api.github.com/users/verpoorten/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/uclouvain/osis/pulls/3877/commits","review_comments_url":"https://api.github.com/repos/uclouvain/osis/pulls/3877/comments","review_comment_url":"https://api.github.com/repos/uclouvain/osis/pulls/comments{/number}","comments_url":"https://api.github.com/repos/uclouvain/osis/issues/3877/comments","statuses_url":"https://api.github.com/repos/uclouvain/osis/statuses/34f2ac7f29518ed379c2a81921af1035eb0c19f7","head":{"label":"uclouvain:OSIS-1330","ref":"OSIS-1330","sha":"34f2ac7f29518ed379c2a81921af1035eb0c19f7","user":{"login":"uclouvain","id":9862060,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk4NjIwNjA=","avatar_url":"https://avatars0.githubusercontent.com/u/9862060?v=4","gravatar_id":"","url":"https://api.github.com/users/uclouvain","html_url":"https://github.com/uclouvain","followers_url":"https://api.github.com/users/uclouvain/followers","following_url":"https://api.github.com/users/uclouvain/following{/other_user}","gists_url":"https://api.github.com/users/uclouvain/gists{/gist_id}","starred_url":"https://api.github.com/users/uclouvain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uclouvain/subscriptions","organizations_url":"https://api.github.com/users/uclouvain/orgs","repos_url":"https://api.github.com/users/uclouvain/repos","events_url":"https://api.github.com/users/uclouvain/events{/privacy}","received_events_url":"https://api.github.com/users/uclouvain/received_events","type":"Organization","site_admin":false},"repo":{"id":37489388,"node_id":"MDEwOlJlcG9zaXRvcnkzNzQ4OTM4OA==","name":"osis","full_name":"uclouvain/osis","owner":{"login":"uclouvain","id":9862060,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk4NjIwNjA=","avatar_url":"https://avatars0.githubusercontent.com/u/9862060?v=4","gravatar_id":"","url":"https://api.github.com/users/uclouvain","html_url":"https://github.com/uclouvain","followers_url":"https://api.github.com/users/uclouvain/followers","following_url":"https://api.github.com/users/uclouvain/following{/other_user}","gists_url":"https://api.github.com/users/uclouvain/gists{/gist_id}","starred_url":"https://api.github.com/users/uclouvain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uclouvain/subscriptions","organizations_url":"https://api.github.com/users/uclouvain/orgs","repos_url":"https://api.github.com/users/uclouvain/repos","events_url":"https://api.github.com/users/uclouvain/events{/privacy}","received_events_url":"https://api.github.com/users/uclouvain/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uclouvain/osis","description":"Open Student Information System Backoffice","fork":false,"url":"https://api.github.com/repos/uclouvain/osis","forks_url":"https://api.github.com/repos/uclouvain/osis/forks","keys_url":"https://api.github.com/repos/uclouvain/osis/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uclouvain/osis/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uclouvain/osis/teams","hooks_url":"https://api.github.com/repos/uclouvain/osis/hooks","issue_events_url":"https://api.github.com/repos/uclouvain/osis/issues/events{/number}","events_url":"https://api.github.com/repos/uclouvain/osis/events","assignees_url":"https://api.github.com/repos/uclouvain/osis/assignees{/user}","branches_url":"https://api.github.com/repos/uclouvain/osis/branches{/branch}","tags_url":"https://api.github.com/repos/uclouvain/osis/tags","blobs_url":"https://api.github.com/repos/uclouvain/osis/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uclouvain/osis/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uclouvain/osis/git/refs{/sha}","trees_url":"https://api.github.com/repos/uclouvain/osis/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uclouvain/osis/statuses/{sha}","languages_url":"https://api.github.com/repos/uclouvain/osis/languages","stargazers_url":"https://api.github.com/repos/uclouvain/osis/stargazers","contributors_url":"https://api.github.com/repos/uclouvain/osis/contributors","subscribers_url":"https://api.github.com/repos/uclouvain/osis/subscribers","subscription_url":"https://api.github.com/repos/uclouvain/osis/subscription","commits_url":"https://api.github.com/repos/uclouvain/osis/commits{/sha}","git_commits_url":"https://api.github.com/repos/uclouvain/osis/git/commits{/sha}","comments_url":"https://api.github.com/repos/uclouvain/osis/comments{/number}","issue_comment_url":"https://api.github.com/repos/uclouvain/osis/issues/comments{/number}","contents_url":"https://api.github.com/repos/uclouvain/osis/contents/{+path}","compare_url":"https://api.github.com/repos/uclouvain/osis/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uclouvain/osis/merges","archive_url":"https://api.github.com/repos/uclouvain/osis/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uclouvain/osis/downloads","issues_url":"https://api.github.com/repos/uclouvain/osis/issues{/number}","pulls_url":"https://api.github.com/repos/uclouvain/osis/pulls{/number}","milestones_url":"https://api.github.com/repos/uclouvain/osis/milestones{/number}","notifications_url":"https://api.github.com/repos/uclouvain/osis/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uclouvain/osis/labels{/name}","releases_url":"https://api.github.com/repos/uclouvain/osis/releases{/id}","deployments_url":"https://api.github.com/repos/uclouvain/osis/deployments","created_at":"2015-06-15T20:25:28Z","updated_at":"2018-06-29T13:02:46Z","pushed_at":"2018-06-29T13:18:38Z","git_url":"git://github.com/uclouvain/osis.git","ssh_url":"git@github.com:uclouvain/osis.git","clone_url":"https://github.com/uclouvain/osis.git","svn_url":"https://github.com/uclouvain/osis","homepage":"http://uclouvain.github.io/osis","size":61128,"stargazers_count":34,"watchers_count":34,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":14,"mirror_url":null,"archived":false,"open_issues_count":13,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":14,"open_issues":13,"watchers":34,"default_branch":"dev"}},"base":{"label":"uclouvain:dev","ref":"dev","sha":"92bf8350c5bc3e69142288bcf695e7dcf732f834","user":{"login":"uclouvain","id":9862060,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk4NjIwNjA=","avatar_url":"https://avatars0.githubusercontent.com/u/9862060?v=4","gravatar_id":"","url":"https://api.github.com/users/uclouvain","html_url":"https://github.com/uclouvain","followers_url":"https://api.github.com/users/uclouvain/followers","following_url":"https://api.github.com/users/uclouvain/following{/other_user}","gists_url":"https://api.github.com/users/uclouvain/gists{/gist_id}","starred_url":"https://api.github.com/users/uclouvain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uclouvain/subscriptions","organizations_url":"https://api.github.com/users/uclouvain/orgs","repos_url":"https://api.github.com/users/uclouvain/repos","events_url":"https://api.github.com/users/uclouvain/events{/privacy}","received_events_url":"https://api.github.com/users/uclouvain/received_events","type":"Organization","site_admin":false},"repo":{"id":37489388,"node_id":"MDEwOlJlcG9zaXRvcnkzNzQ4OTM4OA==","name":"osis","full_name":"uclouvain/osis","owner":{"login":"uclouvain","id":9862060,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk4NjIwNjA=","avatar_url":"https://avatars0.githubusercontent.com/u/9862060?v=4","gravatar_id":"","url":"https://api.github.com/users/uclouvain","html_url":"https://github.com/uclouvain","followers_url":"https://api.github.com/users/uclouvain/followers","following_url":"https://api.github.com/users/uclouvain/following{/other_user}","gists_url":"https://api.github.com/users/uclouvain/gists{/gist_id}","starred_url":"https://api.github.com/users/uclouvain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uclouvain/subscriptions","organizations_url":"https://api.github.com/users/uclouvain/orgs","repos_url":"https://api.github.com/users/uclouvain/repos","events_url":"https://api.github.com/users/uclouvain/events{/privacy}","received_events_url":"https://api.github.com/users/uclouvain/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uclouvain/osis","description":"Open Student Information System Backoffice","fork":false,"url":"https://api.github.com/repos/uclouvain/osis","forks_url":"https://api.github.com/repos/uclouvain/osis/forks","keys_url":"https://api.github.com/repos/uclouvain/osis/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uclouvain/osis/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uclouvain/osis/teams","hooks_url":"https://api.github.com/repos/uclouvain/osis/hooks","issue_events_url":"https://api.github.com/repos/uclouvain/osis/issues/events{/number}","events_url":"https://api.github.com/repos/uclouvain/osis/events","assignees_url":"https://api.github.com/repos/uclouvain/osis/assignees{/user}","branches_url":"https://api.github.com/repos/uclouvain/osis/branches{/branch}","tags_url":"https://api.github.com/repos/uclouvain/osis/tags","blobs_url":"https://api.github.com/repos/uclouvain/osis/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uclouvain/osis/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uclouvain/osis/git/refs{/sha}","trees_url":"https://api.github.com/repos/uclouvain/osis/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uclouvain/osis/statuses/{sha}","languages_url":"https://api.github.com/repos/uclouvain/osis/languages","stargazers_url":"https://api.github.com/repos/uclouvain/osis/stargazers","contributors_url":"https://api.github.com/repos/uclouvain/osis/contributors","subscribers_url":"https://api.github.com/repos/uclouvain/osis/subscribers","subscription_url":"https://api.github.com/repos/uclouvain/osis/subscription","commits_url":"https://api.github.com/repos/uclouvain/osis/commits{/sha}","git_commits_url":"https://api.github.com/repos/uclouvain/osis/git/commits{/sha}","comments_url":"https://api.github.com/repos/uclouvain/osis/comments{/number}","issue_comment_url":"https://api.github.com/repos/uclouvain/osis/issues/comments{/number}","contents_url":"https://api.github.com/repos/uclouvain/osis/contents/{+path}","compare_url":"https://api.github.com/repos/uclouvain/osis/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uclouvain/osis/merges","archive_url":"https://api.github.com/repos/uclouvain/osis/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uclouvain/osis/downloads","issues_url":"https://api.github.com/repos/uclouvain/osis/issues{/number}","pulls_url":"https://api.github.com/repos/uclouvain/osis/pulls{/number}","milestones_url":"https://api.github.com/repos/uclouvain/osis/milestones{/number}","notifications_url":"https://api.github.com/repos/uclouvain/osis/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uclouvain/osis/labels{/name}","releases_url":"https://api.github.com/repos/uclouvain/osis/releases{/id}","deployments_url":"https://api.github.com/repos/uclouvain/osis/deployments","created_at":"2015-06-15T20:25:28Z","updated_at":"2018-06-29T13:02:46Z","pushed_at":"2018-06-29T13:18:38Z","git_url":"git://github.com/uclouvain/osis.git","ssh_url":"git@github.com:uclouvain/osis.git","clone_url":"https://github.com/uclouvain/osis.git","svn_url":"https://github.com/uclouvain/osis","homepage":"http://uclouvain.github.io/osis","size":61128,"stargazers_count":34,"watchers_count":34,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":14,"mirror_url":null,"archived":false,"open_issues_count":13,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":14,"open_issues":13,"watchers":34,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/uclouvain/osis/pulls/3877"},"html":{"href":"https://github.com/uclouvain/osis/pull/3877"},"issue":{"href":"https://api.github.com/repos/uclouvain/osis/issues/3877"},"comments":{"href":"https://api.github.com/repos/uclouvain/osis/issues/3877/comments"},"review_comments":{"href":"https://api.github.com/repos/uclouvain/osis/pulls/3877/comments"},"review_comment":{"href":"https://api.github.com/repos/uclouvain/osis/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/uclouvain/osis/pulls/3877/commits"},"statuses":{"href":"https://api.github.com/repos/uclouvain/osis/statuses/34f2ac7f29518ed379c2a81921af1035eb0c19f7"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"matrixise"}}