commit
337c69d60f
|
@ -23,6 +23,7 @@ import { CoreUtils } from '@services/utils/utils';
|
|||
import { CoreNavigator } from '@services/navigator';
|
||||
import { CoreCourseHelper } from '@features/course/services/course-helper';
|
||||
import { CoreUrlUtils } from '@services/utils/url';
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
|
||||
/**
|
||||
* Component to render an "activity modules" block.
|
||||
|
@ -30,7 +31,11 @@ import { CoreUrlUtils } from '@services/utils/url';
|
|||
@Component({
|
||||
selector: 'addon-block-activitymodules',
|
||||
templateUrl: 'addon-block-activitymodules.html',
|
||||
styleUrls: ['activitymodules.scss'],
|
||||
styleUrl: 'activitymodules.scss',
|
||||
standalone: true,
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
],
|
||||
})
|
||||
export class AddonBlockActivityModulesComponent extends CoreBlockBaseComponent implements OnInit {
|
||||
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
// (C) Copyright 2015 Moodle Pty Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
import { NgModule } from '@angular/core';
|
||||
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
|
||||
import { AddonBlockActivityModulesComponent } from './activitymodules/activitymodules';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AddonBlockActivityModulesComponent,
|
||||
],
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
],
|
||||
})
|
||||
export class AddonBlockActivityModulesComponentsModule {}
|
|
@ -12,6 +12,7 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
import { Component } from '@angular/core';
|
||||
import { CoreBlockPreRenderedComponent } from '@features/block/components/pre-rendered-block/pre-rendered-block';
|
||||
|
||||
|
@ -21,6 +22,10 @@ import { CoreBlockPreRenderedComponent } from '@features/block/components/pre-re
|
|||
@Component({
|
||||
selector: 'addon-block-activity-results',
|
||||
templateUrl: '../../../../../core/features/block/components/pre-rendered-block/core-block-pre-rendered.html',
|
||||
styleUrls: ['activityresults.scss'],
|
||||
styleUrl: 'activityresults.scss',
|
||||
standalone: true,
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
],
|
||||
})
|
||||
export class AddonBlockActivityResultsComponent extends CoreBlockPreRenderedComponent {}
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
// (C) Copyright 2015 Moodle Pty Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
import { NgModule } from '@angular/core';
|
||||
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
import { AddonBlockActivityResultsComponent } from './activityresults/activityresults';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AddonBlockActivityResultsComponent,
|
||||
],
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
],
|
||||
})
|
||||
export class AddonBlockActivityResultsComponentsModule {}
|
|
@ -12,6 +12,7 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
import { Component } from '@angular/core';
|
||||
import { CoreBlockPreRenderedComponent } from '@features/block/components/pre-rendered-block/pre-rendered-block';
|
||||
|
||||
|
@ -21,6 +22,10 @@ import { CoreBlockPreRenderedComponent } from '@features/block/components/pre-re
|
|||
@Component({
|
||||
selector: 'addon-block-badges',
|
||||
templateUrl: '../../../../../core/features/block/components/pre-rendered-block/core-block-pre-rendered.html',
|
||||
styleUrls: ['badges.scss'],
|
||||
styleUrl: 'badges.scss',
|
||||
standalone: true,
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
],
|
||||
})
|
||||
export class AddonBlockBadgesComponent extends CoreBlockPreRenderedComponent {}
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
// (C) Copyright 2015 Moodle Pty Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
import { NgModule } from '@angular/core';
|
||||
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
import { AddonBlockBadgesComponent } from './badges/badges';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AddonBlockBadgesComponent,
|
||||
],
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
],
|
||||
})
|
||||
export class AddonBlockBadgesComponentsModule {}
|
|
@ -12,6 +12,7 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
import { Component } from '@angular/core';
|
||||
import { CoreBlockPreRenderedComponent } from '@features/block/components/pre-rendered-block/pre-rendered-block';
|
||||
|
||||
|
@ -21,6 +22,10 @@ import { CoreBlockPreRenderedComponent } from '@features/block/components/pre-re
|
|||
@Component({
|
||||
selector: 'addon-block-blog-menu',
|
||||
templateUrl: '../../../../../core/features/block/components/pre-rendered-block/core-block-pre-rendered.html',
|
||||
styleUrls: ['blogmenu.scss'],
|
||||
styleUrl: 'blogmenu.scss',
|
||||
standalone: true,
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
],
|
||||
})
|
||||
export class AddonBlockBlogMenuComponent extends CoreBlockPreRenderedComponent {}
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
// (C) Copyright 2015 Moodle Pty Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
import { NgModule } from '@angular/core';
|
||||
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
import { AddonBlockBlogMenuComponent } from './blogmenu/blogmenu';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AddonBlockBlogMenuComponent,
|
||||
],
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
],
|
||||
})
|
||||
export class AddonBlockBlogMenuComponentsModule {}
|
|
@ -12,6 +12,7 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
import { Component } from '@angular/core';
|
||||
import { CoreBlockPreRenderedComponent } from '@features/block/components/pre-rendered-block/pre-rendered-block';
|
||||
|
||||
|
@ -21,6 +22,10 @@ import { CoreBlockPreRenderedComponent } from '@features/block/components/pre-re
|
|||
@Component({
|
||||
selector: 'addon-block-blog-recent',
|
||||
templateUrl: '../../../../../core/features/block/components/pre-rendered-block/core-block-pre-rendered.html',
|
||||
styleUrls: ['blogrecent.scss'],
|
||||
styleUrl: 'blogrecent.scss',
|
||||
standalone: true,
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
],
|
||||
})
|
||||
export class AddonBlockBlogRecentComponent extends CoreBlockPreRenderedComponent {}
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
// (C) Copyright 2015 Moodle Pty Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
import { NgModule } from '@angular/core';
|
||||
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
import { AddonBlockBlogRecentComponent } from './blogrecent/blogrecent';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AddonBlockBlogRecentComponent,
|
||||
],
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
],
|
||||
})
|
||||
export class AddonBlockBlogRecentComponentsModule {}
|
|
@ -12,6 +12,7 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
import { Component } from '@angular/core';
|
||||
import { CoreBlockPreRenderedComponent } from '@features/block/components/pre-rendered-block/pre-rendered-block';
|
||||
|
||||
|
@ -21,6 +22,10 @@ import { CoreBlockPreRenderedComponent } from '@features/block/components/pre-re
|
|||
@Component({
|
||||
selector: 'addon-block-blog-tags',
|
||||
templateUrl: '../../../../../core/features/block/components/pre-rendered-block/core-block-pre-rendered.html',
|
||||
styleUrls: ['blogtags.scss'],
|
||||
styleUrl: 'blogtags.scss',
|
||||
standalone: true,
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
],
|
||||
})
|
||||
export class AddonBlockBlogTagsComponent extends CoreBlockPreRenderedComponent {}
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
// (C) Copyright 2015 Moodle Pty Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
import { NgModule } from '@angular/core';
|
||||
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
import { AddonBlockBlogTagsComponent } from './blogtags/blogtags';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AddonBlockBlogTagsComponent,
|
||||
],
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
],
|
||||
})
|
||||
export class AddonBlockBlogTagsComponentsModule {}
|
|
@ -1,30 +0,0 @@
|
|||
// (C) Copyright 2015 Moodle Pty Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
import { NgModule } from '@angular/core';
|
||||
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
import { CoreCoursesComponentsModule } from '@features/courses/components/components.module';
|
||||
import { AddonBlockMyOverviewComponent } from './myoverview/myoverview';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AddonBlockMyOverviewComponent,
|
||||
],
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
CoreCoursesComponentsModule,
|
||||
],
|
||||
})
|
||||
export class AddonBlockMyOverviewComponentsModule {}
|
|
@ -36,6 +36,8 @@ import { CoreNavigator } from '@services/navigator';
|
|||
import { PageLoadWatcher } from '@classes/page-load-watcher';
|
||||
import { PageLoadsManager } from '@classes/page-loads-manager';
|
||||
import { DownloadStatus } from '@/core/constants';
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
import { CoreCoursesComponentsModule } from '@features/courses/components/components.module';
|
||||
|
||||
const FILTER_PRIORITY: AddonBlockMyOverviewTimeFilters[] =
|
||||
['all', 'inprogress', 'future', 'past', 'favourite', 'allincludinghidden', 'hidden'];
|
||||
|
@ -46,7 +48,12 @@ const FILTER_PRIORITY: AddonBlockMyOverviewTimeFilters[] =
|
|||
@Component({
|
||||
selector: 'addon-block-myoverview',
|
||||
templateUrl: 'addon-block-myoverview.html',
|
||||
styleUrls: ['myoverview.scss'],
|
||||
styleUrl: 'myoverview.scss',
|
||||
standalone: true,
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
CoreCoursesComponentsModule,
|
||||
],
|
||||
})
|
||||
export class AddonBlockMyOverviewComponent extends CoreBlockBaseComponent implements OnInit, OnDestroy, OnChanges {
|
||||
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
// (C) Copyright 2015 Moodle Pty Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
import { NgModule } from '@angular/core';
|
||||
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
import { AddonBlockNewsItemsComponent } from './newsitems/newsitems';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AddonBlockNewsItemsComponent,
|
||||
],
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
],
|
||||
})
|
||||
export class AddonBlockNewsItemsComponentsModule {}
|
|
@ -12,6 +12,7 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
import { Component } from '@angular/core';
|
||||
import { CoreBlockPreRenderedComponent } from '@features/block/components/pre-rendered-block/pre-rendered-block';
|
||||
|
||||
|
@ -21,6 +22,10 @@ import { CoreBlockPreRenderedComponent } from '@features/block/components/pre-re
|
|||
@Component({
|
||||
selector: 'addon-block-news-items',
|
||||
templateUrl: '../../../../../core/features/block/components/pre-rendered-block/core-block-pre-rendered.html',
|
||||
styleUrls: ['newsitems.scss'],
|
||||
styleUrl: 'newsitems.scss',
|
||||
standalone: true,
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
],
|
||||
})
|
||||
export class AddonBlockNewsItemsComponent extends CoreBlockPreRenderedComponent {}
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
// (C) Copyright 2015 Moodle Pty Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
import { NgModule } from '@angular/core';
|
||||
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
import { AddonBlockOnlineUsersComponent } from './onlineusers/onlineusers';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AddonBlockOnlineUsersComponent,
|
||||
],
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
],
|
||||
})
|
||||
export class AddonBlockOnlineUsersComponentsModule {}
|
|
@ -12,6 +12,7 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
import { Component } from '@angular/core';
|
||||
import { CoreBlockPreRenderedComponent } from '@features/block/components/pre-rendered-block/pre-rendered-block';
|
||||
|
||||
|
@ -21,6 +22,10 @@ import { CoreBlockPreRenderedComponent } from '@features/block/components/pre-re
|
|||
@Component({
|
||||
selector: 'addon-block-online-users',
|
||||
templateUrl: '../../../../../core/features/block/components/pre-rendered-block/core-block-pre-rendered.html',
|
||||
styleUrls: ['onlineusers.scss'],
|
||||
styleUrl: 'onlineusers.scss',
|
||||
standalone: true,
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
],
|
||||
})
|
||||
export class AddonBlockOnlineUsersComponent extends CoreBlockPreRenderedComponent {}
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
// (C) Copyright 2015 Moodle Pty Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
import { NgModule } from '@angular/core';
|
||||
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
import { AddonBlockRecentActivityComponent } from './recentactivity/recentactivity';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AddonBlockRecentActivityComponent,
|
||||
],
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
],
|
||||
})
|
||||
export class AddonBlockRecentActivityComponentsModule {}
|
|
@ -12,6 +12,7 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
import { Component } from '@angular/core';
|
||||
import { CoreBlockPreRenderedComponent } from '@features/block/components/pre-rendered-block/pre-rendered-block';
|
||||
|
||||
|
@ -21,6 +22,10 @@ import { CoreBlockPreRenderedComponent } from '@features/block/components/pre-re
|
|||
@Component({
|
||||
selector: 'addon-block-recent-activity',
|
||||
templateUrl: '../../../../../core/features/block/components/pre-rendered-block/core-block-pre-rendered.html',
|
||||
styleUrls: ['recentactivity.scss'],
|
||||
styleUrl: 'recentactivity.scss',
|
||||
standalone: true,
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
],
|
||||
})
|
||||
export class AddonBlockRecentActivityComponent extends CoreBlockPreRenderedComponent {}
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
// (C) Copyright 2015 Moodle Pty Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
import { NgModule } from '@angular/core';
|
||||
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
import { CoreCoursesComponentsModule } from '@features/courses/components/components.module';
|
||||
|
||||
import { AddonBlockRecentlyAccessedCoursesComponent } from './recentlyaccessedcourses/recentlyaccessedcourses';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AddonBlockRecentlyAccessedCoursesComponent,
|
||||
],
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
CoreCoursesComponentsModule,
|
||||
],
|
||||
})
|
||||
export class AddonBlockRecentlyAccessedCoursesComponentsModule {}
|
|
@ -31,6 +31,8 @@ import { AddonCourseCompletion } from '@addons/coursecompletion/services/coursec
|
|||
import { CoreBlockBaseComponent } from '@features/block/classes/base-block-component';
|
||||
import { CoreUtils } from '@services/utils/utils';
|
||||
import { CoreSite } from '@classes/sites/site';
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
import { CoreCoursesComponentsModule } from '@features/courses/components/components.module';
|
||||
|
||||
/**
|
||||
* Component to render a recent courses block.
|
||||
|
@ -38,6 +40,11 @@ import { CoreSite } from '@classes/sites/site';
|
|||
@Component({
|
||||
selector: 'addon-block-recentlyaccessedcourses',
|
||||
templateUrl: 'addon-block-recentlyaccessedcourses.html',
|
||||
standalone: true,
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
CoreCoursesComponentsModule,
|
||||
],
|
||||
})
|
||||
export class AddonBlockRecentlyAccessedCoursesComponent extends CoreBlockBaseComponent implements OnInit, OnDestroy {
|
||||
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
// (C) Copyright 2015 Moodle Pty Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
import { NgModule } from '@angular/core';
|
||||
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
import { CoreCoursesComponentsModule } from '@features/courses/components/components.module';
|
||||
|
||||
import { AddonBlockRecentlyAccessedItemsComponent } from './recentlyaccesseditems/recentlyaccesseditems';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AddonBlockRecentlyAccessedItemsComponent,
|
||||
],
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
CoreCoursesComponentsModule,
|
||||
],
|
||||
})
|
||||
export class AddonBlockRecentlyAccessedItemsComponentsModule {}
|
|
@ -22,6 +22,7 @@ import {
|
|||
import { CoreTextUtils } from '@services/utils/text';
|
||||
import { CoreDomUtils } from '@services/utils/dom';
|
||||
import { CoreUtils } from '@services/utils/utils';
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
|
||||
/**
|
||||
* Component to render a recently accessed items block.
|
||||
|
@ -29,7 +30,11 @@ import { CoreUtils } from '@services/utils/utils';
|
|||
@Component({
|
||||
selector: 'addon-block-recentlyaccesseditems',
|
||||
templateUrl: 'addon-block-recentlyaccesseditems.html',
|
||||
styleUrls: ['recentlyaccesseditems.scss'],
|
||||
styleUrl: 'recentlyaccesseditems.scss',
|
||||
standalone: true,
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
],
|
||||
})
|
||||
export class AddonBlockRecentlyAccessedItemsComponent extends CoreBlockBaseComponent implements OnInit {
|
||||
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
// (C) Copyright 2015 Moodle Pty Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
import { NgModule } from '@angular/core';
|
||||
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
import { AddonBlockRssClientComponent } from './rssclient/rssclient';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AddonBlockRssClientComponent,
|
||||
],
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
],
|
||||
})
|
||||
export class AddonBlockRssClientComponentsModule {}
|
|
@ -12,6 +12,7 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
import { Component } from '@angular/core';
|
||||
import { CoreBlockPreRenderedComponent } from '@features/block/components/pre-rendered-block/pre-rendered-block';
|
||||
|
||||
|
@ -21,6 +22,10 @@ import { CoreBlockPreRenderedComponent } from '@features/block/components/pre-re
|
|||
@Component({
|
||||
selector: 'addon-block-rss-client',
|
||||
templateUrl: '../../../../../core/features/block/components/pre-rendered-block/core-block-pre-rendered.html',
|
||||
styleUrls: ['rssclient.scss'],
|
||||
styleUrl: 'rssclient.scss',
|
||||
standalone: true,
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
],
|
||||
})
|
||||
export class AddonBlockRssClientComponent extends CoreBlockPreRenderedComponent {}
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
// (C) Copyright 2015 Moodle Pty Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
import { NgModule } from '@angular/core';
|
||||
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
import { CoreCourseComponentsModule } from '@features/course/components/components.module';
|
||||
|
||||
import { AddonBlockSiteMainMenuComponent } from './sitemainmenu/sitemainmenu';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AddonBlockSiteMainMenuComponent,
|
||||
],
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
CoreCourseComponentsModule,
|
||||
],
|
||||
})
|
||||
export class AddonBlockSiteMainMenuComponentsModule {}
|
|
@ -19,6 +19,8 @@ import { CoreCourseHelper, CoreCourseSection } from '@features/course/services/c
|
|||
import { CoreSiteHome, FrontPageItemNames } from '@features/sitehome/services/sitehome';
|
||||
import { CoreCourseModulePrefetchDelegate } from '@features/course/services/module-prefetch-delegate';
|
||||
import { CoreBlockBaseComponent } from '@features/block/classes/base-block-component';
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
import { CoreCourseComponentsModule } from '@features/course/components/components.module';
|
||||
|
||||
/**
|
||||
* Component to render a site main menu block.
|
||||
|
@ -26,6 +28,11 @@ import { CoreBlockBaseComponent } from '@features/block/classes/base-block-compo
|
|||
@Component({
|
||||
selector: 'addon-block-sitemainmenu',
|
||||
templateUrl: 'addon-block-sitemainmenu.html',
|
||||
standalone: true,
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
CoreCourseComponentsModule,
|
||||
],
|
||||
})
|
||||
export class AddonBlockSiteMainMenuComponent extends CoreBlockBaseComponent implements OnInit {
|
||||
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
// (C) Copyright 2015 Moodle Pty Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
import { NgModule } from '@angular/core';
|
||||
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
import { CoreCoursesComponentsModule } from '@features/courses/components/components.module';
|
||||
|
||||
import { AddonBlockStarredCoursesComponent } from './starredcourses/starredcourses';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AddonBlockStarredCoursesComponent,
|
||||
],
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
CoreCoursesComponentsModule,
|
||||
],
|
||||
})
|
||||
export class AddonBlockStarredCoursesComponentsModule {}
|
|
@ -26,6 +26,8 @@ import { CoreBlockBaseComponent } from '@features/block/classes/base-block-compo
|
|||
import { CoreUtils } from '@services/utils/utils';
|
||||
import { CoreSite } from '@classes/sites/site';
|
||||
import { AddonBlockStarredCourse, AddonBlockStarredCourses } from '../../services/starredcourses';
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
import { CoreCoursesComponentsModule } from '@features/courses/components/components.module';
|
||||
|
||||
/**
|
||||
* Component to render a starred courses block.
|
||||
|
@ -33,6 +35,11 @@ import { AddonBlockStarredCourse, AddonBlockStarredCourses } from '../../service
|
|||
@Component({
|
||||
selector: 'addon-block-starredcourses',
|
||||
templateUrl: 'addon-block-starredcourses.html',
|
||||
standalone: true,
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
CoreCoursesComponentsModule,
|
||||
],
|
||||
})
|
||||
export class AddonBlockStarredCoursesComponent extends CoreBlockBaseComponent implements OnInit, OnDestroy {
|
||||
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
// (C) Copyright 2015 Moodle Pty Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
import { NgModule } from '@angular/core';
|
||||
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
import { AddonBlockTagsComponent } from './tags/tags';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AddonBlockTagsComponent,
|
||||
],
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
],
|
||||
})
|
||||
export class AddonBlockTagsComponentsModule {}
|
|
@ -12,6 +12,7 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
import { Component } from '@angular/core';
|
||||
import { CoreBlockPreRenderedComponent } from '@features/block/components/pre-rendered-block/pre-rendered-block';
|
||||
|
||||
|
@ -21,6 +22,10 @@ import { CoreBlockPreRenderedComponent } from '@features/block/components/pre-re
|
|||
@Component({
|
||||
selector: 'addon-block-tags',
|
||||
templateUrl: '../../../../../core/features/block/components/pre-rendered-block/core-block-pre-rendered.html',
|
||||
styleUrls: ['tags.scss'],
|
||||
styleUrl: 'tags.scss',
|
||||
standalone: true,
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
],
|
||||
})
|
||||
export class AddonBlockTagsComponent extends CoreBlockPreRenderedComponent {}
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
// (C) Copyright 2015 Moodle Pty Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
import { NgModule } from '@angular/core';
|
||||
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
|
||||
import { AddonBlockTimelineComponent } from './timeline/timeline';
|
||||
import { AddonBlockTimelineEventsComponent } from './events/events';
|
||||
import { CoreSearchComponentsModule } from '@features/search/components/components.module';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AddonBlockTimelineComponent,
|
||||
AddonBlockTimelineEventsComponent,
|
||||
],
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
CoreSearchComponentsModule,
|
||||
],
|
||||
})
|
||||
export class AddonBlockTimelineComponentsModule {}
|
|
@ -18,6 +18,7 @@ import { CoreDomUtils } from '@services/utils/dom';
|
|||
import { CoreTextUtils } from '@services/utils/text';
|
||||
import { CoreEnrolledCourseDataWithOptions } from '@features/courses/services/courses-helper';
|
||||
import { AddonBlockTimelineDayEvents } from '@addons/block/timeline/classes/section';
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
|
||||
/**
|
||||
* Directive to render a list of events in course overview.
|
||||
|
@ -25,7 +26,11 @@ import { AddonBlockTimelineDayEvents } from '@addons/block/timeline/classes/sect
|
|||
@Component({
|
||||
selector: 'addon-block-timeline-events',
|
||||
templateUrl: 'addon-block-timeline-events.html',
|
||||
styleUrls: ['events.scss'],
|
||||
styleUrl: 'events.scss',
|
||||
standalone: true,
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
],
|
||||
})
|
||||
export class AddonBlockTimelineEventsComponent implements OnInit {
|
||||
|
||||
|
|
|
@ -27,6 +27,9 @@ import { AddonBlockTimelineDateRange, AddonBlockTimelineSection } from '@addons/
|
|||
import { FormControl } from '@angular/forms';
|
||||
import { formControlValue, resolved } from '@/core/utils/rxjs';
|
||||
import { CoreLogger } from '@singletons/logger';
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
import { CoreSearchComponentsModule } from '@features/search/components/components.module';
|
||||
import { AddonBlockTimelineEventsComponent } from '../events/events';
|
||||
|
||||
/**
|
||||
* Component to render a timeline block.
|
||||
|
@ -34,8 +37,14 @@ import { CoreLogger } from '@singletons/logger';
|
|||
@Component({
|
||||
selector: 'addon-block-timeline',
|
||||
templateUrl: 'addon-block-timeline.html',
|
||||
styleUrls: ['timeline.scss'],
|
||||
styleUrl: 'timeline.scss',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
standalone: true,
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
CoreSearchComponentsModule,
|
||||
AddonBlockTimelineEventsComponent,
|
||||
],
|
||||
})
|
||||
export class AddonBlockTimelineComponent implements OnInit, ICoreBlockComponent {
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
|
||||
import { CUSTOM_ELEMENTS_SCHEMA, NgModule, Type } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
@ -48,7 +48,6 @@ import { CoreSendMessageFormComponent } from './send-message-form/send-message-f
|
|||
import { CoreShowPasswordComponent } from './show-password/show-password';
|
||||
import { CoreSitePickerComponent } from './site-picker/site-picker';
|
||||
import { CoreSplitViewComponent } from './split-view/split-view';
|
||||
import { CoreStyleComponent } from './style/style';
|
||||
import { CoreTabComponent } from './tabs/tab';
|
||||
import { CoreTabsComponent } from './tabs/tabs';
|
||||
import { CoreTabsOutletComponent } from './tabs-outlet/tabs-outlet';
|
||||
|
@ -67,6 +66,20 @@ import { CoreSheetModalComponent } from '@components/sheet-modal/sheet-modal';
|
|||
import { CoreCourseImageComponent } from '@components/course-image/course-image';
|
||||
import { CoreSitesListComponent } from './sites-list/sites-list';
|
||||
|
||||
/**
|
||||
* Get standalone components for site plugins.
|
||||
*
|
||||
* @returns Returns core standalone components.
|
||||
*/
|
||||
export async function getCoreStandaloneComponents(): Promise<Type<unknown>[]> {
|
||||
// eslint-disable-next-line deprecation/deprecation
|
||||
const { CoreStyleComponent } = await import('@components/style/style');
|
||||
|
||||
return [
|
||||
CoreStyleComponent,
|
||||
];
|
||||
}
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
CoreAttachmentsComponent,
|
||||
|
@ -100,8 +113,6 @@ import { CoreSitesListComponent } from './sites-list/sites-list';
|
|||
CoreShowPasswordComponent, // eslint-disable-line deprecation/deprecation
|
||||
CoreSitePickerComponent,
|
||||
CoreSplitViewComponent,
|
||||
// eslint-disable-next-line deprecation/deprecation
|
||||
CoreStyleComponent,
|
||||
CoreSwipeSlidesComponent,
|
||||
CoreTabComponent,
|
||||
CoreTabsComponent,
|
||||
|
@ -156,8 +167,6 @@ import { CoreSitesListComponent } from './sites-list/sites-list';
|
|||
CoreShowPasswordComponent, // eslint-disable-line deprecation/deprecation
|
||||
CoreSitePickerComponent,
|
||||
CoreSplitViewComponent,
|
||||
// eslint-disable-next-line deprecation/deprecation
|
||||
CoreStyleComponent,
|
||||
CoreSwipeSlidesComponent,
|
||||
CoreTabComponent,
|
||||
CoreTabsComponent,
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
import { Component, ElementRef, Input, OnChanges } from '@angular/core';
|
||||
import { CoreDom } from '@singletons/dom';
|
||||
|
||||
|
@ -24,11 +25,15 @@ import { CoreDom } from '@singletons/dom';
|
|||
* Example:
|
||||
*
|
||||
* <core-style [css]="'p { color: red; }'" prefix=".custom-rules"></core-style>
|
||||
* @deprecated since 4.5.0. Not needed anymore, core-compile-html accepts now CSS code.
|
||||
* @deprecated since 4.5. Not needed anymore, core-compile-html accepts now CSS code.
|
||||
*/
|
||||
@Component({
|
||||
selector: 'core-style',
|
||||
template: '',
|
||||
standalone: true,
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
],
|
||||
})
|
||||
export class CoreStyleComponent implements OnChanges {
|
||||
|
||||
|
|
|
@ -16,12 +16,10 @@ import {
|
|||
Injectable,
|
||||
Injector,
|
||||
Component,
|
||||
NgModule,
|
||||
ComponentRef,
|
||||
NO_ERRORS_SCHEMA,
|
||||
Type,
|
||||
Provider,
|
||||
createNgModule,
|
||||
ViewContainerRef,
|
||||
} from '@angular/core';
|
||||
import {
|
||||
|
@ -43,7 +41,7 @@ import { getCoreServices } from '@/core/core.module';
|
|||
import { getBlockServices } from '@features/block/block.module';
|
||||
import { getCommentsServices } from '@features/comments/comments.module';
|
||||
import { getContentLinksExportedObjects, getContentLinksServices } from '@features/contentlinks/contentlinks.module';
|
||||
import { getCourseExportedObjects, getCourseServices } from '@features/course/course.module';
|
||||
import { getCourseExportedObjects, getCourseServices, getCourseStandaloneComponents } from '@features/course/course.module';
|
||||
import { getCoursesServices } from '@features/courses/courses.module';
|
||||
import { getEditorServices } from '@features/editor/editor.module';
|
||||
import { getEnrolServices } from '@features/enrol/enrol.module';
|
||||
|
@ -77,9 +75,13 @@ import { Md5 } from 'ts-md5/dist/md5';
|
|||
// Import core classes that can be useful for site plugins.
|
||||
import { CoreSyncBaseProvider } from '@classes/base-sync';
|
||||
import { CoreArray } from '@singletons/array';
|
||||
import { CoreColors } from '@singletons/colors';
|
||||
import { CoreDirectivesRegistry } from '@singletons/directives-registry';
|
||||
import { CoreDom } from '@singletons/dom';
|
||||
import { CoreForms } from '@singletons/form';
|
||||
import { CoreKeyboard } from '@singletons/keyboard';
|
||||
import { CoreObject } from '@singletons/object';
|
||||
import { CorePath } from '@singletons/path';
|
||||
import { CoreText } from '@singletons/text';
|
||||
import { CoreTime } from '@singletons/time';
|
||||
import { CoreUrl } from '@singletons/url';
|
||||
|
@ -116,6 +118,9 @@ import { getNotesServices } from '@addons/notes/notes.module';
|
|||
import { getNotificationsServices } from '@addons/notifications/notifications.module';
|
||||
import { getPrivateFilesServices } from '@addons/privatefiles/privatefiles.module';
|
||||
|
||||
// Import standalone components used by site plugins.
|
||||
import { getCoreStandaloneComponents } from '@components/components.module';
|
||||
|
||||
// Import some addon modules that define components, directives and pipes. Only import the important ones.
|
||||
import { CorePromisedValue } from '@classes/promised-value';
|
||||
import { CorePlatform } from '@services/platform';
|
||||
|
@ -157,6 +162,8 @@ export class CoreCompileProvider {
|
|||
getModAssignComponentModules,
|
||||
getModQuizComponentModules,
|
||||
getModWorkshopComponentModules,
|
||||
getCoreStandaloneComponents,
|
||||
getCourseStandaloneComponents,
|
||||
];
|
||||
|
||||
protected componentId = 0;
|
||||
|
@ -187,13 +194,6 @@ export class CoreCompileProvider {
|
|||
// Import the Angular compiler to be able to compile components in runtime.
|
||||
await import('@angular/compiler');
|
||||
|
||||
// Create the component using the template and the class.
|
||||
const component = Component({
|
||||
template,
|
||||
host: { 'compiled-component-id': String(this.componentId++) },
|
||||
styles,
|
||||
})(componentClass);
|
||||
|
||||
const lazyImports = await Promise.all(this.LAZY_IMPORTS.map(getModules => getModules()));
|
||||
const imports = [
|
||||
...lazyImports.flat(),
|
||||
|
@ -201,20 +201,21 @@ export class CoreCompileProvider {
|
|||
...extraImports,
|
||||
];
|
||||
|
||||
// Create the component using the template and the class.
|
||||
const component = Component({
|
||||
template,
|
||||
host: { 'compiled-component-id': String(this.componentId++) },
|
||||
styles,
|
||||
standalone: true,
|
||||
imports,
|
||||
schemas: [NO_ERRORS_SCHEMA],
|
||||
})(componentClass);
|
||||
|
||||
try {
|
||||
viewContainerRef.clear();
|
||||
|
||||
// Now create the module containing the component.
|
||||
const ngModuleRef = createNgModule(
|
||||
NgModule({ imports, declarations: [component], schemas: [NO_ERRORS_SCHEMA] })(class {}),
|
||||
this.injector,
|
||||
);
|
||||
|
||||
return viewContainerRef.createComponent(
|
||||
component,
|
||||
{
|
||||
environmentInjector: ngModuleRef,
|
||||
},
|
||||
);
|
||||
} catch (error) {
|
||||
this.logger.error('Error compiling template', template);
|
||||
|
@ -299,13 +300,17 @@ export class CoreCompileProvider {
|
|||
* Keeping this a bit more to avoid plugins breaking.
|
||||
*/
|
||||
instance['Network'] = CoreNetwork.instance;
|
||||
instance['CoreSyncBaseProvider'] = CoreSyncBaseProvider;
|
||||
instance['CoreArray'] = CoreArray;
|
||||
instance['CoreDirectivesRegistry'] = CoreDirectivesRegistry;
|
||||
instance['CoreNetwork'] = CoreNetwork.instance;
|
||||
instance['CorePlatform'] = CorePlatform.instance;
|
||||
instance['CoreSyncBaseProvider'] = CoreSyncBaseProvider;
|
||||
instance['CoreArray'] = CoreArray;
|
||||
instance['CoreColors'] = CoreColors;
|
||||
instance['CoreDirectivesRegistry'] = CoreDirectivesRegistry;
|
||||
instance['CoreDom'] = CoreDom;
|
||||
instance['CoreForms'] = CoreForms;
|
||||
instance['CoreKeyboard'] = CoreKeyboard;
|
||||
instance['CoreObject'] = CoreObject;
|
||||
instance['CorePath'] = CorePath;
|
||||
instance['CoreText'] = CoreText;
|
||||
instance['CoreTime'] = CoreTime;
|
||||
instance['CoreUrl'] = CoreUrl;
|
||||
|
|
|
@ -19,13 +19,11 @@ import { CoreBlockComponentsModule } from '@features/block/components/components
|
|||
import { CoreCourseFormatComponent } from './course-format/course-format';
|
||||
import { CoreCourseModuleComponent } from './module/module';
|
||||
import { CoreCourseModuleCompletionComponent } from './module-completion/module-completion';
|
||||
import { CoreCourseModuleDescriptionComponent } from './module-description/module-description';
|
||||
import { CoreCourseCourseIndexComponent } from './course-index/course-index';
|
||||
import { CoreCourseTagAreaComponent } from './tag-area/tag-area';
|
||||
import { CoreCourseUnsupportedModuleComponent } from './unsupported-module/unsupported-module';
|
||||
import { CoreCourseModuleCompletionLegacyComponent } from './module-completion-legacy/module-completion-legacy';
|
||||
import { CoreCourseModuleInfoComponent } from './module-info/module-info';
|
||||
import { CoreCourseModuleManualCompletionComponent } from './module-manual-completion/module-manual-completion';
|
||||
import { CoreCourseModuleNavigationComponent } from './module-navigation/module-navigation';
|
||||
import { CoreCourseModuleSummaryComponent } from './module-summary/module-summary';
|
||||
import { CoreCourseCourseIndexTourComponent } from './course-index-tour/course-index-tour';
|
||||
|
@ -38,11 +36,7 @@ import { CoreCourseModuleCompletionDetailsComponent } from './module-completion-
|
|||
CoreCourseModuleComponent,
|
||||
CoreCourseModuleCompletionComponent,
|
||||
CoreCourseModuleCompletionLegacyComponent,
|
||||
// eslint-disable-next-line deprecation/deprecation
|
||||
CoreCourseModuleDescriptionComponent,
|
||||
CoreCourseModuleInfoComponent,
|
||||
// eslint-disable-next-line deprecation/deprecation
|
||||
CoreCourseModuleManualCompletionComponent,
|
||||
CoreCourseCourseIndexComponent,
|
||||
CoreCourseCourseIndexTourComponent,
|
||||
CoreCourseTagAreaComponent,
|
||||
|
@ -61,11 +55,7 @@ import { CoreCourseModuleCompletionDetailsComponent } from './module-completion-
|
|||
CoreCourseModuleComponent,
|
||||
CoreCourseModuleCompletionComponent,
|
||||
CoreCourseModuleCompletionLegacyComponent,
|
||||
// eslint-disable-next-line deprecation/deprecation
|
||||
CoreCourseModuleDescriptionComponent,
|
||||
CoreCourseModuleInfoComponent,
|
||||
// eslint-disable-next-line deprecation/deprecation
|
||||
CoreCourseModuleManualCompletionComponent,
|
||||
CoreCourseCourseIndexComponent,
|
||||
CoreCourseCourseIndexTourComponent,
|
||||
CoreCourseTagAreaComponent,
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
// limitations under the License.
|
||||
|
||||
import { ContextLevel } from '@/core/constants';
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
import { Component, HostBinding, Input } from '@angular/core';
|
||||
|
||||
/**
|
||||
|
@ -37,6 +38,10 @@ import { Component, HostBinding, Input } from '@angular/core';
|
|||
@Component({
|
||||
selector: 'core-course-module-description',
|
||||
templateUrl: 'core-course-module-description.html',
|
||||
standalone: true,
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
],
|
||||
})
|
||||
export class CoreCourseModuleDescriptionComponent {
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
import { Component, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output, SimpleChange } from '@angular/core';
|
||||
import { CoreCourseHelper, CoreCourseModuleCompletionData } from '@features/course/services/course-helper';
|
||||
import { CoreUser } from '@features/user/services/user';
|
||||
|
@ -26,6 +27,10 @@ import { CoreEventObserver, CoreEvents } from '@singletons/events';
|
|||
@Component({
|
||||
selector: 'core-course-module-manual-completion',
|
||||
templateUrl: 'core-course-module-manual-completion.html',
|
||||
standalone: true,
|
||||
imports: [
|
||||
CoreSharedModule,
|
||||
],
|
||||
})
|
||||
export class CoreCourseModuleManualCompletionComponent implements OnInit, OnChanges, OnDestroy {
|
||||
|
||||
|
|
|
@ -87,6 +87,25 @@ export async function getCourseExportedObjects(): Promise<Record<string, unknown
|
|||
/* eslint-enable @typescript-eslint/naming-convention */
|
||||
}
|
||||
|
||||
/**
|
||||
* Get standalone components for site plugins.
|
||||
*
|
||||
* @returns Returns standalone components.
|
||||
*/
|
||||
export async function getCourseStandaloneComponents(): Promise<Type<unknown>[]> {
|
||||
// eslint-disable-next-line deprecation/deprecation
|
||||
const { CoreCourseModuleDescriptionComponent } =
|
||||
await import('@features/course/components/module-description/module-description');
|
||||
// eslint-disable-next-line deprecation/deprecation
|
||||
const { CoreCourseModuleManualCompletionComponent } =
|
||||
await import('@features/course/components/module-manual-completion/module-manual-completion');
|
||||
|
||||
return [
|
||||
CoreCourseModuleDescriptionComponent,
|
||||
CoreCourseModuleManualCompletionComponent,
|
||||
];
|
||||
}
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
matcher: buildRegExpUrlMatcher(new RegExp(`^${COURSE_PAGE_NAME}(/deep)*`)),
|
||||
|
|
|
@ -20,8 +20,8 @@ Feature: Use custom communication link in course
|
|||
And I navigate to "Communication" in current page administration
|
||||
And I select "Custom link" from the "Provider" singleselect
|
||||
And I set the following fields to these values:
|
||||
| communicationroomname | Test URL |
|
||||
| customlinkurl | #wwwroot#/communication/provider/customlink/tests/behat/fixtures/custom_link_test_page.php |
|
||||
| communication_customlinkroomname | Test URL |
|
||||
| customlinkurl | #wwwroot#/communication/provider/customlink/tests/behat/fixtures/custom_link_test_page.php |
|
||||
And I press "Save changes"
|
||||
|
||||
Scenario: Use communication link
|
||||
|
|
|
@ -30,6 +30,11 @@ export class CoreCoursesLinksHandlerBase extends CoreContentLinksHandlerBase {
|
|||
|
||||
/**
|
||||
* Get actions to open course content.
|
||||
*
|
||||
* @param url URL to treat.
|
||||
* @param courseId Course ID.
|
||||
* @param pageParams Params to send to the new page.
|
||||
* @returns Promise resolved with the actions.
|
||||
*/
|
||||
protected getCourseActions(url: string, courseId: number, pageParams: Params = {}): CoreContentLinksAction[] {
|
||||
return [{
|
||||
|
|
|
@ -550,7 +550,7 @@ export class CoreEditorRichTextEditorComponent implements OnInit, AfterViewInit,
|
|||
/**
|
||||
* Check if text is empty.
|
||||
*
|
||||
* @param value Text or element containing the text.
|
||||
* @param valueOrEl Text or element containing the text.
|
||||
* @returns If value is null only a white space.
|
||||
*/
|
||||
protected isNullOrWhiteSpace(valueOrEl: string | HTMLElement | null | undefined): boolean {
|
||||
|
|
|
@ -510,8 +510,12 @@ export class CoreLoginHelperProvider {
|
|||
* @deprecated since 4.4. Please use isFeatureDisabled in a site instance.
|
||||
*/
|
||||
isFeatureDisabled(feature: string, config?: CoreSitePublicConfigResponse): boolean {
|
||||
// eslint-disable-next-line deprecation/deprecation
|
||||
return this.isFeatureDisabled(feature, config);
|
||||
// eslint-disable-next-line deprecation/deprecation
|
||||
const disabledFeatures = this.getDisabledFeatures(config);
|
||||
|
||||
const regEx = new RegExp('(,|^)' + feature + '(,|$)', 'g');
|
||||
|
||||
return !!disabledFeatures.match(regEx);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -26,8 +26,6 @@ import { CoreTagListComponent } from './list/list';
|
|||
imports: [
|
||||
CoreSharedModule,
|
||||
],
|
||||
providers: [
|
||||
],
|
||||
exports: [
|
||||
CoreTagFeedComponent,
|
||||
CoreTagListComponent,
|
||||
|
|
|
@ -26,8 +26,6 @@ import { CoreUserTagAreaComponent } from './tag-area/tag-area';
|
|||
imports: [
|
||||
CoreSharedModule,
|
||||
],
|
||||
providers: [
|
||||
],
|
||||
exports: [
|
||||
CoreUserProfileFieldComponent,
|
||||
CoreUserTagAreaComponent,
|
||||
|
|
Loading…
Reference in New Issue