Skip to content

Commit

Permalink
Merge pull request #289 from smu-nity/feature/288
Browse files Browse the repository at this point in the history
Feature/288
  • Loading branch information
hyunmin0317 authored Jan 23, 2024
2 parents 7fc9818 + 9289f63 commit 859a5b0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SMUNITY ![Python versions](https://img.shields.io/badge/Python-3.9-blue) ![License](https://img.shields.io/badge/license-MIT-green) ![Release](https://img.shields.io/badge/release-1.5.3-red)
# SMUNITY ![Python versions](https://img.shields.io/badge/Python-3.9-blue) ![License](https://img.shields.io/badge/license-MIT-green) ![Release](https://img.shields.io/badge/release-1.5.4-red)

#### 상명대학교 졸업요건 검사 사이트

Expand Down
6 changes: 4 additions & 2 deletions config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,10 @@
TYPE_CHOICES = (("1전선", "1전선"), ("1전심", "1전심"), ("교선", "교선"), ("교필", "교필"), ("1교직", "1교직"), ("1전필", "1전필"), ("일선", "일선"))
SUBTYPE_CHOICES_E = (("전문지식탐구역량", "전문지식탐구역량"), ("창의적문제해결역량", "창의적문제해결역량"), ("융복합역량", "융복합역량"), ("다양성존중역량", "다양성존중역량"), ("윤리실천역량", "윤리실천역량"))
SUBTYPE_CHOICES_S = (("인문", "인문"), ("사회", "사회"), ("자연", "자연"), ("공학", "공학"), ("예술", "예술"))
CULTURES = [{'number': 'HALR1032', 'name': '사고와표현', 'credit': 3, 'semester': '1, 2'}, {'number': 'HALR1050\nHALR1231', 'name': 'EnglishforAcademicPurpose\n기초수학', 'credit': 3, 'semester': '1, 2'}, {'number': 'HALR1238', 'name': '컴퓨팅사고와데이터의이해', 'credit': 2, 'semester': '1'}, {'number': 'HALR1239', 'name': '알고리즘과게임콘텐츠', 'credit': 2, 'semester': '2'}]
CULTURES_DIC = [['사고와표현'], ['English', '영어', '수학', '미적분학'], ['컴퓨팅사고'], ['알고리즘']]
CULTURES_1 = [{'number': 'HALR1032', 'name': '사고와표현', 'credit': 3, 'semester': '1, 2'}, {'number': 'HALR1050\nHALR1231', 'name': 'EnglishforAcademicPurpose\n기초수학', 'credit': 3, 'semester': '1, 2'}, {'number': 'HALR1238\nHALR1239', 'name': '컴퓨팅사고와데이터의이해\n알고리즘과게임콘텐츠', 'credit': 2, 'semester': '1 | 2'}]
CULTURES_2 = [{'number': 'HALR1032', 'name': '사고와표현', 'credit': 3, 'semester': '1, 2'}, {'number': 'HALR1050\nHALR1231', 'name': 'EnglishforAcademicPurpose\n기초수학', 'credit': 3, 'semester': '1, 2'}, {'number': 'HALR1238', 'name': '컴퓨팅사고와데이터의이해', 'credit': 2, 'semester': '1'}, {'number': 'HALR1239', 'name': '알고리즘과게임콘텐츠', 'credit': 2, 'semester': '2'}]
CULTURES_DIC1 = [['사고와표현'], ['English', '영어', '수학', '미적분학'], ['컴퓨팅사고', '알고리즘']]
CULTURES_DIC2 = [['사고와표현'], ['English', '영어', '수학', '미적분학'], ['컴퓨팅사고'], ['알고리즘']]
DEPT_DIC = {'융합전자공학전공': '지능IOT융합전공', '지능·데이터융합학부': '핀테크전공'}
CATEGORY_CHOICES = ((1, "학사"), (2, "등록/장학"), (3, "학생생활"), (4, "진로취업"), (5, "기타"))
STATUS_CHOICES = ((1, "진행중"), (2, "답변대기"), (3, "답변완료"), (4, "만료"), (5, "반려"))
Expand Down
9 changes: 4 additions & 5 deletions core/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from sangmyung_univ_auth import completed_courses

from accounts.models import Profile, Department, Statistics
from config.settings import CULTURES, CULTURES_DIC
from config.settings import CULTURES_1, CULTURES_2, CULTURES_DIC1, CULTURES_DIC2
from core.models import Course
from graduations.models import Subject, Major
import logging
Expand Down Expand Up @@ -156,10 +156,9 @@ def course_update_excel(request):
def result(request):
profile = get_object_or_404(Profile, user=request.user)
courses = Course.objects.filter(user=request.user)
culture_b = CULTURES
culture_dic = CULTURES_DIC

cnt = 0
cnt, check = 0, int(profile.year.year) < 2020
culture_b = CULTURES_1 if check else CULTURES_2
culture_dic = CULTURES_DIC1 if check else CULTURES_DIC2
for culture, dics in zip(culture_b, culture_dic):
q = Q()
for key in dics:
Expand Down

0 comments on commit 859a5b0

Please sign in to comment.