commit
5e61135dd1
|
@ -461,6 +461,7 @@
|
||||||
"addon.mod_bigbluebuttonbn.view_message_session_started_at": "bigbluebuttonbn",
|
"addon.mod_bigbluebuttonbn.view_message_session_started_at": "bigbluebuttonbn",
|
||||||
"addon.mod_bigbluebuttonbn.view_message_viewer": "bigbluebuttonbn",
|
"addon.mod_bigbluebuttonbn.view_message_viewer": "bigbluebuttonbn",
|
||||||
"addon.mod_bigbluebuttonbn.view_message_viewers": "bigbluebuttonbn",
|
"addon.mod_bigbluebuttonbn.view_message_viewers": "bigbluebuttonbn",
|
||||||
|
"addon.mod_bigbluebuttonbn.view_nojoin": "bigbluebuttonbn",
|
||||||
"addon.mod_book.errorchapter": "book",
|
"addon.mod_book.errorchapter": "book",
|
||||||
"addon.mod_book.modulenameplural": "book",
|
"addon.mod_book.modulenameplural": "book",
|
||||||
"addon.mod_book.navnexttitle": "book",
|
"addon.mod_book.navnexttitle": "book",
|
||||||
|
|
|
@ -81,15 +81,23 @@ export class AddonModBBBIndexComponent extends CoreCourseModuleMainActivityCompo
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.meetingInfo = await AddonModBBB.getMeetingInfo(this.bbb.id, this.groupId, {
|
try {
|
||||||
cmId: this.module.id,
|
this.meetingInfo = await AddonModBBB.getMeetingInfo(this.bbb.id, this.groupId, {
|
||||||
});
|
cmId: this.module.id,
|
||||||
|
});
|
||||||
|
|
||||||
if (this.meetingInfo.statusrunning && this.meetingInfo.userlimit > 0) {
|
if (this.meetingInfo.statusrunning && this.meetingInfo.userlimit > 0) {
|
||||||
const count = (this.meetingInfo.participantcount || 0) + (this.meetingInfo.moderatorcount || 0);
|
const count = (this.meetingInfo.participantcount || 0) + (this.meetingInfo.moderatorcount || 0);
|
||||||
if (count === this.meetingInfo.userlimit) {
|
if (count === this.meetingInfo.userlimit) {
|
||||||
this.meetingInfo.statusmessage = Translate.instant('addon.mod_bigbluebuttonbn.userlimitreached');
|
this.meetingInfo.statusmessage = Translate.instant('addon.mod_bigbluebuttonbn.userlimitreached');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
} catch (error) {
|
||||||
|
if (error && error.errorcode === 'restrictedcontextexception') {
|
||||||
|
error.message = Translate.instant('addon.mod_bigbluebuttonbn.view_nojoin');
|
||||||
|
}
|
||||||
|
|
||||||
|
throw error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,5 +14,6 @@
|
||||||
"view_message_moderators": "moderators",
|
"view_message_moderators": "moderators",
|
||||||
"view_message_session_started_at": "This session started at",
|
"view_message_session_started_at": "This session started at",
|
||||||
"view_message_viewer": "viewer",
|
"view_message_viewer": "viewer",
|
||||||
"view_message_viewers": "viewers"
|
"view_message_viewers": "viewers",
|
||||||
|
"view_nojoin": "You do not have a role that is allowed to join this session."
|
||||||
}
|
}
|
||||||
|
|
|
@ -174,21 +174,35 @@ export class CoreCourseModuleSummaryComponent implements OnInit, OnDestroy {
|
||||||
this.componentId = this.module.id;
|
this.componentId = this.module.id;
|
||||||
this.externalUrl = this.module.url;
|
this.externalUrl = this.module.url;
|
||||||
this.courseId = this.courseId || this.module.course;
|
this.courseId = this.courseId || this.module.course;
|
||||||
|
|
||||||
this.modicon = await CoreCourseModuleDelegate.getModuleIconSrc(this.module.modname, this.module.modicon, this.module);
|
|
||||||
this.moduleNameTranslated = CoreCourse.translateModuleName(this.module.modname || '');
|
this.moduleNameTranslated = CoreCourse.translateModuleName(this.module.modname || '');
|
||||||
|
|
||||||
this.blog = await AddonBlog.isPluginEnabled();
|
this.blog = await AddonBlog.isPluginEnabled();
|
||||||
|
|
||||||
await Promise.all([
|
try {
|
||||||
this.getPackageStatus(),
|
await Promise.all([
|
||||||
this.fetchGrades(),
|
this.loadModIcon(),
|
||||||
this.fetchCourse(),
|
this.getPackageStatus(),
|
||||||
]);
|
this.fetchGrades(),
|
||||||
|
this.fetchCourse(),
|
||||||
|
]);
|
||||||
|
} catch (error) {
|
||||||
|
CoreDomUtils.showErrorModal(error);
|
||||||
|
}
|
||||||
|
|
||||||
this.loaded = true;
|
this.loaded = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Load the module icon.
|
||||||
|
*/
|
||||||
|
protected async loadModIcon(): Promise<void> {
|
||||||
|
if (!this.module) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.modicon = await CoreCourseModuleDelegate.getModuleIconSrc(this.module.modname, this.module.modicon, this.module);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Updage package status.
|
* Updage package status.
|
||||||
*
|
*
|
||||||
|
@ -235,7 +249,11 @@ export class CoreCourseModuleSummaryComponent implements OnInit, OnDestroy {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.grades = await CoreGradesHelper.getModuleGrades(this.courseId, this.moduleId);
|
try {
|
||||||
|
this.grades = await CoreGradesHelper.getModuleGrades(this.courseId, this.moduleId);
|
||||||
|
} catch {
|
||||||
|
// Cannot get grades, don't display them.
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue