Skip to content

Commit

Permalink
chore: restore isInstructorManageTopic variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian2012 committed Nov 29, 2023
1 parent db5a595 commit 79f1d7a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lms/djangoapps/teams/static/teams/js/views/team_profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,15 @@
discussionTopicID = this.model.get('discussion_topic_id'),
isMember = TeamUtils.isUserMemberOfTeam(memberships, this.context.userInfo.username),
isAdminOrStaff = this.context.userInfo.privileged || this.context.userInfo.staff,
isInstructorManagedTopic = TeamUtils.isInstructorManagedTopic(this.topic.attributes.type),
canJoinTeam = TeamUtils.canJoinTeam(this.context.userInfo, this.topic.attributes.type),
maxTeamSize = this.topic.getMaxTeamSize(this.context.courseMaxTeamSize);

// Assignments URL isn't provided if team assignments shouldn't be shown
// so we can treat it like a toggle
var showAssignments = !!this.context.teamsAssignmentsUrl;

var showLeaveLink = isMember && (isAdminOrStaff || canJoinTeam);
var showLeaveLink = isMember && (isAdminOrStaff || !isInstructorManagedTopic || canJoinTeam);

HtmlUtils.setHtml(
this.$el,
Expand Down

0 comments on commit 79f1d7a

Please sign in to comment.