Skip to content

1743 Usunięcie efektów kształcenia#1780

Open
Cez02 wants to merge 20 commits intomaster-devfrom
1743-remove-teaching-effects
Open

1743 Usunięcie efektów kształcenia#1780
Cez02 wants to merge 20 commits intomaster-devfrom
1743-remove-teaching-effects

Conversation

@Cez02
Copy link
Collaborator

@Cez02 Cez02 commented Jan 5, 2025

  • Usunięcie modelu Effects
  • Usunięcie filtru grup efektów z panelu admina i stron użytkownika
  • Usunięcie metody get_completed_effects z modelu CompletedCourses

@Cez02 Cez02 linked an issue Jan 5, 2025 that may be closed by this pull request
@Cez02 Cez02 requested a review from lgpawel January 5, 2025 15:16
Comment on lines 334 to 335
.select_related('semester', 'course_type')
.prefetch_related('tags', 'effects')
.prefetch_related('tags')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Biorąc pod uwagę, co liczy ta pomocnicza funkcja, to nie tylko wystąpienie 'effects', ale całe te dwa wiersze nie mają sensu. Warto to usunąć całkiem, tak jak nieużywaną klasę z apps.enrollment.courses.admin.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Usunąłem ww. selekcje w pomocniczej funkcji jak i nieużywaną klasę CourseInstanceAdmin z admina

@lgpawel lgpawel linked an issue Feb 9, 2025 that may be closed by this pull request
@S4bril S4bril force-pushed the 1743-remove-teaching-effects branch from 436d288 to 4230238 Compare February 11, 2025 19:09
qs = Proposal.objects.filter(status__in=filter_statuses).order_by('name')
proposal_list = []
for p in qs.prefetch_related('tags'):
for p in qs.prefetch_related('thematic_tags', "specialist_tags"):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
for p in qs.prefetch_related('thematic_tags', "specialist_tags"):
for p in qs.prefetch_related('thematic_tags', 'specialist_tags'):

(i analogicznie w co najmniej jeszcze jednym miejscu)

Comment on lines +18 to +19
"/fereol_admin/courses/thematictag/",
"/fereol_admin/courses/thematictag/",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To chyba miały być dwie różne rzeczy.

Comment on lines +26 to +34
verbose_name = 'Tag tematyczny (I st.)'
verbose_name_plural = 'Tagi tematyczne (I st.)'
app_label = 'courses'


class SpecialistTag(BaseTag):
class Meta:
verbose_name = 'Tag specjalistyczny (II st.)'
verbose_name_plural = 'Tagi specjalistyczne (II st.)'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To może rewolucyjne, ale przy okazji sprawmy, żeby w systemie posługiwać się językiem polskim (i jednocześnie stosować nomenklaturę pojawiającą się w programie studiów) – plus oczywiście analogiczne zmiany w innych plikach.

Suggested change
verbose_name = 'Tag tematyczny (I st.)'
verbose_name_plural = 'Tagi tematyczne (I st.)'
app_label = 'courses'
class SpecialistTag(BaseTag):
class Meta:
verbose_name = 'Tag specjalistyczny (II st.)'
verbose_name_plural = 'Tagi specjalistyczne (II st.)'
verbose_name = "Znacznik tematyczny (I st.)"
verbose_name_plural = "Znaczniki tematyczne (I st.)"
app_label = 'courses'
class SpecialistTag(BaseTag):
class Meta:
verbose_name = "Znacznik specjalistyczny (II st.)"
verbose_name_plural = "Znaczniki specjalistyczne (II st.)"

(Podwójne cudzysłowy stosujemy dla napisów przeznaczonych "dla ludzkich oczu", a pojedyncze – dla tych przetwarzanych wewnętrznie w kodzie.)

Comment on lines +34 to +35
this.allThematicTags = cloneDeep(filtersData.allThematicTags || {});
this.allSpecialistTags = cloneDeep(filtersData.allSpecialistTags || {});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Skąd || {}? Dlaczego w innych CourseFilter.vue tego nie dodajemy? (To uczciwe pytanie, nie sugestia, że to źle…) Dlaczego w innych CourseFilter.vue tego nie dodajemy?

Comment on lines +37 to +40
migrations.AlterModelOptions(
name='thematictag',
options={'verbose_name': 'Tag specjalistyczny (II st.)', 'verbose_name_plural': 'Tagi specjalistyczne (II st.)'},
),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To chyba odnosi się do zmiany opcji starego modelu tag, ale wartości tekstowe nie odpowiadają jego nowej nazwie thematictag. Być może to po prostu jakaś stara wersja migracji, ale trzeba coś z tym zrobić.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rozdział tagów wg stopni studiów Usunięcie efektów kształcenia

3 participants