Skip to content

Commit 087f443

Browse files
Update CoursePage.vue
Try to output professor name and filter duplicate items
1 parent 135ff06 commit 087f443

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/web/src/pages/CoursePage.vue

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
<p v-html="transformed" />
2323
</b-col>
2424
</b-row>
25+
<h4 v-for="item in instructorList" :key="item.id">
26+
{{ item }}
27+
</h4>
2528
<b-row>
2629
<b-col class="mb-4">
2730

@@ -106,8 +109,18 @@ export default {
106109
text: this.$route.params.course,
107110
},
108111
],
112+
instructorList:[]
109113
};
110114
},
115+
mounted(){
116+
const instructors = new Set();
117+
this.courseObj.sections.forEach(section => {
118+
section.sessions.forEach(session => {
119+
instructors.add(session.instructor);
120+
});
121+
});
122+
this.instructorList = Array.from(instructors);
123+
},
111124
methods: {
112125
generateRequirementsText,
113126
},

0 commit comments

Comments
 (0)