diff --git a/src/addons/mod/assign/services/handlers/module.ts b/src/addons/mod/assign/services/handlers/module.ts index 7b1395e0f..bb8f569fd 100644 --- a/src/addons/mod/assign/services/handlers/module.ts +++ b/src/addons/mod/assign/services/handlers/module.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { CoreConstants } from '@/core/constants'; +import { CoreConstants, ModPurpose } from '@/core/constants'; import { Injectable, Type } from '@angular/core'; import { CoreCourseModuleHandler } from '@features/course/services/module-delegate'; import { AddonModAssignIndexComponent } from '../../components/index'; @@ -44,6 +44,7 @@ export class AddonModAssignModuleHandlerService extends CoreModuleHandlerBase im [CoreConstants.FEATURE_ADVANCED_GRADING]: true, [CoreConstants.FEATURE_PLAGIARISM]: true, [CoreConstants.FEATURE_COMMENT]: true, + [CoreConstants.FEATURE_MOD_PURPOSE]: ModPurpose.MOD_PURPOSE_ASSESSMENT, }; /** diff --git a/src/addons/mod/book/services/handlers/module.ts b/src/addons/mod/book/services/handlers/module.ts index ca5fcdd4d..322737a81 100644 --- a/src/addons/mod/book/services/handlers/module.ts +++ b/src/addons/mod/book/services/handlers/module.ts @@ -15,7 +15,7 @@ import { Injectable, Type } from '@angular/core'; import { AddonModBookIndexComponent } from '../../components/index'; import { AddonModBook } from '../book'; -import { CoreConstants } from '@/core/constants'; +import { CoreConstants, ModPurpose } from '@/core/constants'; import { CoreCourseModuleHandler } from '@features/course/services/module-delegate'; import { makeSingleton } from '@singletons'; import { CoreModuleHandlerBase } from '@features/course/classes/module-base-handler'; @@ -42,6 +42,7 @@ export class AddonModBookModuleHandlerService extends CoreModuleHandlerBase impl [CoreConstants.FEATURE_GRADE_OUTCOMES]: false, [CoreConstants.FEATURE_BACKUP_MOODLE2]: true, [CoreConstants.FEATURE_SHOW_DESCRIPTION]: true, + [CoreConstants.FEATURE_MOD_PURPOSE]: ModPurpose.MOD_PURPOSE_CONTENT, }; /** diff --git a/src/addons/mod/chat/services/handlers/module.ts b/src/addons/mod/chat/services/handlers/module.ts index 16cfa87aa..c8f32227e 100644 --- a/src/addons/mod/chat/services/handlers/module.ts +++ b/src/addons/mod/chat/services/handlers/module.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { CoreConstants } from '@/core/constants'; +import { CoreConstants, ModPurpose } from '@/core/constants'; import { Injectable, Type } from '@angular/core'; import { CoreModuleHandlerBase } from '@features/course/classes/module-base-handler'; import { CoreCourseModuleHandler } from '@features/course/services/module-delegate'; @@ -40,6 +40,7 @@ export class AddonModChatModuleHandlerService extends CoreModuleHandlerBase impl [CoreConstants.FEATURE_GRADE_OUTCOMES]: true, [CoreConstants.FEATURE_BACKUP_MOODLE2]: true, [CoreConstants.FEATURE_SHOW_DESCRIPTION]: true, + [CoreConstants.FEATURE_MOD_PURPOSE]: ModPurpose.MOD_PURPOSE_COMMUNICATION, }; /** diff --git a/src/addons/mod/choice/services/handlers/module.ts b/src/addons/mod/choice/services/handlers/module.ts index 532204f81..70e3a3834 100644 --- a/src/addons/mod/choice/services/handlers/module.ts +++ b/src/addons/mod/choice/services/handlers/module.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { CoreConstants } from '@/core/constants'; +import { CoreConstants, ModPurpose } from '@/core/constants'; import { Injectable, Type } from '@angular/core'; import { CoreModuleHandlerBase } from '@features/course/classes/module-base-handler'; import { CoreCourseModuleHandler } from '@features/course/services/module-delegate'; @@ -41,6 +41,7 @@ export class AddonModChoiceModuleHandlerService extends CoreModuleHandlerBase im [CoreConstants.FEATURE_GRADE_OUTCOMES]: false, [CoreConstants.FEATURE_BACKUP_MOODLE2]: true, [CoreConstants.FEATURE_SHOW_DESCRIPTION]: true, + [CoreConstants.FEATURE_MOD_PURPOSE]: ModPurpose.MOD_PURPOSE_COMMUNICATION, }; /** diff --git a/src/addons/mod/data/services/handlers/module.ts b/src/addons/mod/data/services/handlers/module.ts index dc930ee0f..c170d8779 100644 --- a/src/addons/mod/data/services/handlers/module.ts +++ b/src/addons/mod/data/services/handlers/module.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { CoreConstants } from '@/core/constants'; +import { CoreConstants, ModPurpose } from '@/core/constants'; import { Injectable, Type } from '@angular/core'; import { CoreModuleHandlerBase } from '@features/course/classes/module-base-handler'; import { CoreCourseModuleHandler } from '@features/course/services/module-delegate'; @@ -43,6 +43,7 @@ export class AddonModDataModuleHandlerService extends CoreModuleHandlerBase impl [CoreConstants.FEATURE_SHOW_DESCRIPTION]: true, [CoreConstants.FEATURE_RATE]: true, [CoreConstants.FEATURE_COMMENT]: true, + [CoreConstants.FEATURE_MOD_PURPOSE]: ModPurpose.MOD_PURPOSE_COLLABORATION, }; /** diff --git a/src/addons/mod/feedback/services/handlers/module.ts b/src/addons/mod/feedback/services/handlers/module.ts index da1fedf27..68e0164fe 100644 --- a/src/addons/mod/feedback/services/handlers/module.ts +++ b/src/addons/mod/feedback/services/handlers/module.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { CoreConstants } from '@/core/constants'; +import { CoreConstants, ModPurpose } from '@/core/constants'; import { Injectable, Type } from '@angular/core'; import { CoreCourseModuleHandler } from '@features/course/services/module-delegate'; import { makeSingleton } from '@singletons'; @@ -41,6 +41,7 @@ export class AddonModFeedbackModuleHandlerService extends CoreModuleHandlerBase [CoreConstants.FEATURE_GRADE_OUTCOMES]: false, [CoreConstants.FEATURE_BACKUP_MOODLE2]: true, [CoreConstants.FEATURE_SHOW_DESCRIPTION]: true, + [CoreConstants.FEATURE_MOD_PURPOSE]: ModPurpose.MOD_PURPOSE_COMMUNICATION, }; /** diff --git a/src/addons/mod/folder/services/handlers/module.ts b/src/addons/mod/folder/services/handlers/module.ts index b127b468c..63dbc0df4 100644 --- a/src/addons/mod/folder/services/handlers/module.ts +++ b/src/addons/mod/folder/services/handlers/module.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { CoreConstants } from '@/core/constants'; +import { CoreConstants, ModPurpose } from '@/core/constants'; import { Injectable, Type } from '@angular/core'; import { CoreModuleHandlerBase } from '@features/course/classes/module-base-handler'; import { CoreCourseModuleHandler } from '@features/course/services/module-delegate'; @@ -41,6 +41,7 @@ export class AddonModFolderModuleHandlerService extends CoreModuleHandlerBase im [CoreConstants.FEATURE_GRADE_OUTCOMES]: false, [CoreConstants.FEATURE_BACKUP_MOODLE2]: true, [CoreConstants.FEATURE_SHOW_DESCRIPTION]: true, + [CoreConstants.FEATURE_MOD_PURPOSE]: ModPurpose.MOD_PURPOSE_CONTENT, }; /** diff --git a/src/addons/mod/forum/services/handlers/module.ts b/src/addons/mod/forum/services/handlers/module.ts index f4ad76e60..a750b83b6 100644 --- a/src/addons/mod/forum/services/handlers/module.ts +++ b/src/addons/mod/forum/services/handlers/module.ts @@ -19,7 +19,7 @@ import { CoreEvents } from '@singletons/events'; import { CoreSites } from '@services/sites'; import { CoreUtils } from '@services/utils/utils'; import { CoreCourseModuleHandler, CoreCourseModuleHandlerData } from '@features/course/services/module-delegate'; -import { CoreConstants } from '@/core/constants'; +import { CoreConstants, ModPurpose } from '@/core/constants'; import { AddonModForumIndexComponent } from '../../components/index'; import { CoreModuleHandlerBase } from '@features/course/classes/module-base-handler'; import { CoreCourseModuleData } from '@features/course/services/course-helper'; @@ -48,6 +48,7 @@ export class AddonModForumModuleHandlerService extends CoreModuleHandlerBase imp [CoreConstants.FEATURE_SHOW_DESCRIPTION]: true, [CoreConstants.FEATURE_RATE]: true, [CoreConstants.FEATURE_PLAGIARISM]: true, + [CoreConstants.FEATURE_MOD_PURPOSE]: ModPurpose.MOD_PURPOSE_COLLABORATION, }; /** diff --git a/src/addons/mod/glossary/services/handlers/module.ts b/src/addons/mod/glossary/services/handlers/module.ts index b7eb1a0f6..a5240ab82 100644 --- a/src/addons/mod/glossary/services/handlers/module.ts +++ b/src/addons/mod/glossary/services/handlers/module.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { CoreConstants } from '@/core/constants'; +import { CoreConstants, ModPurpose } from '@/core/constants'; import { Injectable, Type } from '@angular/core'; import { CoreModuleHandlerBase } from '@features/course/classes/module-base-handler'; import { CoreCourseModuleHandler } from '@features/course/services/module-delegate'; @@ -43,6 +43,7 @@ export class AddonModGlossaryModuleHandlerService extends CoreModuleHandlerBase [CoreConstants.FEATURE_SHOW_DESCRIPTION]: true, [CoreConstants.FEATURE_RATE]: true, [CoreConstants.FEATURE_PLAGIARISM]: true, + [CoreConstants.FEATURE_MOD_PURPOSE]: ModPurpose.MOD_PURPOSE_COLLABORATION, }; /** diff --git a/src/addons/mod/h5pactivity/services/handlers/module.ts b/src/addons/mod/h5pactivity/services/handlers/module.ts index dfa1c7900..c6473702b 100644 --- a/src/addons/mod/h5pactivity/services/handlers/module.ts +++ b/src/addons/mod/h5pactivity/services/handlers/module.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { CoreConstants } from '@/core/constants'; +import { CoreConstants, ModPurpose } from '@/core/constants'; import { Injectable, Type } from '@angular/core'; import { CoreModuleHandlerBase } from '@features/course/classes/module-base-handler'; import { CoreCourseModuleHandler } from '@features/course/services/module-delegate'; @@ -42,6 +42,7 @@ export class AddonModH5PActivityModuleHandlerService extends CoreModuleHandlerBa [CoreConstants.FEATURE_GRADE_HAS_GRADE]: true, [CoreConstants.FEATURE_GRADE_OUTCOMES]: true, [CoreConstants.FEATURE_BACKUP_MOODLE2]: true, + [CoreConstants.FEATURE_MOD_PURPOSE]: ModPurpose.MOD_PURPOSE_CONTENT, }; /** diff --git a/src/addons/mod/imscp/services/handlers/module.ts b/src/addons/mod/imscp/services/handlers/module.ts index d1dea4491..369c111cc 100644 --- a/src/addons/mod/imscp/services/handlers/module.ts +++ b/src/addons/mod/imscp/services/handlers/module.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { CoreConstants } from '@/core/constants'; +import { CoreConstants, ModPurpose } from '@/core/constants'; import { Injectable, Type } from '@angular/core'; import { CoreModuleHandlerBase } from '@features/course/classes/module-base-handler'; import { CoreCourseModuleHandler } from '@features/course/services/module-delegate'; @@ -42,6 +42,7 @@ export class AddonModImscpModuleHandlerService extends CoreModuleHandlerBase imp [CoreConstants.FEATURE_GRADE_OUTCOMES]: false, [CoreConstants.FEATURE_BACKUP_MOODLE2]: true, [CoreConstants.FEATURE_SHOW_DESCRIPTION]: true, + [CoreConstants.FEATURE_MOD_PURPOSE]: ModPurpose.MOD_PURPOSE_CONTENT, }; /** diff --git a/src/addons/mod/label/services/handlers/module.ts b/src/addons/mod/label/services/handlers/module.ts index f7cc33d6a..ec9ce00a2 100644 --- a/src/addons/mod/label/services/handlers/module.ts +++ b/src/addons/mod/label/services/handlers/module.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { CoreConstants } from '@/core/constants'; +import { CoreConstants, ModPurpose } from '@/core/constants'; import { Injectable } from '@angular/core'; import { CoreModuleHandlerBase } from '@features/course/classes/module-base-handler'; import { CoreCourseModuleData } from '@features/course/services/course-helper'; @@ -40,6 +40,7 @@ export class AddonModLabelModuleHandlerService extends CoreModuleHandlerBase imp [CoreConstants.FEATURE_BACKUP_MOODLE2]: true, [CoreConstants.FEATURE_SHOW_DESCRIPTION]: true, [CoreConstants.FEATURE_NO_VIEW_LINK]: true, + [CoreConstants.FEATURE_MOD_PURPOSE]: ModPurpose.MOD_PURPOSE_CONTENT, }; /** diff --git a/src/addons/mod/lesson/services/handlers/module.ts b/src/addons/mod/lesson/services/handlers/module.ts index 7563848e7..897b65381 100644 --- a/src/addons/mod/lesson/services/handlers/module.ts +++ b/src/addons/mod/lesson/services/handlers/module.ts @@ -14,7 +14,7 @@ import { Injectable, Type } from '@angular/core'; -import { CoreConstants } from '@/core/constants'; +import { CoreConstants, ModPurpose } from '@/core/constants'; import { CoreCourseModuleHandler } from '@features/course/services/module-delegate'; import { AddonModLessonIndexComponent } from '../../components/index'; import { makeSingleton } from '@singletons'; @@ -42,6 +42,7 @@ export class AddonModLessonModuleHandlerService extends CoreModuleHandlerBase im [CoreConstants.FEATURE_GRADE_OUTCOMES]: true, [CoreConstants.FEATURE_BACKUP_MOODLE2]: true, [CoreConstants.FEATURE_SHOW_DESCRIPTION]: true, + [CoreConstants.FEATURE_MOD_PURPOSE]: ModPurpose.MOD_PURPOSE_CONTENT, }; /** diff --git a/src/addons/mod/lti/services/handlers/module.ts b/src/addons/mod/lti/services/handlers/module.ts index 7dcf9b6ee..7e80a8f53 100644 --- a/src/addons/mod/lti/services/handlers/module.ts +++ b/src/addons/mod/lti/services/handlers/module.ts @@ -14,7 +14,7 @@ import { Injectable, Type } from '@angular/core'; -import { CoreConstants } from '@/core/constants'; +import { CoreConstants, ModPurpose } from '@/core/constants'; import { CoreCourseModuleHandler, CoreCourseModuleHandlerData } from '@features/course/services/module-delegate'; import { CoreCourseModuleData } from '@features/course/services/course-helper'; import { makeSingleton } from '@singletons'; @@ -43,6 +43,7 @@ export class AddonModLtiModuleHandlerService extends CoreModuleHandlerBase imple [CoreConstants.FEATURE_GRADE_OUTCOMES]: true, [CoreConstants.FEATURE_BACKUP_MOODLE2]: true, [CoreConstants.FEATURE_SHOW_DESCRIPTION]: true, + [CoreConstants.FEATURE_MOD_PURPOSE]: ModPurpose.MOD_PURPOSE_CONTENT, }; /** diff --git a/src/addons/mod/page/services/handlers/module.ts b/src/addons/mod/page/services/handlers/module.ts index 688d9eabc..9870c74cf 100644 --- a/src/addons/mod/page/services/handlers/module.ts +++ b/src/addons/mod/page/services/handlers/module.ts @@ -15,7 +15,7 @@ import { Injectable, Type } from '@angular/core'; import { AddonModPage } from '../page'; import { CoreCourseModuleHandler } from '@features/course/services/module-delegate'; -import { CoreConstants } from '@/core/constants'; +import { CoreConstants, ModPurpose } from '@/core/constants'; import { AddonModPageIndexComponent } from '../../components/index'; import { makeSingleton } from '@singletons'; import { CoreModuleHandlerBase } from '@features/course/classes/module-base-handler'; @@ -42,6 +42,7 @@ export class AddonModPageModuleHandlerService extends CoreModuleHandlerBase impl [CoreConstants.FEATURE_GRADE_OUTCOMES]: false, [CoreConstants.FEATURE_BACKUP_MOODLE2]: true, [CoreConstants.FEATURE_SHOW_DESCRIPTION]: true, + [CoreConstants.FEATURE_MOD_PURPOSE]: ModPurpose.MOD_PURPOSE_CONTENT, }; /** diff --git a/src/addons/mod/quiz/services/handlers/module.ts b/src/addons/mod/quiz/services/handlers/module.ts index 70cad4de5..7ca4c9022 100644 --- a/src/addons/mod/quiz/services/handlers/module.ts +++ b/src/addons/mod/quiz/services/handlers/module.ts @@ -14,7 +14,7 @@ import { Injectable, Type } from '@angular/core'; -import { CoreConstants } from '@/core/constants'; +import { CoreConstants, ModPurpose } from '@/core/constants'; import { CoreCourseModuleHandler } from '@features/course/services/module-delegate'; import { AddonModQuizIndexComponent } from '../../components/index'; import { makeSingleton } from '@singletons'; @@ -44,6 +44,7 @@ export class AddonModQuizModuleHandlerService extends CoreModuleHandlerBase impl [CoreConstants.FEATURE_SHOW_DESCRIPTION]: true, [CoreConstants.FEATURE_CONTROLS_GRADE_VISIBILITY]: true, [CoreConstants.FEATURE_USES_QUESTIONS]: true, + [CoreConstants.FEATURE_MOD_PURPOSE]: ModPurpose.MOD_PURPOSE_ASSESSMENT, }; /** diff --git a/src/addons/mod/resource/services/handlers/module.ts b/src/addons/mod/resource/services/handlers/module.ts index 205173fe6..85cc81e0b 100644 --- a/src/addons/mod/resource/services/handlers/module.ts +++ b/src/addons/mod/resource/services/handlers/module.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { CoreConstants } from '@/core/constants'; +import { CoreConstants, ModPurpose } from '@/core/constants'; import { Injectable, Type } from '@angular/core'; import { CoreModuleHandlerBase } from '@features/course/classes/module-base-handler'; import { CoreCourse } from '@features/course/services/course'; @@ -50,6 +50,7 @@ export class AddonModResourceModuleHandlerService extends CoreModuleHandlerBase [CoreConstants.FEATURE_GRADE_OUTCOMES]: false, [CoreConstants.FEATURE_BACKUP_MOODLE2]: true, [CoreConstants.FEATURE_SHOW_DESCRIPTION]: true, + [CoreConstants.FEATURE_MOD_PURPOSE]: ModPurpose.MOD_PURPOSE_CONTENT, }; /** diff --git a/src/addons/mod/scorm/services/handlers/module.ts b/src/addons/mod/scorm/services/handlers/module.ts index 7996d4921..aacc38544 100644 --- a/src/addons/mod/scorm/services/handlers/module.ts +++ b/src/addons/mod/scorm/services/handlers/module.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { CoreConstants } from '@/core/constants'; +import { CoreConstants, ModPurpose } from '@/core/constants'; import { Injectable, Type } from '@angular/core'; import { CoreModuleHandlerBase } from '@features/course/classes/module-base-handler'; import { CoreCourseModuleHandler } from '@features/course/services/module-delegate'; @@ -41,6 +41,7 @@ export class AddonModScormModuleHandlerService extends CoreModuleHandlerBase imp [CoreConstants.FEATURE_GRADE_OUTCOMES]: true, [CoreConstants.FEATURE_BACKUP_MOODLE2]: true, [CoreConstants.FEATURE_SHOW_DESCRIPTION]: true, + [CoreConstants.FEATURE_MOD_PURPOSE]: ModPurpose.MOD_PURPOSE_CONTENT, }; /** diff --git a/src/addons/mod/survey/services/handlers/module.ts b/src/addons/mod/survey/services/handlers/module.ts index 8ec3f3969..1faa1a25a 100644 --- a/src/addons/mod/survey/services/handlers/module.ts +++ b/src/addons/mod/survey/services/handlers/module.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { CoreConstants } from '@/core/constants'; +import { CoreConstants, ModPurpose } from '@/core/constants'; import { Injectable, Type } from '@angular/core'; import { CoreModuleHandlerBase } from '@features/course/classes/module-base-handler'; import { CoreCourseModuleHandler } from '@features/course/services/module-delegate'; @@ -41,6 +41,7 @@ export class AddonModSurveyModuleHandlerService extends CoreModuleHandlerBase im [CoreConstants.FEATURE_GRADE_OUTCOMES]: false, [CoreConstants.FEATURE_BACKUP_MOODLE2]: true, [CoreConstants.FEATURE_SHOW_DESCRIPTION]: true, + [CoreConstants.FEATURE_MOD_PURPOSE]: ModPurpose.MOD_PURPOSE_COMMUNICATION, }; /** diff --git a/src/addons/mod/url/services/handlers/module.ts b/src/addons/mod/url/services/handlers/module.ts index ed9e30713..8d7adc10e 100644 --- a/src/addons/mod/url/services/handlers/module.ts +++ b/src/addons/mod/url/services/handlers/module.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { CoreConstants } from '@/core/constants'; +import { CoreConstants, ModPurpose } from '@/core/constants'; import { Injectable, Type } from '@angular/core'; import { CoreContentLinksHelper } from '@features/contentlinks/services/contentlinks-helper'; import { CoreModuleHandlerBase } from '@features/course/classes/module-base-handler'; @@ -49,6 +49,7 @@ export class AddonModUrlModuleHandlerService extends CoreModuleHandlerBase imple [CoreConstants.FEATURE_GRADE_OUTCOMES]: false, [CoreConstants.FEATURE_BACKUP_MOODLE2]: true, [CoreConstants.FEATURE_SHOW_DESCRIPTION]: true, + [CoreConstants.FEATURE_MOD_PURPOSE]: ModPurpose.MOD_PURPOSE_CONTENT, }; /** diff --git a/src/addons/mod/wiki/services/handlers/module.ts b/src/addons/mod/wiki/services/handlers/module.ts index 33b5af3aa..3bd58ebd1 100644 --- a/src/addons/mod/wiki/services/handlers/module.ts +++ b/src/addons/mod/wiki/services/handlers/module.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { CoreConstants } from '@/core/constants'; +import { CoreConstants, ModPurpose } from '@/core/constants'; import { Injectable, Type } from '@angular/core'; import { CoreModuleHandlerBase } from '@features/course/classes/module-base-handler'; import { CoreCourseModuleHandler } from '@features/course/services/module-delegate'; @@ -42,6 +42,7 @@ export class AddonModWikiModuleHandlerService extends CoreModuleHandlerBase impl [CoreConstants.FEATURE_SHOW_DESCRIPTION]: true, [CoreConstants.FEATURE_RATE]: false, [CoreConstants.FEATURE_COMMENT]: true, + [CoreConstants.FEATURE_MOD_PURPOSE]: ModPurpose.MOD_PURPOSE_COLLABORATION, }; /** diff --git a/src/addons/mod/workshop/services/handlers/module.ts b/src/addons/mod/workshop/services/handlers/module.ts index 4364cc552..869c347cb 100644 --- a/src/addons/mod/workshop/services/handlers/module.ts +++ b/src/addons/mod/workshop/services/handlers/module.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { CoreConstants } from '@/core/constants'; +import { CoreConstants, ModPurpose } from '@/core/constants'; import { Injectable, Type } from '@angular/core'; import { CoreModuleHandlerBase } from '@features/course/classes/module-base-handler'; import { CoreCourseModuleHandler } from '@features/course/services/module-delegate'; @@ -40,6 +40,7 @@ export class AddonModWorkshopModuleHandlerService extends CoreModuleHandlerBase [CoreConstants.FEATURE_BACKUP_MOODLE2]: true, [CoreConstants.FEATURE_SHOW_DESCRIPTION]: true, [CoreConstants.FEATURE_PLAGIARISM]: true, + [CoreConstants.FEATURE_MOD_PURPOSE]: ModPurpose.MOD_PURPOSE_ASSESSMENT, }; /** diff --git a/src/core/constants.ts b/src/core/constants.ts index a4f6a7c32..2c238261b 100644 --- a/src/core/constants.ts +++ b/src/core/constants.ts @@ -27,6 +27,16 @@ export const enum ContextLevel { BLOCK = 'block', } +export const enum ModPurpose { + MOD_PURPOSE_COMMUNICATION = 'communication', + MOD_PURPOSE_ASSESSMENT = 'assessment', + MOD_PURPOSE_COLLABORATION = 'collaboration', + MOD_PURPOSE_CONTENT = 'content', + MOD_PURPOSE_ADMINISTRATION = 'administration', + MOD_PURPOSE_INTERFACE = 'interface', + MOD_PURPOSE_OTHER = 'other', +}; + /** * Static class to contain all the core constants. */ @@ -119,6 +129,7 @@ export class CoreConstants { static readonly FEATURE_MOD_INTRO = 'mod_intro'; // True if module supports intro editor. static readonly FEATURE_MODEDIT_DEFAULT_COMPLETION = 'modedit_default_completion'; // True if module has default completion. static readonly FEATURE_COMMENT = 'comment'; + static readonly FEATURE_MOD_PURPOSE = 'mod_purpose'; // Type of module. static readonly FEATURE_RATE = 'rate'; static readonly FEATURE_BACKUP_MOODLE2 = 'backup_moodle2'; // True if module supports backup/restore of moodle2 format. static readonly FEATURE_SHOW_DESCRIPTION = 'showdescription'; // True if module can show description on course main page.