Skip to content

Commit

Permalink
Fix/muwm 5277 (#2964)
Browse files Browse the repository at this point in the history
Resolve MUWM-5277
  • Loading branch information
fanglinfang committed Jul 10, 2023
1 parent 1ebe5d2 commit 36ec06b
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 7 deletions.
4 changes: 2 additions & 2 deletions myuw_vue/components/_common/course/student/course-eval.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
:key="`${section.id}-eval-inst-${index}`"
class="mb-2"
>
<strong>{{ titleCaseName(instructor.instructor_name) }}</strong>
<strong>{{ instructor.instructor_name }}</strong>
<div v-if="hasTitle(instructor)" class="fst-italic text-muted">
{{ instructor.instructor_title }}
</div>
Expand All @@ -52,7 +52,7 @@
<a
v-out="'Evaluate instructor'"
:href="evalObj.url">
{{ titleCaseName(instructor.instructor_name) }}
{{ instructor.instructor_name }}
</a>
<div v-if="hasTitle(instructor)"
class="fst-italic text-muted mb-2"
Expand Down
4 changes: 2 additions & 2 deletions myuw_vue/components/profile/user-name.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<template #panel-body>
<h2 class="h4 mb-3">
<span>
{{ titleCaseName(name) }}
{{ name }}
<span v-if="hasPronouns" class="myuw-text-md text-uppercase" title="Pronouns">
({{ titleCaseName(pronouns) }})
</span>
Expand Down Expand Up @@ -41,7 +41,7 @@ export default {
return Boolean(this.pronouns && this.pronouns.length);
},
name() {
return this.displayName ? this.displayName : this.fullName;
return this.displayName ? this.displayName : this.fullName; // MUWM-5134
},
},
mounted() {
Expand Down
11 changes: 10 additions & 1 deletion myuw_vue/components/teaching/course/grading/delegates.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
:key="i"
:class="{ 'mb-1': i === section.grade_submission_delegates.length + 1 }"
>
{{ titleCaseName(delegate.person.display_name) }}
{{ delegateDisplayName(delegate.person) }}
({{ titleCaseWord(delegate.level) }})
</li>
</ul>
Expand Down Expand Up @@ -78,5 +78,14 @@ export default {
};
},
},
methods: {
delegateDisplayName(delegate) {
// MUWM-5277
if (delegate.display_name) {
return delegate.display_name;
}
return delegate.full_name;
},
},
};
</script>
13 changes: 11 additions & 2 deletions myuw_vue/components/teaching/course/grading/instructors.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
<template #collapsed-body>
<ul class="list-unstyled mb-0">
<li v-for="(instructor, i) in section.instructors" :key="i" class="mb-1">
{{ titleCaseName(instructor.display_name) }}
{{ instructorDisplayName(instructor) }}
</li>
</ul>
</template>
</uw-collapsed-item>

<ul v-else class="list-unstyled mb-0">
<li v-for="(instructor, i) in section.instructors" :key="i" class="mb-1">
{{ titleCaseName(instructor.display_name) }}
{{ instructorDisplayName(instructor) }}
</li>
</ul>
</div>
Expand Down Expand Up @@ -75,5 +75,14 @@ export default {
};
},
},
methods: {
instructorDisplayName(instructor) {
// MUWM-5277
if (instructor.display_name) {
return instructor.display_name;
}
return instructor.full_name;
},
},
};
</script>

0 comments on commit 36ec06b

Please sign in to comment.