Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion scripts/langindex.json
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,6 @@
"addon.mod_forum.modeflatoldestfirst": "forum",
"addon.mod_forum.modenested": "forum",
"addon.mod_forum.modulenameplural": "forum",
"addon.mod_forum.numdiscussions": "local_moodlemobileapp",
"addon.mod_forum.numreplies": "local_moodlemobileapp",
"addon.mod_forum.pindiscussion": "forum",
"addon.mod_forum.pinupdated": "forum",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ Feature: Basic tests of news items block
And I press "Open block drawer" in the app
And I press "Older topics" in the app
Then the header should be "Announcements" in the app
And I should find "3 discussions" in the app
And I should find "Discussion One" in the app
And I should find "Discussion Two" in the app
And I should find "Discussion Three" in the app
Expand Down
8 changes: 1 addition & 7 deletions src/addons/mod/forum/components/index/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,7 @@
<!-- Activity info. -->
<core-course-module-info [module]="module" [description]="forum && forum.type !== 'single' && description" [component]="component"
[componentId]="componentId" [courseId]="courseId" [hasDataToSync]="hasOffline || hasOfflineRatings"
(completionChanged)="onCompletionChange()">
<ion-item class="ion-text-wrap">
<ion-label>
{{descriptionNote}}
</ion-label>
</ion-item>
</core-course-module-info>
(completionChanged)="onCompletionChange()" />

@if (supportsChangeGroup) {
<core-group-selector [groupInfo]="groupInfo" [(selected)]="groupId" (selectedChange)="groupChanged()" [courseId]="courseId" />
Expand Down
4 changes: 0 additions & 4 deletions src/addons/mod/forum/components/index/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ export class AddonModForumIndexComponent extends CoreCourseModuleMainActivityCom

component = ADDON_MOD_FORUM_COMPONENT_LEGACY;
pluginName = 'forum';
descriptionNote?: string;
promisedDiscussions = new CorePromisedValue<AddonModForumDiscussionsManager>();
discussionsItems: (AddonModForumDiscussion | AddonModForumOfflineDiscussion)[] = [];
fetchFailed = false;
Expand Down Expand Up @@ -408,9 +407,6 @@ export class AddonModForumIndexComponent extends CoreCourseModuleMainActivityCom
const showDueDateMessage = !CoreSites.getCurrentSite()?.isVersionGreaterEqualThan('3.11');
this.description = forum.intro || this.description;
this.availabilityMessage = AddonModForumHelper.getAvailabilityMessage(forum, showDueDateMessage);
this.descriptionNote = Translate.instant('addon.mod_forum.numdiscussions', {
numdiscussions: forum.numdiscussions,
});

this.dataRetrieved.emit(forum);

Expand Down
50 changes: 28 additions & 22 deletions src/addons/mod/forum/components/post/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,20 @@ <h2 class="ion-text-wrap">
<core-format-text [text]="post.subject" contextLevel="module" [contextInstanceId]="forum && forum.cmid"
[courseId]="courseId" [sanitize]="!post.id || post.id < 0" />
</h2>
@if (trackPosts && post.unread) {
<ion-note class="ion-float-end ion-padding-start ion-text-end"
[attr.aria-label]="'addon.mod_forum.unread' | translate">
<ion-icon name="fas-circle" color="primary" aria-hidden="true" />
</ion-note>
}
@if (optionsMenuEnabled) {
<ion-button fill="clear" [ariaLabel]="('core.displayoptions' | translate)"
(click)="showOptionsMenu($event)">
<ion-icon name="ellipsis-vertical" slot="icon-only" aria-hidden="true" />
</ion-button>
@if ((trackPosts && post.unread) || optionsMenuEnabled) {
<div class="addon-mod-forum-post-title-options">
@if (trackPosts && post.unread) {
<ion-note [attr.aria-label]="'addon.mod_forum.unread' | translate">
<ion-icon name="fas-circle" color="primary" aria-hidden="true" />
</ion-note>
}
@if (optionsMenuEnabled) {
<ion-button fill="clear" [ariaLabel]="('core.displayoptions' | translate)"
(click)="showOptionsMenu($event)">
<ion-icon name="ellipsis-vertical" slot="icon-only" aria-hidden="true" />
</ion-button>
}
</div>
}
</div>
}
Expand Down Expand Up @@ -61,17 +64,20 @@ <h2 class="ion-text-wrap">
</div>

@if (!displaySubject) {
@if (trackPosts && post.unread) {
<ion-note class="ion-float-end ion-padding-start ion-text-end"
[attr.aria-label]="'addon.mod_forum.unread' | translate">
<ion-icon name="fas-circle" color="primary" aria-hidden="true" />
</ion-note>
}
@if (optionsMenuEnabled) {
<ion-button fill="clear" [ariaLabel]="('core.displayoptions' | translate)"
(click)="showOptionsMenu($event)">
<ion-icon name="ellipsis-vertical" slot="icon-only" aria-hidden="true" />
</ion-button>
@if ((trackPosts && post.unread) || optionsMenuEnabled) {
<div class="addon-mod-forum-post-title-options">
@if (trackPosts && post.unread) {
<ion-note [attr.aria-label]="'addon.mod_forum.unread' | translate">
<ion-icon name="fas-circle" color="primary" aria-hidden="true" />
</ion-note>
}
@if (optionsMenuEnabled) {
<ion-button fill="clear" [ariaLabel]="('core.displayoptions' | translate)"
(click)="showOptionsMenu($event)">
<ion-icon name="ellipsis-vertical" slot="icon-only" aria-hidden="true" />
</ion-button>
}
</div>
}
}
</div>
Expand Down
10 changes: 9 additions & 1 deletion src/addons/mod/forum/components/post/post.scss
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,23 @@

.addon-mod-forum-post-info {
margin-top: 8px;
align-items: start;
}

.addon-mod-forum-post-title + .addon-mod-forum-post-info {
margin-top: 0px;
}

.addon-mod-forum-post-title .item-heading,
.addon-mod-forum-post-info .addon-mod-forum-post-author {
flex-grow: 1;
overflow: hidden;
}

.addon-mod-forum-post-title-options {
display: flex;
align-items: center;
gap: 4px;
flex-direction: column;
}

}
Expand Down
1 change: 0 additions & 1 deletion src/addons/mod/forum/lang.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
"modeflatoldestfirst": "Display replies flat, with oldest first",
"modenested": "Display replies in nested form",
"modulenameplural": "Forums",
"numdiscussions": "{{numdiscussions}} discussions",
"numreplies": "{{numreplies}} replies",
"pindiscussion": "Pin this discussion",
"pinupdated": "The pin option has been updated.",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading