commit
7b117d802e
|
@ -10,6 +10,7 @@
|
||||||
"addon.badges.issuername": "badges",
|
"addon.badges.issuername": "badges",
|
||||||
"addon.badges.nobadges": "badges",
|
"addon.badges.nobadges": "badges",
|
||||||
"addon.badges.recipientdetails": "badges",
|
"addon.badges.recipientdetails": "badges",
|
||||||
|
"addon.block_activitymodules.pluginname": "block_activity_modules",
|
||||||
"addon.block_myoverview.all": "block_myoverview",
|
"addon.block_myoverview.all": "block_myoverview",
|
||||||
"addon.block_myoverview.future": "block_myoverview",
|
"addon.block_myoverview.future": "block_myoverview",
|
||||||
"addon.block_myoverview.inprogress": "block_myoverview",
|
"addon.block_myoverview.inprogress": "block_myoverview",
|
||||||
|
@ -20,6 +21,7 @@
|
||||||
"addon.block_myoverview.nocoursespast": "block_myoverview",
|
"addon.block_myoverview.nocoursespast": "block_myoverview",
|
||||||
"addon.block_myoverview.past": "block_myoverview",
|
"addon.block_myoverview.past": "block_myoverview",
|
||||||
"addon.block_myoverview.title": "block_myoverview",
|
"addon.block_myoverview.title": "block_myoverview",
|
||||||
|
"addon.block_sitemainmenu.pluginname": "block_site_main_menu",
|
||||||
"addon.block_timeline.duedate": "block_timeline",
|
"addon.block_timeline.duedate": "block_timeline",
|
||||||
"addon.block_timeline.next30days": "block_timeline",
|
"addon.block_timeline.next30days": "block_timeline",
|
||||||
"addon.block_timeline.next3months": "block_timeline",
|
"addon.block_timeline.next3months": "block_timeline",
|
||||||
|
@ -202,6 +204,7 @@
|
||||||
"addon.mod_assign.markingworkflowstatereadyforrelease": "assign",
|
"addon.mod_assign.markingworkflowstatereadyforrelease": "assign",
|
||||||
"addon.mod_assign.markingworkflowstatereadyforreview": "assign",
|
"addon.mod_assign.markingworkflowstatereadyforreview": "assign",
|
||||||
"addon.mod_assign.markingworkflowstatereleased": "assign",
|
"addon.mod_assign.markingworkflowstatereleased": "assign",
|
||||||
|
"addon.mod_assign.modulenameplural": "assign",
|
||||||
"addon.mod_assign.multipleteams": "assign",
|
"addon.mod_assign.multipleteams": "assign",
|
||||||
"addon.mod_assign.multipleteams_desc": "assign",
|
"addon.mod_assign.multipleteams_desc": "assign",
|
||||||
"addon.mod_assign.noattempt": "assign",
|
"addon.mod_assign.noattempt": "assign",
|
||||||
|
@ -256,6 +259,7 @@
|
||||||
"addon.mod_assign_submission_file.pluginname": "assignsubmission_file",
|
"addon.mod_assign_submission_file.pluginname": "assignsubmission_file",
|
||||||
"addon.mod_assign_submission_onlinetext.pluginname": "assignsubmission_onlinetext",
|
"addon.mod_assign_submission_onlinetext.pluginname": "assignsubmission_onlinetext",
|
||||||
"addon.mod_book.errorchapter": "book",
|
"addon.mod_book.errorchapter": "book",
|
||||||
|
"addon.mod_book.modulenameplural": "book",
|
||||||
"addon.mod_chat.beep": "chat",
|
"addon.mod_chat.beep": "chat",
|
||||||
"addon.mod_chat.currentusers": "chat",
|
"addon.mod_chat.currentusers": "chat",
|
||||||
"addon.mod_chat.enterchat": "chat",
|
"addon.mod_chat.enterchat": "chat",
|
||||||
|
@ -268,6 +272,7 @@
|
||||||
"addon.mod_chat.messagebeepsyou": "chat",
|
"addon.mod_chat.messagebeepsyou": "chat",
|
||||||
"addon.mod_chat.messageenter": "chat",
|
"addon.mod_chat.messageenter": "chat",
|
||||||
"addon.mod_chat.messageexit": "chat",
|
"addon.mod_chat.messageexit": "chat",
|
||||||
|
"addon.mod_chat.modulenameplural": "chat",
|
||||||
"addon.mod_chat.mustbeonlinetosendmessages": "local_moodlemobileapp",
|
"addon.mod_chat.mustbeonlinetosendmessages": "local_moodlemobileapp",
|
||||||
"addon.mod_chat.nomessages": "chat",
|
"addon.mod_chat.nomessages": "chat",
|
||||||
"addon.mod_chat.send": "chat",
|
"addon.mod_chat.send": "chat",
|
||||||
|
@ -278,6 +283,7 @@
|
||||||
"addon.mod_choice.errorgetchoice": "local_moodlemobileapp",
|
"addon.mod_choice.errorgetchoice": "local_moodlemobileapp",
|
||||||
"addon.mod_choice.expired": "choice",
|
"addon.mod_choice.expired": "choice",
|
||||||
"addon.mod_choice.full": "choice",
|
"addon.mod_choice.full": "choice",
|
||||||
|
"addon.mod_choice.modulenameplural": "choice",
|
||||||
"addon.mod_choice.noresultsviewable": "choice",
|
"addon.mod_choice.noresultsviewable": "choice",
|
||||||
"addon.mod_choice.notopenyet": "choice",
|
"addon.mod_choice.notopenyet": "choice",
|
||||||
"addon.mod_choice.numberofuser": "choice",
|
"addon.mod_choice.numberofuser": "choice",
|
||||||
|
@ -317,6 +323,7 @@
|
||||||
"addon.mod_data.fields": "data",
|
"addon.mod_data.fields": "data",
|
||||||
"addon.mod_data.latlongboth": "data",
|
"addon.mod_data.latlongboth": "data",
|
||||||
"addon.mod_data.menuchoose": "data",
|
"addon.mod_data.menuchoose": "data",
|
||||||
|
"addon.mod_data.modulenameplural": "data",
|
||||||
"addon.mod_data.more": "data",
|
"addon.mod_data.more": "data",
|
||||||
"addon.mod_data.nomatch": "data",
|
"addon.mod_data.nomatch": "data",
|
||||||
"addon.mod_data.norecords": "data",
|
"addon.mod_data.norecords": "data",
|
||||||
|
@ -348,6 +355,7 @@
|
||||||
"addon.mod_feedback.feedbackopen": "feedback",
|
"addon.mod_feedback.feedbackopen": "feedback",
|
||||||
"addon.mod_feedback.mapcourses": "feedback",
|
"addon.mod_feedback.mapcourses": "feedback",
|
||||||
"addon.mod_feedback.mode": "feedback",
|
"addon.mod_feedback.mode": "feedback",
|
||||||
|
"addon.mod_feedback.modulenameplural": "feedback",
|
||||||
"addon.mod_feedback.next_page": "feedback",
|
"addon.mod_feedback.next_page": "feedback",
|
||||||
"addon.mod_feedback.non_anonymous": "feedback",
|
"addon.mod_feedback.non_anonymous": "feedback",
|
||||||
"addon.mod_feedback.non_anonymous_entries": "feedback",
|
"addon.mod_feedback.non_anonymous_entries": "feedback",
|
||||||
|
@ -368,6 +376,7 @@
|
||||||
"addon.mod_feedback.started": "feedback",
|
"addon.mod_feedback.started": "feedback",
|
||||||
"addon.mod_feedback.this_feedback_is_already_submitted": "feedback",
|
"addon.mod_feedback.this_feedback_is_already_submitted": "feedback",
|
||||||
"addon.mod_folder.emptyfilelist": "local_moodlemobileapp",
|
"addon.mod_folder.emptyfilelist": "local_moodlemobileapp",
|
||||||
|
"addon.mod_folder.modulenameplural": "folder",
|
||||||
"addon.mod_forum.addanewdiscussion": "forum",
|
"addon.mod_forum.addanewdiscussion": "forum",
|
||||||
"addon.mod_forum.addanewquestion": "forum",
|
"addon.mod_forum.addanewquestion": "forum",
|
||||||
"addon.mod_forum.addanewtopic": "forum",
|
"addon.mod_forum.addanewtopic": "forum",
|
||||||
|
@ -390,6 +399,7 @@
|
||||||
"addon.mod_forum.modeflatnewestfirst": "forum",
|
"addon.mod_forum.modeflatnewestfirst": "forum",
|
||||||
"addon.mod_forum.modeflatoldestfirst": "forum",
|
"addon.mod_forum.modeflatoldestfirst": "forum",
|
||||||
"addon.mod_forum.modenested": "forum",
|
"addon.mod_forum.modenested": "forum",
|
||||||
|
"addon.mod_forum.modulenameplural": "forum",
|
||||||
"addon.mod_forum.numdiscussions": "local_moodlemobileapp",
|
"addon.mod_forum.numdiscussions": "local_moodlemobileapp",
|
||||||
"addon.mod_forum.numreplies": "local_moodlemobileapp",
|
"addon.mod_forum.numreplies": "local_moodlemobileapp",
|
||||||
"addon.mod_forum.posttoforum": "forum",
|
"addon.mod_forum.posttoforum": "forum",
|
||||||
|
@ -425,9 +435,11 @@
|
||||||
"addon.mod_glossary.fillfields": "glossary",
|
"addon.mod_glossary.fillfields": "glossary",
|
||||||
"addon.mod_glossary.fullmatch": "glossary",
|
"addon.mod_glossary.fullmatch": "glossary",
|
||||||
"addon.mod_glossary.linking": "glossary",
|
"addon.mod_glossary.linking": "glossary",
|
||||||
|
"addon.mod_glossary.modulenameplural": "glossary",
|
||||||
"addon.mod_glossary.noentriesfound": "local_moodlemobileapp",
|
"addon.mod_glossary.noentriesfound": "local_moodlemobileapp",
|
||||||
"addon.mod_glossary.searchquery": "local_moodlemobileapp",
|
"addon.mod_glossary.searchquery": "local_moodlemobileapp",
|
||||||
"addon.mod_imscp.deploymenterror": "imscp",
|
"addon.mod_imscp.deploymenterror": "imscp",
|
||||||
|
"addon.mod_imscp.modulenameplural": "imscp",
|
||||||
"addon.mod_imscp.showmoduledescription": "local_moodlemobileapp",
|
"addon.mod_imscp.showmoduledescription": "local_moodlemobileapp",
|
||||||
"addon.mod_lesson.answer": "lesson",
|
"addon.mod_lesson.answer": "lesson",
|
||||||
"addon.mod_lesson.attempt": "lesson",
|
"addon.mod_lesson.attempt": "lesson",
|
||||||
|
@ -471,6 +483,7 @@
|
||||||
"addon.mod_lesson.lowtime": "lesson",
|
"addon.mod_lesson.lowtime": "lesson",
|
||||||
"addon.mod_lesson.maximumnumberofattemptsreached": "lesson",
|
"addon.mod_lesson.maximumnumberofattemptsreached": "lesson",
|
||||||
"addon.mod_lesson.modattemptsnoteacher": "lesson",
|
"addon.mod_lesson.modattemptsnoteacher": "lesson",
|
||||||
|
"addon.mod_lesson.modulenameplural": "lesson",
|
||||||
"addon.mod_lesson.noanswer": "lesson",
|
"addon.mod_lesson.noanswer": "lesson",
|
||||||
"addon.mod_lesson.nolessonattempts": "lesson",
|
"addon.mod_lesson.nolessonattempts": "lesson",
|
||||||
"addon.mod_lesson.nolessonattemptsgroup": "lesson",
|
"addon.mod_lesson.nolessonattemptsgroup": "lesson",
|
||||||
|
@ -515,7 +528,9 @@
|
||||||
"addon.mod_lti.errorgetlti": "local_moodlemobileapp",
|
"addon.mod_lti.errorgetlti": "local_moodlemobileapp",
|
||||||
"addon.mod_lti.errorinvalidlaunchurl": "local_moodlemobileapp",
|
"addon.mod_lti.errorinvalidlaunchurl": "local_moodlemobileapp",
|
||||||
"addon.mod_lti.launchactivity": "local_moodlemobileapp",
|
"addon.mod_lti.launchactivity": "local_moodlemobileapp",
|
||||||
|
"addon.mod_lti.modulenameplural": "lti",
|
||||||
"addon.mod_page.errorwhileloadingthepage": "local_moodlemobileapp",
|
"addon.mod_page.errorwhileloadingthepage": "local_moodlemobileapp",
|
||||||
|
"addon.mod_page.modulenameplural": "page",
|
||||||
"addon.mod_quiz.attemptfirst": "quiz",
|
"addon.mod_quiz.attemptfirst": "quiz",
|
||||||
"addon.mod_quiz.attemptlast": "quiz",
|
"addon.mod_quiz.attemptlast": "quiz",
|
||||||
"addon.mod_quiz.attemptnumber": "quiz",
|
"addon.mod_quiz.attemptnumber": "quiz",
|
||||||
|
@ -550,6 +565,7 @@
|
||||||
"addon.mod_quiz.grademethod": "quiz",
|
"addon.mod_quiz.grademethod": "quiz",
|
||||||
"addon.mod_quiz.gradesofar": "quiz",
|
"addon.mod_quiz.gradesofar": "quiz",
|
||||||
"addon.mod_quiz.marks": "quiz",
|
"addon.mod_quiz.marks": "quiz",
|
||||||
|
"addon.mod_quiz.modulenameplural": "quiz",
|
||||||
"addon.mod_quiz.mustbesubmittedby": "quiz",
|
"addon.mod_quiz.mustbesubmittedby": "quiz",
|
||||||
"addon.mod_quiz.noquestions": "quiz",
|
"addon.mod_quiz.noquestions": "quiz",
|
||||||
"addon.mod_quiz.noreviewattempt": "quiz",
|
"addon.mod_quiz.noreviewattempt": "quiz",
|
||||||
|
@ -594,6 +610,7 @@
|
||||||
"addon.mod_quiz.yourfinalgradeis": "quiz",
|
"addon.mod_quiz.yourfinalgradeis": "quiz",
|
||||||
"addon.mod_resource.errorwhileloadingthecontent": "local_moodlemobileapp",
|
"addon.mod_resource.errorwhileloadingthecontent": "local_moodlemobileapp",
|
||||||
"addon.mod_resource.modifieddate": "resource",
|
"addon.mod_resource.modifieddate": "resource",
|
||||||
|
"addon.mod_resource.modulenameplural": "resource",
|
||||||
"addon.mod_resource.openthefile": "local_moodlemobileapp",
|
"addon.mod_resource.openthefile": "local_moodlemobileapp",
|
||||||
"addon.mod_resource.uploadeddate": "resource",
|
"addon.mod_resource.uploadeddate": "resource",
|
||||||
"addon.mod_scorm.asset": "scorm",
|
"addon.mod_scorm.asset": "scorm",
|
||||||
|
@ -630,6 +647,7 @@
|
||||||
"addon.mod_scorm.incomplete": "scorm",
|
"addon.mod_scorm.incomplete": "scorm",
|
||||||
"addon.mod_scorm.lastattempt": "scorm",
|
"addon.mod_scorm.lastattempt": "scorm",
|
||||||
"addon.mod_scorm.mode": "scorm",
|
"addon.mod_scorm.mode": "scorm",
|
||||||
|
"addon.mod_scorm.modulenameplural": "scorm",
|
||||||
"addon.mod_scorm.newattempt": "scorm",
|
"addon.mod_scorm.newattempt": "scorm",
|
||||||
"addon.mod_scorm.noattemptsallowed": "scorm",
|
"addon.mod_scorm.noattemptsallowed": "scorm",
|
||||||
"addon.mod_scorm.noattemptsmade": "scorm",
|
"addon.mod_scorm.noattemptsmade": "scorm",
|
||||||
|
@ -649,10 +667,12 @@
|
||||||
"addon.mod_survey.errorgetsurvey": "local_moodlemobileapp",
|
"addon.mod_survey.errorgetsurvey": "local_moodlemobileapp",
|
||||||
"addon.mod_survey.ifoundthat": "survey",
|
"addon.mod_survey.ifoundthat": "survey",
|
||||||
"addon.mod_survey.ipreferthat": "survey",
|
"addon.mod_survey.ipreferthat": "survey",
|
||||||
|
"addon.mod_survey.modulenameplural": "survey",
|
||||||
"addon.mod_survey.responses": "survey",
|
"addon.mod_survey.responses": "survey",
|
||||||
"addon.mod_survey.results": "local_moodlemobileapp",
|
"addon.mod_survey.results": "local_moodlemobileapp",
|
||||||
"addon.mod_survey.surveycompletednograph": "survey",
|
"addon.mod_survey.surveycompletednograph": "survey",
|
||||||
"addon.mod_url.accessurl": "local_moodlemobileapp",
|
"addon.mod_url.accessurl": "local_moodlemobileapp",
|
||||||
|
"addon.mod_url.modulenameplural": "url",
|
||||||
"addon.mod_url.pointingtourl": "local_moodlemobileapp",
|
"addon.mod_url.pointingtourl": "local_moodlemobileapp",
|
||||||
"addon.mod_wiki.cannoteditpage": "wiki",
|
"addon.mod_wiki.cannoteditpage": "wiki",
|
||||||
"addon.mod_wiki.createpage": "wiki",
|
"addon.mod_wiki.createpage": "wiki",
|
||||||
|
@ -661,6 +681,7 @@
|
||||||
"addon.mod_wiki.errornowikiavailable": "local_moodlemobileapp",
|
"addon.mod_wiki.errornowikiavailable": "local_moodlemobileapp",
|
||||||
"addon.mod_wiki.gowikihome": "local_moodlemobileapp",
|
"addon.mod_wiki.gowikihome": "local_moodlemobileapp",
|
||||||
"addon.mod_wiki.map": "wiki",
|
"addon.mod_wiki.map": "wiki",
|
||||||
|
"addon.mod_wiki.modulenameplural": "wiki",
|
||||||
"addon.mod_wiki.newpagehdr": "wiki",
|
"addon.mod_wiki.newpagehdr": "wiki",
|
||||||
"addon.mod_wiki.newpagetitle": "wiki",
|
"addon.mod_wiki.newpagetitle": "wiki",
|
||||||
"addon.mod_wiki.nocontent": "wiki",
|
"addon.mod_wiki.nocontent": "wiki",
|
||||||
|
@ -699,6 +720,7 @@
|
||||||
"addon.mod_workshop.gradinggradecalculated": "workshop",
|
"addon.mod_workshop.gradinggradecalculated": "workshop",
|
||||||
"addon.mod_workshop.gradinggradeof": "workshop",
|
"addon.mod_workshop.gradinggradeof": "workshop",
|
||||||
"addon.mod_workshop.gradinggradeover": "workshop",
|
"addon.mod_workshop.gradinggradeover": "workshop",
|
||||||
|
"addon.mod_workshop.modulenameplural": "workshop",
|
||||||
"addon.mod_workshop.nogradeyet": "workshop",
|
"addon.mod_workshop.nogradeyet": "workshop",
|
||||||
"addon.mod_workshop.notassessed": "workshop",
|
"addon.mod_workshop.notassessed": "workshop",
|
||||||
"addon.mod_workshop.notoverridden": "workshop",
|
"addon.mod_workshop.notoverridden": "workshop",
|
||||||
|
@ -1467,6 +1489,7 @@
|
||||||
"core.refresh": "moodle",
|
"core.refresh": "moodle",
|
||||||
"core.required": "moodle",
|
"core.required": "moodle",
|
||||||
"core.requireduserdatamissing": "local_moodlemobileapp",
|
"core.requireduserdatamissing": "local_moodlemobileapp",
|
||||||
|
"core.resources": "moodle",
|
||||||
"core.restore": "moodle",
|
"core.restore": "moodle",
|
||||||
"core.retry": "local_moodlemobileapp",
|
"core.retry": "local_moodlemobileapp",
|
||||||
"core.save": "moodle",
|
"core.save": "moodle",
|
||||||
|
|
|
@ -0,0 +1,44 @@
|
||||||
|
// (C) Copyright 2015 Martin Dougiamas
|
||||||
|
//
|
||||||
|
// 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 { IonicModule } from 'ionic-angular';
|
||||||
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
|
import { CoreComponentsModule } from '@components/components.module';
|
||||||
|
import { CoreDirectivesModule } from '@directives/directives.module';
|
||||||
|
import { AddonBlockActivityModulesComponentsModule } from './components/components.module';
|
||||||
|
import { CoreBlockDelegate } from '@core/block/providers/delegate';
|
||||||
|
import { AddonBlockActivityModulesHandler } from './providers/block-handler';
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
declarations: [
|
||||||
|
],
|
||||||
|
imports: [
|
||||||
|
IonicModule,
|
||||||
|
CoreComponentsModule,
|
||||||
|
CoreDirectivesModule,
|
||||||
|
AddonBlockActivityModulesComponentsModule,
|
||||||
|
TranslateModule.forChild()
|
||||||
|
],
|
||||||
|
exports: [
|
||||||
|
],
|
||||||
|
providers: [
|
||||||
|
AddonBlockActivityModulesHandler
|
||||||
|
]
|
||||||
|
})
|
||||||
|
export class AddonBlockActivityModulesModule {
|
||||||
|
constructor(blockDelegate: CoreBlockDelegate, blockHandler: AddonBlockActivityModulesHandler) {
|
||||||
|
blockDelegate.registerHandler(blockHandler);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,26 @@
|
||||||
|
ion-app.app-root.md addon-block-activitymodules {
|
||||||
|
.core-module-icon {
|
||||||
|
margin-top: $label-md-margin-top;
|
||||||
|
margin-bottom: $label-md-margin-bottom;
|
||||||
|
width: 24px;
|
||||||
|
height: 24px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ion-app.app-root.ios addon-block-activitymodules {
|
||||||
|
.core-module-icon {
|
||||||
|
margin-top: $label-ios-margin-top;
|
||||||
|
margin-bottom: $label-ios-margin-bottom;
|
||||||
|
width: 24px;
|
||||||
|
height: 24px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ion-app.app-root.wp addon-block-activitymodules {
|
||||||
|
.core-module-icon {
|
||||||
|
margin-top: $item-wp-padding-top;
|
||||||
|
margin-bottom: $item-wp-padding-bottom;
|
||||||
|
width: 24px;
|
||||||
|
height: 24px;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,124 @@
|
||||||
|
// (C) Copyright 2015 Martin Dougiamas
|
||||||
|
//
|
||||||
|
// 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 { Component, OnInit, Injector, Input } from '@angular/core';
|
||||||
|
import { CoreUtilsProvider } from '@providers/utils/utils';
|
||||||
|
import { CoreCourseProvider } from '@core/course/providers/course';
|
||||||
|
import { CoreCourseModuleDelegate } from '@core/course/providers/module-delegate';
|
||||||
|
import { CoreBlockBaseComponent } from '@core/block/classes/base-block-component';
|
||||||
|
import { CoreConstants } from '@core/constants';
|
||||||
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Component to render an "activity modules" block.
|
||||||
|
*/
|
||||||
|
@Component({
|
||||||
|
selector: 'addon-block-activitymodules',
|
||||||
|
templateUrl: 'addon-block-activitymodules.html'
|
||||||
|
})
|
||||||
|
export class AddonBlockActivityModulesComponent extends CoreBlockBaseComponent implements OnInit {
|
||||||
|
@Input() block: any; // The block to render.
|
||||||
|
@Input() contextLevel: string; // The context where the block will be used.
|
||||||
|
@Input() instanceId: number; // The instance ID associated with the context level.
|
||||||
|
|
||||||
|
entries: any[] = [];
|
||||||
|
|
||||||
|
protected fetchContentDefaultError = 'Error getting activity modules data.';
|
||||||
|
|
||||||
|
constructor(injector: Injector, protected utils: CoreUtilsProvider, protected courseProvider: CoreCourseProvider,
|
||||||
|
protected translate: TranslateService, protected moduleDelegate: CoreCourseModuleDelegate) {
|
||||||
|
|
||||||
|
super(injector, 'AddonBlockActivityModulesComponent');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Component being initialized.
|
||||||
|
*/
|
||||||
|
ngOnInit(): void {
|
||||||
|
super.ngOnInit();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform the invalidate content function.
|
||||||
|
*
|
||||||
|
* @return {Promise<any>} Resolved when done.
|
||||||
|
*/
|
||||||
|
protected invalidateContent(): Promise<any> {
|
||||||
|
return this.courseProvider.invalidateSections(this.instanceId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fetch the data to render the block.
|
||||||
|
*
|
||||||
|
* @return {Promise<any>} Promise resolved when done.
|
||||||
|
*/
|
||||||
|
protected fetchContent(): Promise<any> {
|
||||||
|
return this.courseProvider.getSections(this.instanceId, false, true).then((sections) => {
|
||||||
|
|
||||||
|
this.entries = [];
|
||||||
|
|
||||||
|
const archetypes = {};
|
||||||
|
let modFullNames = {};
|
||||||
|
|
||||||
|
sections.forEach((section) => {
|
||||||
|
if (!section.modules) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
section.modules.forEach((mod) => {
|
||||||
|
if (mod.uservisible === false || !this.courseProvider.moduleHasView(mod) ||
|
||||||
|
typeof modFullNames[mod.modname] != 'undefined') {
|
||||||
|
// Ignore this module.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get the archetype of the module type.
|
||||||
|
if (typeof archetypes[mod.modname] == 'undefined') {
|
||||||
|
archetypes[mod.modname] = this.moduleDelegate.supportsFeature(mod.modname,
|
||||||
|
CoreConstants.FEATURE_MOD_ARCHETYPE, CoreConstants.MOD_ARCHETYPE_OTHER);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get the full name of the module type.
|
||||||
|
if (archetypes[mod.modname] == CoreConstants.MOD_ARCHETYPE_RESOURCE) {
|
||||||
|
// All resources are gathered in a single "Resources" option.
|
||||||
|
if (!modFullNames['resources']) {
|
||||||
|
modFullNames['resources'] = this.translate.instant('core.resources');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
modFullNames[mod.modname] = mod.modplural;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// Sort the modnames alphabetically.
|
||||||
|
modFullNames = this.utils.sortValues(modFullNames);
|
||||||
|
|
||||||
|
for (const modName in modFullNames) {
|
||||||
|
let icon;
|
||||||
|
|
||||||
|
if (modName === 'resources') {
|
||||||
|
icon = this.courseProvider.getModuleIconSrc('page');
|
||||||
|
} else {
|
||||||
|
icon = this.moduleDelegate.getModuleIconSrc(modName);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.entries.push({
|
||||||
|
icon: icon,
|
||||||
|
name: modFullNames[modName],
|
||||||
|
modName: modName
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
<core-loading [hideUntil]="loaded" class="core-loading-center">
|
||||||
|
<a ion-item text-wrap *ngFor="let entry of entries" class="item-media" detail-none [navPush]="'CoreCourseListModTypePage'" [navParams]="{title: entry.name, courseId: instanceId, modName: entry.modName}">
|
||||||
|
<img item-start [src]="entry.icon" alt="" role="presentation" class="core-module-icon">
|
||||||
|
<core-format-text [text]="entry.name"></core-format-text>
|
||||||
|
</a>
|
||||||
|
</core-loading>
|
|
@ -0,0 +1,45 @@
|
||||||
|
// (C) Copyright 2015 Martin Dougiamas
|
||||||
|
//
|
||||||
|
// 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 { CommonModule } from '@angular/common';
|
||||||
|
import { IonicModule } from 'ionic-angular';
|
||||||
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
|
import { AddonBlockActivityModulesComponent } from './activitymodules/activitymodules';
|
||||||
|
import { CoreComponentsModule } from '@components/components.module';
|
||||||
|
import { CoreDirectivesModule } from '@directives/directives.module';
|
||||||
|
import { CoreCourseComponentsModule } from '@core/course/components/components.module';
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
declarations: [
|
||||||
|
AddonBlockActivityModulesComponent
|
||||||
|
],
|
||||||
|
imports: [
|
||||||
|
CommonModule,
|
||||||
|
IonicModule,
|
||||||
|
TranslateModule.forChild(),
|
||||||
|
CoreComponentsModule,
|
||||||
|
CoreDirectivesModule,
|
||||||
|
CoreCourseComponentsModule
|
||||||
|
],
|
||||||
|
providers: [
|
||||||
|
],
|
||||||
|
exports: [
|
||||||
|
AddonBlockActivityModulesComponent
|
||||||
|
],
|
||||||
|
entryComponents: [
|
||||||
|
AddonBlockActivityModulesComponent
|
||||||
|
]
|
||||||
|
})
|
||||||
|
export class AddonBlockActivityModulesComponentsModule {}
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"pluginname": "Activities"
|
||||||
|
}
|
|
@ -0,0 +1,58 @@
|
||||||
|
// (C) Copyright 2015 Martin Dougiamas
|
||||||
|
//
|
||||||
|
// 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 { Injectable, Injector } from '@angular/core';
|
||||||
|
import { CoreBlockHandler, CoreBlockHandlerData } from '@core/block/providers/delegate';
|
||||||
|
import { AddonBlockActivityModulesComponent } from '../components/activitymodules/activitymodules';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Course nav handler.
|
||||||
|
*/
|
||||||
|
@Injectable()
|
||||||
|
export class AddonBlockActivityModulesHandler implements CoreBlockHandler {
|
||||||
|
name = 'AddonBlockActivityModulesHandler';
|
||||||
|
blockName = 'activity_modules';
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
// Nothing to do.
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if the handler is enabled on a site level.
|
||||||
|
*
|
||||||
|
* @return {boolean} Whether or not the handler is enabled on a site level.
|
||||||
|
*/
|
||||||
|
isEnabled(): boolean | Promise<boolean> {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the data needed to render the block.
|
||||||
|
*
|
||||||
|
* @param {Injector} injector Injector.
|
||||||
|
* @param {any} block The block to render.
|
||||||
|
* @param {string} contextLevel The context where the block will be used.
|
||||||
|
* @param {number} instanceId The instance ID associated with the context level.
|
||||||
|
* @return {CoreBlockHandlerData|Promise<CoreBlockHandlerData>} Data or promise resolved with the data.
|
||||||
|
*/
|
||||||
|
getDisplayData?(injector: Injector, block: any, contextLevel: string, instanceId: number)
|
||||||
|
: CoreBlockHandlerData | Promise<CoreBlockHandlerData> {
|
||||||
|
|
||||||
|
return {
|
||||||
|
title: 'addon.block_activitymodules.pluginname',
|
||||||
|
class: 'addon-block-activitymodules',
|
||||||
|
component: AddonBlockActivityModulesComponent
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
|
@ -23,7 +23,7 @@ import { CoreCoursesHelperProvider } from '@core/courses/providers/helper';
|
||||||
import { CoreCourseHelperProvider } from '@core/course/providers/helper';
|
import { CoreCourseHelperProvider } from '@core/course/providers/helper';
|
||||||
import { CoreCourseOptionsDelegate } from '@core/course/providers/options-delegate';
|
import { CoreCourseOptionsDelegate } from '@core/course/providers/options-delegate';
|
||||||
import { AddonCourseCompletionProvider } from '@addon/coursecompletion/providers/coursecompletion';
|
import { AddonCourseCompletionProvider } from '@addon/coursecompletion/providers/coursecompletion';
|
||||||
import { AddonBlockComponent } from '../../classes/block-component';
|
import { CoreBlockBaseComponent } from '@core/block/classes/base-block-component';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Component to render a my overview block.
|
* Component to render a my overview block.
|
||||||
|
@ -32,7 +32,7 @@ import { AddonBlockComponent } from '../../classes/block-component';
|
||||||
selector: 'addon-block-myoverview',
|
selector: 'addon-block-myoverview',
|
||||||
templateUrl: 'addon-block-myoverview.html'
|
templateUrl: 'addon-block-myoverview.html'
|
||||||
})
|
})
|
||||||
export class AddonBlockMyOverviewComponent extends AddonBlockComponent implements OnInit, OnDestroy {
|
export class AddonBlockMyOverviewComponent extends CoreBlockBaseComponent implements OnInit, OnDestroy {
|
||||||
@ViewChild('searchbar') searchbar: Searchbar;
|
@ViewChild('searchbar') searchbar: Searchbar;
|
||||||
|
|
||||||
courses = {
|
courses = {
|
||||||
|
|
|
@ -0,0 +1,45 @@
|
||||||
|
// (C) Copyright 2015 Martin Dougiamas
|
||||||
|
//
|
||||||
|
// 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 { CommonModule } from '@angular/common';
|
||||||
|
import { IonicModule } from 'ionic-angular';
|
||||||
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
|
import { AddonBlockSiteMainMenuComponent } from './sitemainmenu/sitemainmenu';
|
||||||
|
import { CoreComponentsModule } from '@components/components.module';
|
||||||
|
import { CoreDirectivesModule } from '@directives/directives.module';
|
||||||
|
import { CoreCourseComponentsModule } from '@core/course/components/components.module';
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
declarations: [
|
||||||
|
AddonBlockSiteMainMenuComponent
|
||||||
|
],
|
||||||
|
imports: [
|
||||||
|
CommonModule,
|
||||||
|
IonicModule,
|
||||||
|
TranslateModule.forChild(),
|
||||||
|
CoreComponentsModule,
|
||||||
|
CoreDirectivesModule,
|
||||||
|
CoreCourseComponentsModule
|
||||||
|
],
|
||||||
|
providers: [
|
||||||
|
],
|
||||||
|
exports: [
|
||||||
|
AddonBlockSiteMainMenuComponent
|
||||||
|
],
|
||||||
|
entryComponents: [
|
||||||
|
AddonBlockSiteMainMenuComponent
|
||||||
|
]
|
||||||
|
})
|
||||||
|
export class AddonBlockSiteMainMenuComponentsModule {}
|
|
@ -0,0 +1,7 @@
|
||||||
|
<core-loading [hideUntil]="loaded" class="core-loading-center">
|
||||||
|
<ion-item text-wrap *ngIf="block.summary">
|
||||||
|
<core-format-text [text]="block.summary"></core-format-text>
|
||||||
|
</ion-item>
|
||||||
|
|
||||||
|
<core-course-module *ngFor="let module of block.modules" [module]="module" [courseId]="siteHomeId" [downloadEnabled]="true" [section]="block"></core-course-module>
|
||||||
|
</core-loading>
|
|
@ -0,0 +1,114 @@
|
||||||
|
// (C) Copyright 2015 Martin Dougiamas
|
||||||
|
//
|
||||||
|
// 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 { Component, OnInit, Injector } from '@angular/core';
|
||||||
|
import { CoreSitesProvider } from '@providers/sites';
|
||||||
|
import { CoreCourseProvider } from '@core/course/providers/course';
|
||||||
|
import { CoreCourseHelperProvider } from '@core/course/providers/helper';
|
||||||
|
import { CoreSiteHomeProvider } from '@core/sitehome/providers/sitehome';
|
||||||
|
import { CoreCourseModulePrefetchDelegate } from '@core/course/providers/module-prefetch-delegate';
|
||||||
|
import { CoreBlockBaseComponent } from '@core/block/classes/base-block-component';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Component to render a site main menu block.
|
||||||
|
*/
|
||||||
|
@Component({
|
||||||
|
selector: 'addon-block-sitemainmenu',
|
||||||
|
templateUrl: 'addon-block-sitemainmenu.html'
|
||||||
|
})
|
||||||
|
export class AddonBlockSiteMainMenuComponent extends CoreBlockBaseComponent implements OnInit {
|
||||||
|
block: any;
|
||||||
|
siteHomeId: number;
|
||||||
|
|
||||||
|
protected fetchContentDefaultError = 'Error getting main menu data.';
|
||||||
|
|
||||||
|
constructor(injector: Injector, protected sitesProvider: CoreSitesProvider, protected courseProvider: CoreCourseProvider,
|
||||||
|
protected courseHelper: CoreCourseHelperProvider, protected siteHomeProvider: CoreSiteHomeProvider,
|
||||||
|
protected prefetchDelegate: CoreCourseModulePrefetchDelegate) {
|
||||||
|
|
||||||
|
super(injector, 'AddonBlockSiteMainMenuComponent');
|
||||||
|
|
||||||
|
this.siteHomeId = sitesProvider.getCurrentSite().getSiteHomeId();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Component being initialized.
|
||||||
|
*/
|
||||||
|
ngOnInit(): void {
|
||||||
|
super.ngOnInit();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform the invalidate content function.
|
||||||
|
*
|
||||||
|
* @return {Promise<any>} Resolved when done.
|
||||||
|
*/
|
||||||
|
protected invalidateContent(): Promise<any> {
|
||||||
|
const promises = [];
|
||||||
|
|
||||||
|
promises.push(this.courseProvider.invalidateSections(this.siteHomeId));
|
||||||
|
promises.push(this.siteHomeProvider.invalidateNewsForum(this.siteHomeId));
|
||||||
|
|
||||||
|
if (this.block && this.block.modules) {
|
||||||
|
// Invalidate modules prefetch data.
|
||||||
|
promises.push(this.prefetchDelegate.invalidateModules(this.block.modules, this.siteHomeId));
|
||||||
|
}
|
||||||
|
|
||||||
|
return Promise.all(promises);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fetch the data to render the block.
|
||||||
|
*
|
||||||
|
* @return {Promise<any>} Promise resolved when done.
|
||||||
|
*/
|
||||||
|
protected fetchContent(): Promise<any> {
|
||||||
|
return this.courseProvider.getSections(this.siteHomeId, false, true).then((sections) => {
|
||||||
|
this.block = sections[0];
|
||||||
|
|
||||||
|
if (this.block) {
|
||||||
|
this.block.hasContent = this.courseHelper.sectionHasContent(this.block);
|
||||||
|
this.courseHelper.addHandlerDataForModules([this.block], this.siteHomeId);
|
||||||
|
|
||||||
|
// Check if Site Home displays announcements. If so, remove it from the main menu block.
|
||||||
|
const currentSite = this.sitesProvider.getCurrentSite(),
|
||||||
|
config = currentSite ? currentSite.getStoredConfig() || {} : {};
|
||||||
|
let hasNewsItem = false;
|
||||||
|
|
||||||
|
if (config.frontpageloggedin) {
|
||||||
|
const items = config.frontpageloggedin.split(',');
|
||||||
|
|
||||||
|
hasNewsItem = items.find((item) => { return item == '0'; });
|
||||||
|
}
|
||||||
|
|
||||||
|
if (hasNewsItem && this.block.modules) {
|
||||||
|
// Remove forum activity (news one only) from the main menu block to prevent duplicates.
|
||||||
|
return this.siteHomeProvider.getNewsForum(this.siteHomeId).then((forum) => {
|
||||||
|
// Search the module that belongs to site news.
|
||||||
|
for (let i = 0; i < this.block.modules.length; i++) {
|
||||||
|
const module = this.block.modules[i];
|
||||||
|
|
||||||
|
if (module.modname == 'forum' && module.instance == forum.id) {
|
||||||
|
this.block.modules.splice(i, 1);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
// Ignore errors.
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"pluginname": "Main menu"
|
||||||
|
}
|
|
@ -0,0 +1,58 @@
|
||||||
|
// (C) Copyright 2015 Martin Dougiamas
|
||||||
|
//
|
||||||
|
// 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 { Injectable, Injector } from '@angular/core';
|
||||||
|
import { CoreBlockHandler, CoreBlockHandlerData } from '@core/block/providers/delegate';
|
||||||
|
import { AddonBlockSiteMainMenuComponent } from '../components/sitemainmenu/sitemainmenu';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Course nav handler.
|
||||||
|
*/
|
||||||
|
@Injectable()
|
||||||
|
export class AddonBlockSiteMainMenuHandler implements CoreBlockHandler {
|
||||||
|
name = 'AddonBlockSiteMainMenuHandler';
|
||||||
|
blockName = 'site_main_menu';
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
// Nothing to do.
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if the handler is enabled on a site level.
|
||||||
|
*
|
||||||
|
* @return {boolean} Whether or not the handler is enabled on a site level.
|
||||||
|
*/
|
||||||
|
isEnabled(): boolean | Promise<boolean> {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the data needed to render the block.
|
||||||
|
*
|
||||||
|
* @param {Injector} injector Injector.
|
||||||
|
* @param {any} block The block to render.
|
||||||
|
* @param {string} contextLevel The context where the block will be used.
|
||||||
|
* @param {number} instanceId The instance ID associated with the context level.
|
||||||
|
* @return {CoreBlockHandlerData|Promise<CoreBlockHandlerData>} Data or promise resolved with the data.
|
||||||
|
*/
|
||||||
|
getDisplayData?(injector: Injector, block: any, contextLevel: string, instanceId: number)
|
||||||
|
: CoreBlockHandlerData | Promise<CoreBlockHandlerData> {
|
||||||
|
|
||||||
|
return {
|
||||||
|
title: 'addon.block_sitemainmenu.pluginname',
|
||||||
|
class: 'addon-block-sitemainmenu',
|
||||||
|
component: AddonBlockSiteMainMenuComponent
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,44 @@
|
||||||
|
// (C) Copyright 2015 Martin Dougiamas
|
||||||
|
//
|
||||||
|
// 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 { IonicModule } from 'ionic-angular';
|
||||||
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
|
import { CoreComponentsModule } from '@components/components.module';
|
||||||
|
import { CoreDirectivesModule } from '@directives/directives.module';
|
||||||
|
import { AddonBlockSiteMainMenuComponentsModule } from './components/components.module';
|
||||||
|
import { CoreBlockDelegate } from '@core/block/providers/delegate';
|
||||||
|
import { AddonBlockSiteMainMenuHandler } from './providers/block-handler';
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
declarations: [
|
||||||
|
],
|
||||||
|
imports: [
|
||||||
|
IonicModule,
|
||||||
|
CoreComponentsModule,
|
||||||
|
CoreDirectivesModule,
|
||||||
|
AddonBlockSiteMainMenuComponentsModule,
|
||||||
|
TranslateModule.forChild()
|
||||||
|
],
|
||||||
|
exports: [
|
||||||
|
],
|
||||||
|
providers: [
|
||||||
|
AddonBlockSiteMainMenuHandler
|
||||||
|
]
|
||||||
|
})
|
||||||
|
export class AddonBlockSiteMainMenuModule {
|
||||||
|
constructor(blockDelegate: CoreBlockDelegate, blockHandler: AddonBlockSiteMainMenuHandler) {
|
||||||
|
blockDelegate.registerHandler(blockHandler);
|
||||||
|
}
|
||||||
|
}
|
|
@ -19,7 +19,7 @@ import { CoreSitesProvider } from '@providers/sites';
|
||||||
import { CoreCoursesProvider } from '@core/courses/providers/courses';
|
import { CoreCoursesProvider } from '@core/courses/providers/courses';
|
||||||
import { CoreCoursesHelperProvider } from '@core/courses/providers/helper';
|
import { CoreCoursesHelperProvider } from '@core/courses/providers/helper';
|
||||||
import { CoreCourseOptionsDelegate } from '@core/course/providers/options-delegate';
|
import { CoreCourseOptionsDelegate } from '@core/course/providers/options-delegate';
|
||||||
import { AddonBlockComponent } from '../../../classes/block-component';
|
import { CoreBlockBaseComponent } from '@core/block/classes/base-block-component';
|
||||||
import { AddonBlockTimelineProvider } from '../../providers/timeline';
|
import { AddonBlockTimelineProvider } from '../../providers/timeline';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -29,7 +29,7 @@ import { AddonBlockTimelineProvider } from '../../providers/timeline';
|
||||||
selector: 'addon-block-timeline',
|
selector: 'addon-block-timeline',
|
||||||
templateUrl: 'addon-block-timeline.html'
|
templateUrl: 'addon-block-timeline.html'
|
||||||
})
|
})
|
||||||
export class AddonBlockTimelineComponent extends AddonBlockComponent implements OnInit {
|
export class AddonBlockTimelineComponent extends CoreBlockBaseComponent implements OnInit {
|
||||||
sort = 'sortbydates';
|
sort = 'sortbydates';
|
||||||
filter = 'next30days';
|
filter = 'next30days';
|
||||||
currentSite: any;
|
currentSite: any;
|
||||||
|
|
|
@ -29,6 +29,7 @@ import { AddonModAssignModuleHandler } from './providers/module-handler';
|
||||||
import { AddonModAssignPrefetchHandler } from './providers/prefetch-handler';
|
import { AddonModAssignPrefetchHandler } from './providers/prefetch-handler';
|
||||||
import { AddonModAssignSyncCronHandler } from './providers/sync-cron-handler';
|
import { AddonModAssignSyncCronHandler } from './providers/sync-cron-handler';
|
||||||
import { AddonModAssignIndexLinkHandler } from './providers/index-link-handler';
|
import { AddonModAssignIndexLinkHandler } from './providers/index-link-handler';
|
||||||
|
import { AddonModAssignListLinkHandler } from './providers/list-link-handler';
|
||||||
import { AddonModAssignSubmissionModule } from './submission/submission.module';
|
import { AddonModAssignSubmissionModule } from './submission/submission.module';
|
||||||
import { AddonModAssignFeedbackModule } from './feedback/feedback.module';
|
import { AddonModAssignFeedbackModule } from './feedback/feedback.module';
|
||||||
import { CoreUpdateManagerProvider } from '@providers/update-manager';
|
import { CoreUpdateManagerProvider } from '@providers/update-manager';
|
||||||
|
@ -62,18 +63,22 @@ export const ADDON_MOD_ASSIGN_PROVIDERS: any[] = [
|
||||||
AddonModAssignModuleHandler,
|
AddonModAssignModuleHandler,
|
||||||
AddonModAssignPrefetchHandler,
|
AddonModAssignPrefetchHandler,
|
||||||
AddonModAssignSyncCronHandler,
|
AddonModAssignSyncCronHandler,
|
||||||
AddonModAssignIndexLinkHandler
|
AddonModAssignIndexLinkHandler,
|
||||||
|
AddonModAssignListLinkHandler
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class AddonModAssignModule {
|
export class AddonModAssignModule {
|
||||||
constructor(moduleDelegate: CoreCourseModuleDelegate, moduleHandler: AddonModAssignModuleHandler,
|
constructor(moduleDelegate: CoreCourseModuleDelegate, moduleHandler: AddonModAssignModuleHandler,
|
||||||
prefetchDelegate: CoreCourseModulePrefetchDelegate, prefetchHandler: AddonModAssignPrefetchHandler,
|
prefetchDelegate: CoreCourseModulePrefetchDelegate, prefetchHandler: AddonModAssignPrefetchHandler,
|
||||||
cronDelegate: CoreCronDelegate, syncHandler: AddonModAssignSyncCronHandler, updateManager: CoreUpdateManagerProvider,
|
cronDelegate: CoreCronDelegate, syncHandler: AddonModAssignSyncCronHandler, updateManager: CoreUpdateManagerProvider,
|
||||||
contentLinksDelegate: CoreContentLinksDelegate, linkHandler: AddonModAssignIndexLinkHandler) {
|
contentLinksDelegate: CoreContentLinksDelegate, linkHandler: AddonModAssignIndexLinkHandler,
|
||||||
|
listLinkHandler: AddonModAssignListLinkHandler) {
|
||||||
|
|
||||||
moduleDelegate.registerHandler(moduleHandler);
|
moduleDelegate.registerHandler(moduleHandler);
|
||||||
prefetchDelegate.registerHandler(prefetchHandler);
|
prefetchDelegate.registerHandler(prefetchHandler);
|
||||||
cronDelegate.register(syncHandler);
|
cronDelegate.register(syncHandler);
|
||||||
contentLinksDelegate.registerHandler(linkHandler);
|
contentLinksDelegate.registerHandler(linkHandler);
|
||||||
|
contentLinksDelegate.registerHandler(listLinkHandler);
|
||||||
|
|
||||||
// Allow migrating the tables from the old app to the new schema.
|
// Allow migrating the tables from the old app to the new schema.
|
||||||
updateManager.registerSiteTablesMigration([
|
updateManager.registerSiteTablesMigration([
|
||||||
|
|
|
@ -50,6 +50,7 @@
|
||||||
"markingworkflowstatereadyforreview": "Marking completed",
|
"markingworkflowstatereadyforreview": "Marking completed",
|
||||||
"markingworkflowstatereadyforrelease": "Ready for release",
|
"markingworkflowstatereadyforrelease": "Ready for release",
|
||||||
"markingworkflowstatereleased": "Released",
|
"markingworkflowstatereleased": "Released",
|
||||||
|
"modulenameplural": "Assignments",
|
||||||
"multipleteams": "Member of more than one group",
|
"multipleteams": "Member of more than one group",
|
||||||
"multipleteams_desc": "The assignment requires submission in groups. You are a member of more than one group. To be able to submit you must be a member of only one group. Please contact your teacher to change your group membership.",
|
"multipleteams_desc": "The assignment requires submission in groups. You are a member of more than one group. To be able to submit you must be a member of only one group. Please contact your teacher to change your group membership.",
|
||||||
"noattempt": "No attempt",
|
"noattempt": "No attempt",
|
||||||
|
|
|
@ -136,13 +136,20 @@ export class AddonModAssignProvider {
|
||||||
protected getAssignmentByField(courseId: number, key: string, value: any, siteId?: string): Promise<any> {
|
protected getAssignmentByField(courseId: number, key: string, value: any, siteId?: string): Promise<any> {
|
||||||
return this.sitesProvider.getSite(siteId).then((site) => {
|
return this.sitesProvider.getSite(siteId).then((site) => {
|
||||||
const params = {
|
const params = {
|
||||||
courseids: [courseId]
|
courseids: [courseId],
|
||||||
|
includenotenrolledcourses: 1
|
||||||
},
|
},
|
||||||
preSets = {
|
preSets = {
|
||||||
cacheKey: this.getAssignmentCacheKey(courseId)
|
cacheKey: this.getAssignmentCacheKey(courseId)
|
||||||
};
|
};
|
||||||
|
|
||||||
return site.read('mod_assign_get_assignments', params, preSets).then((response) => {
|
return site.read('mod_assign_get_assignments', params, preSets).catch(() => {
|
||||||
|
// In 3.6 we added a new parameter includenotenrolledcourses that could cause offline data not to be found.
|
||||||
|
// Retry again without the param to check if the request is already cached.
|
||||||
|
delete params.includenotenrolledcourses;
|
||||||
|
|
||||||
|
return site.read('mod_assign_get_assignments', params, preSets);
|
||||||
|
}).then((response) => {
|
||||||
// Search the assignment to return.
|
// Search the assignment to return.
|
||||||
if (response.courses && response.courses.length) {
|
if (response.courses && response.courses.length) {
|
||||||
const assignments = response.courses[0].assignments;
|
const assignments = response.courses[0].assignments;
|
||||||
|
|
|
@ -0,0 +1,41 @@
|
||||||
|
// (C) Copyright 2015 Martin Dougiamas
|
||||||
|
//
|
||||||
|
// 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 { Injectable } from '@angular/core';
|
||||||
|
import { CoreContentLinksModuleListHandler } from '@core/contentlinks/classes/module-list-handler';
|
||||||
|
import { CoreContentLinksHelperProvider } from '@core/contentlinks/providers/helper';
|
||||||
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
|
import { AddonModAssignProvider } from './assign';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handler to treat links to assign list page.
|
||||||
|
*/
|
||||||
|
@Injectable()
|
||||||
|
export class AddonModAssignListLinkHandler extends CoreContentLinksModuleListHandler {
|
||||||
|
name = 'AddonModAssignListLinkHandler';
|
||||||
|
|
||||||
|
constructor(linkHelper: CoreContentLinksHelperProvider, translate: TranslateService,
|
||||||
|
protected assignProvider: AddonModAssignProvider) {
|
||||||
|
super(linkHelper, translate, 'AddonModAssign', 'assign');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if the handler is enabled on a site level.
|
||||||
|
*
|
||||||
|
* @return {boolean} Whether or not the handler is enabled on a site level.
|
||||||
|
*/
|
||||||
|
isEnabled(): boolean {
|
||||||
|
return this.assignProvider.isPluginEnabled();
|
||||||
|
}
|
||||||
|
}
|
|
@ -18,6 +18,7 @@ import { CoreCourseModuleHandler, CoreCourseModuleHandlerData } from '@core/cour
|
||||||
import { CoreCourseProvider } from '@core/course/providers/course';
|
import { CoreCourseProvider } from '@core/course/providers/course';
|
||||||
import { AddonModAssignProvider } from './assign';
|
import { AddonModAssignProvider } from './assign';
|
||||||
import { AddonModAssignIndexComponent } from '../components/index/index';
|
import { AddonModAssignIndexComponent } from '../components/index/index';
|
||||||
|
import { CoreConstants } from '@core/constants';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handler to support assign modules.
|
* Handler to support assign modules.
|
||||||
|
@ -27,6 +28,21 @@ export class AddonModAssignModuleHandler implements CoreCourseModuleHandler {
|
||||||
name = 'AddonModAssign';
|
name = 'AddonModAssign';
|
||||||
modName = 'assign';
|
modName = 'assign';
|
||||||
|
|
||||||
|
supportedFeatures = {
|
||||||
|
[CoreConstants.FEATURE_GROUPS]: true,
|
||||||
|
[CoreConstants.FEATURE_GROUPINGS]: true,
|
||||||
|
[CoreConstants.FEATURE_MOD_INTRO]: true,
|
||||||
|
[CoreConstants.FEATURE_COMPLETION_TRACKS_VIEWS]: true,
|
||||||
|
[CoreConstants.FEATURE_COMPLETION_HAS_RULES]: true,
|
||||||
|
[CoreConstants.FEATURE_GRADE_HAS_GRADE]: true,
|
||||||
|
[CoreConstants.FEATURE_GRADE_OUTCOMES]: true,
|
||||||
|
[CoreConstants.FEATURE_BACKUP_MOODLE2]: true,
|
||||||
|
[CoreConstants.FEATURE_SHOW_DESCRIPTION]: true,
|
||||||
|
[CoreConstants.FEATURE_ADVANCED_GRADING]: true,
|
||||||
|
[CoreConstants.FEATURE_PLAGIARISM]: true,
|
||||||
|
[CoreConstants.FEATURE_COMMENT]: true
|
||||||
|
};
|
||||||
|
|
||||||
constructor(private courseProvider: CoreCourseProvider, private assignProvider: AddonModAssignProvider) { }
|
constructor(private courseProvider: CoreCourseProvider, private assignProvider: AddonModAssignProvider) { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -17,6 +17,7 @@ import { AddonModBookComponentsModule } from './components/components.module';
|
||||||
import { AddonModBookProvider } from './providers/book';
|
import { AddonModBookProvider } from './providers/book';
|
||||||
import { AddonModBookModuleHandler } from './providers/module-handler';
|
import { AddonModBookModuleHandler } from './providers/module-handler';
|
||||||
import { AddonModBookLinkHandler } from './providers/link-handler';
|
import { AddonModBookLinkHandler } from './providers/link-handler';
|
||||||
|
import { AddonModBookListLinkHandler } from './providers/list-link-handler';
|
||||||
import { AddonModBookPrefetchHandler } from './providers/prefetch-handler';
|
import { AddonModBookPrefetchHandler } from './providers/prefetch-handler';
|
||||||
import { CoreCourseModuleDelegate } from '@core/course/providers/module-delegate';
|
import { CoreCourseModuleDelegate } from '@core/course/providers/module-delegate';
|
||||||
import { CoreContentLinksDelegate } from '@core/contentlinks/providers/delegate';
|
import { CoreContentLinksDelegate } from '@core/contentlinks/providers/delegate';
|
||||||
|
@ -37,15 +38,19 @@ export const ADDON_MOD_BOOK_PROVIDERS: any[] = [
|
||||||
AddonModBookProvider,
|
AddonModBookProvider,
|
||||||
AddonModBookModuleHandler,
|
AddonModBookModuleHandler,
|
||||||
AddonModBookLinkHandler,
|
AddonModBookLinkHandler,
|
||||||
|
AddonModBookListLinkHandler,
|
||||||
AddonModBookPrefetchHandler
|
AddonModBookPrefetchHandler
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class AddonModBookModule {
|
export class AddonModBookModule {
|
||||||
constructor(moduleDelegate: CoreCourseModuleDelegate, moduleHandler: AddonModBookModuleHandler,
|
constructor(moduleDelegate: CoreCourseModuleDelegate, moduleHandler: AddonModBookModuleHandler,
|
||||||
contentLinksDelegate: CoreContentLinksDelegate, linkHandler: AddonModBookLinkHandler,
|
contentLinksDelegate: CoreContentLinksDelegate, linkHandler: AddonModBookLinkHandler,
|
||||||
prefetchDelegate: CoreCourseModulePrefetchDelegate, prefetchHandler: AddonModBookPrefetchHandler) {
|
prefetchDelegate: CoreCourseModulePrefetchDelegate, prefetchHandler: AddonModBookPrefetchHandler,
|
||||||
|
listLinkHandler: AddonModBookListLinkHandler) {
|
||||||
|
|
||||||
moduleDelegate.registerHandler(moduleHandler);
|
moduleDelegate.registerHandler(moduleHandler);
|
||||||
contentLinksDelegate.registerHandler(linkHandler);
|
contentLinksDelegate.registerHandler(linkHandler);
|
||||||
|
contentLinksDelegate.registerHandler(listLinkHandler);
|
||||||
prefetchDelegate.registerHandler(prefetchHandler);
|
prefetchDelegate.registerHandler(prefetchHandler);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
{
|
{
|
||||||
"errorchapter": "Error reading chapter of book."
|
"errorchapter": "Error reading chapter of book.",
|
||||||
|
"modulenameplural": "Books"
|
||||||
}
|
}
|
|
@ -0,0 +1,46 @@
|
||||||
|
// (C) Copyright 2015 Martin Dougiamas
|
||||||
|
//
|
||||||
|
// 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 { Injectable } from '@angular/core';
|
||||||
|
import { CoreContentLinksModuleListHandler } from '@core/contentlinks/classes/module-list-handler';
|
||||||
|
import { CoreContentLinksHelperProvider } from '@core/contentlinks/providers/helper';
|
||||||
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
|
import { AddonModBookProvider } from './book';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handler to treat links to book list page.
|
||||||
|
*/
|
||||||
|
@Injectable()
|
||||||
|
export class AddonModBookListLinkHandler extends CoreContentLinksModuleListHandler {
|
||||||
|
name = 'AddonModBookListLinkHandler';
|
||||||
|
|
||||||
|
constructor(linkHelper: CoreContentLinksHelperProvider, translate: TranslateService,
|
||||||
|
protected bookProvider: AddonModBookProvider) {
|
||||||
|
super(linkHelper, translate, 'AddonModBook', 'book');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if the handler is enabled for a certain site (site + user) and a URL.
|
||||||
|
* If not defined, defaults to true.
|
||||||
|
*
|
||||||
|
* @param {string} siteId The site ID.
|
||||||
|
* @param {string} url The URL to treat.
|
||||||
|
* @param {any} params The params of the URL. E.g. 'mysite.com?id=1' -> {id: 1}
|
||||||
|
* @param {number} [courseId] Course ID related to the URL. Optional but recommended.
|
||||||
|
* @return {boolean|Promise<boolean>} Whether the handler is enabled for the URL and site.
|
||||||
|
*/
|
||||||
|
isEnabled(siteId: string, url: string, params: any, courseId?: number): boolean | Promise<boolean> {
|
||||||
|
return this.bookProvider.isPluginEnabled();
|
||||||
|
}
|
||||||
|
}
|
|
@ -18,6 +18,7 @@ import { AddonModBookProvider } from './book';
|
||||||
import { AddonModBookIndexComponent } from '../components/index/index';
|
import { AddonModBookIndexComponent } from '../components/index/index';
|
||||||
import { CoreCourseModuleHandler, CoreCourseModuleHandlerData } from '@core/course/providers/module-delegate';
|
import { CoreCourseModuleHandler, CoreCourseModuleHandlerData } from '@core/course/providers/module-delegate';
|
||||||
import { CoreCourseProvider } from '@core/course/providers/course';
|
import { CoreCourseProvider } from '@core/course/providers/course';
|
||||||
|
import { CoreConstants } from '@core/constants';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handler to support book modules.
|
* Handler to support book modules.
|
||||||
|
@ -27,6 +28,18 @@ export class AddonModBookModuleHandler implements CoreCourseModuleHandler {
|
||||||
name = 'AddonModBook';
|
name = 'AddonModBook';
|
||||||
modName = 'book';
|
modName = 'book';
|
||||||
|
|
||||||
|
supportedFeatures = {
|
||||||
|
[CoreConstants.FEATURE_MOD_ARCHETYPE]: CoreConstants.MOD_ARCHETYPE_RESOURCE,
|
||||||
|
[CoreConstants.FEATURE_GROUPS]: false,
|
||||||
|
[CoreConstants.FEATURE_GROUPINGS]: false,
|
||||||
|
[CoreConstants.FEATURE_MOD_INTRO]: true,
|
||||||
|
[CoreConstants.FEATURE_COMPLETION_TRACKS_VIEWS]: true,
|
||||||
|
[CoreConstants.FEATURE_GRADE_HAS_GRADE]: false,
|
||||||
|
[CoreConstants.FEATURE_GRADE_OUTCOMES]: false,
|
||||||
|
[CoreConstants.FEATURE_BACKUP_MOODLE2]: true,
|
||||||
|
[CoreConstants.FEATURE_SHOW_DESCRIPTION]: true
|
||||||
|
};
|
||||||
|
|
||||||
constructor(protected bookProvider: AddonModBookProvider, private courseProvider: CoreCourseProvider) { }
|
constructor(protected bookProvider: AddonModBookProvider, private courseProvider: CoreCourseProvider) { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -18,6 +18,7 @@ import { CoreCourseModuleDelegate } from '@core/course/providers/module-delegate
|
||||||
import { AddonModChatComponentsModule } from './components/components.module';
|
import { AddonModChatComponentsModule } from './components/components.module';
|
||||||
import { AddonModChatProvider } from './providers/chat';
|
import { AddonModChatProvider } from './providers/chat';
|
||||||
import { AddonModChatLinkHandler } from './providers/link-handler';
|
import { AddonModChatLinkHandler } from './providers/link-handler';
|
||||||
|
import { AddonModChatListLinkHandler } from './providers/list-link-handler';
|
||||||
import { AddonModChatModuleHandler } from './providers/module-handler';
|
import { AddonModChatModuleHandler } from './providers/module-handler';
|
||||||
|
|
||||||
// List of providers (without handlers).
|
// List of providers (without handlers).
|
||||||
|
@ -34,13 +35,17 @@ export const ADDON_MOD_CHAT_PROVIDERS: any[] = [
|
||||||
providers: [
|
providers: [
|
||||||
AddonModChatProvider,
|
AddonModChatProvider,
|
||||||
AddonModChatLinkHandler,
|
AddonModChatLinkHandler,
|
||||||
|
AddonModChatListLinkHandler,
|
||||||
AddonModChatModuleHandler,
|
AddonModChatModuleHandler,
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class AddonModChatModule {
|
export class AddonModChatModule {
|
||||||
constructor(moduleDelegate: CoreCourseModuleDelegate, moduleHandler: AddonModChatModuleHandler,
|
constructor(moduleDelegate: CoreCourseModuleDelegate, moduleHandler: AddonModChatModuleHandler,
|
||||||
contentLinksDelegate: CoreContentLinksDelegate, linkHandler: AddonModChatLinkHandler) {
|
contentLinksDelegate: CoreContentLinksDelegate, linkHandler: AddonModChatLinkHandler,
|
||||||
|
listLinkHandler: AddonModChatListLinkHandler) {
|
||||||
|
|
||||||
moduleDelegate.registerHandler(moduleHandler);
|
moduleDelegate.registerHandler(moduleHandler);
|
||||||
contentLinksDelegate.registerHandler(linkHandler);
|
contentLinksDelegate.registerHandler(linkHandler);
|
||||||
|
contentLinksDelegate.registerHandler(listLinkHandler);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
"messagebeepsyou": "{{$a}} has just beeped you!",
|
"messagebeepsyou": "{{$a}} has just beeped you!",
|
||||||
"messageenter": "{{$a}} has just entered this chat",
|
"messageenter": "{{$a}} has just entered this chat",
|
||||||
"messageexit": "{{$a}} has left this chat",
|
"messageexit": "{{$a}} has left this chat",
|
||||||
|
"modulenameplural": "Chats",
|
||||||
"mustbeonlinetosendmessages": "You must be online to send messages.",
|
"mustbeonlinetosendmessages": "You must be online to send messages.",
|
||||||
"nomessages": "No messages yet",
|
"nomessages": "No messages yet",
|
||||||
"send": "Send",
|
"send": "Send",
|
||||||
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
// (C) Copyright 2015 Martin Dougiamas
|
||||||
|
//
|
||||||
|
// 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 { Injectable } from '@angular/core';
|
||||||
|
import { CoreContentLinksModuleListHandler } from '@core/contentlinks/classes/module-list-handler';
|
||||||
|
import { CoreContentLinksHelperProvider } from '@core/contentlinks/providers/helper';
|
||||||
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handler to treat links to chat list page.
|
||||||
|
*/
|
||||||
|
@Injectable()
|
||||||
|
export class AddonModChatListLinkHandler extends CoreContentLinksModuleListHandler {
|
||||||
|
name = 'AddonModChatListLinkHandler';
|
||||||
|
|
||||||
|
constructor(linkHelper: CoreContentLinksHelperProvider, translate: TranslateService) {
|
||||||
|
super(linkHelper, translate, 'AddonModChat', 'chat');
|
||||||
|
}
|
||||||
|
}
|
|
@ -17,6 +17,7 @@ import { NavController, NavOptions } from 'ionic-angular';
|
||||||
import { AddonModChatIndexComponent } from '../components/index/index';
|
import { AddonModChatIndexComponent } from '../components/index/index';
|
||||||
import { CoreCourseModuleHandler, CoreCourseModuleHandlerData } from '@core/course/providers/module-delegate';
|
import { CoreCourseModuleHandler, CoreCourseModuleHandlerData } from '@core/course/providers/module-delegate';
|
||||||
import { CoreCourseProvider } from '@core/course/providers/course';
|
import { CoreCourseProvider } from '@core/course/providers/course';
|
||||||
|
import { CoreConstants } from '@core/constants';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handler to support chat modules.
|
* Handler to support chat modules.
|
||||||
|
@ -26,6 +27,17 @@ export class AddonModChatModuleHandler implements CoreCourseModuleHandler {
|
||||||
name = 'AddonModChat';
|
name = 'AddonModChat';
|
||||||
modName = 'chat';
|
modName = 'chat';
|
||||||
|
|
||||||
|
supportedFeatures = {
|
||||||
|
[CoreConstants.FEATURE_GROUPS]: true,
|
||||||
|
[CoreConstants.FEATURE_GROUPINGS]: true,
|
||||||
|
[CoreConstants.FEATURE_MOD_INTRO]: true,
|
||||||
|
[CoreConstants.FEATURE_COMPLETION_TRACKS_VIEWS]: true,
|
||||||
|
[CoreConstants.FEATURE_GRADE_HAS_GRADE]: false,
|
||||||
|
[CoreConstants.FEATURE_GRADE_OUTCOMES]: true,
|
||||||
|
[CoreConstants.FEATURE_BACKUP_MOODLE2]: true,
|
||||||
|
[CoreConstants.FEATURE_SHOW_DESCRIPTION]: true
|
||||||
|
};
|
||||||
|
|
||||||
constructor(private courseProvider: CoreCourseProvider) { }
|
constructor(private courseProvider: CoreCourseProvider) { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -21,6 +21,7 @@ import { AddonModChoiceComponentsModule } from './components/components.module';
|
||||||
import { AddonModChoiceModuleHandler } from './providers/module-handler';
|
import { AddonModChoiceModuleHandler } from './providers/module-handler';
|
||||||
import { AddonModChoiceProvider } from './providers/choice';
|
import { AddonModChoiceProvider } from './providers/choice';
|
||||||
import { AddonModChoiceLinkHandler } from './providers/link-handler';
|
import { AddonModChoiceLinkHandler } from './providers/link-handler';
|
||||||
|
import { AddonModChoiceListLinkHandler } from './providers/list-link-handler';
|
||||||
import { AddonModChoicePrefetchHandler } from './providers/prefetch-handler';
|
import { AddonModChoicePrefetchHandler } from './providers/prefetch-handler';
|
||||||
import { AddonModChoiceSyncProvider } from './providers/sync';
|
import { AddonModChoiceSyncProvider } from './providers/sync';
|
||||||
import { AddonModChoiceSyncCronHandler } from './providers/sync-cron-handler';
|
import { AddonModChoiceSyncCronHandler } from './providers/sync-cron-handler';
|
||||||
|
@ -47,6 +48,7 @@ export const ADDON_MOD_CHOICE_PROVIDERS: any[] = [
|
||||||
AddonModChoiceModuleHandler,
|
AddonModChoiceModuleHandler,
|
||||||
AddonModChoicePrefetchHandler,
|
AddonModChoicePrefetchHandler,
|
||||||
AddonModChoiceLinkHandler,
|
AddonModChoiceLinkHandler,
|
||||||
|
AddonModChoiceListLinkHandler,
|
||||||
AddonModChoiceSyncCronHandler
|
AddonModChoiceSyncCronHandler
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
@ -54,10 +56,13 @@ export class AddonModChoiceModule {
|
||||||
constructor(moduleDelegate: CoreCourseModuleDelegate, moduleHandler: AddonModChoiceModuleHandler,
|
constructor(moduleDelegate: CoreCourseModuleDelegate, moduleHandler: AddonModChoiceModuleHandler,
|
||||||
prefetchDelegate: CoreCourseModulePrefetchDelegate, prefetchHandler: AddonModChoicePrefetchHandler,
|
prefetchDelegate: CoreCourseModulePrefetchDelegate, prefetchHandler: AddonModChoicePrefetchHandler,
|
||||||
contentLinksDelegate: CoreContentLinksDelegate, linkHandler: AddonModChoiceLinkHandler,
|
contentLinksDelegate: CoreContentLinksDelegate, linkHandler: AddonModChoiceLinkHandler,
|
||||||
cronDelegate: CoreCronDelegate, syncHandler: AddonModChoiceSyncCronHandler, updateManager: CoreUpdateManagerProvider) {
|
cronDelegate: CoreCronDelegate, syncHandler: AddonModChoiceSyncCronHandler, updateManager: CoreUpdateManagerProvider,
|
||||||
|
listLinkHandler: AddonModChoiceListLinkHandler) {
|
||||||
|
|
||||||
moduleDelegate.registerHandler(moduleHandler);
|
moduleDelegate.registerHandler(moduleHandler);
|
||||||
prefetchDelegate.registerHandler(prefetchHandler);
|
prefetchDelegate.registerHandler(prefetchHandler);
|
||||||
contentLinksDelegate.registerHandler(linkHandler);
|
contentLinksDelegate.registerHandler(linkHandler);
|
||||||
|
contentLinksDelegate.registerHandler(listLinkHandler);
|
||||||
cronDelegate.register(syncHandler);
|
cronDelegate.register(syncHandler);
|
||||||
|
|
||||||
// Allow migrating the tables from the old app to the new schema.
|
// Allow migrating the tables from the old app to the new schema.
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"errorgetchoice": "Error getting choice data.",
|
"errorgetchoice": "Error getting choice data.",
|
||||||
"expired": "Sorry, this activity closed on {{$a}} and is no longer available",
|
"expired": "Sorry, this activity closed on {{$a}} and is no longer available",
|
||||||
"full": "(Full)",
|
"full": "(Full)",
|
||||||
|
"modulenameplural": "Choices",
|
||||||
"noresultsviewable": "The results are not currently viewable.",
|
"noresultsviewable": "The results are not currently viewable.",
|
||||||
"notopenyet": "Sorry, this activity is not available until {{$a}}",
|
"notopenyet": "Sorry, this activity is not available until {{$a}}",
|
||||||
"numberofuser": "Number of responses",
|
"numberofuser": "Number of responses",
|
||||||
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
// (C) Copyright 2015 Martin Dougiamas
|
||||||
|
//
|
||||||
|
// 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 { Injectable } from '@angular/core';
|
||||||
|
import { CoreContentLinksModuleListHandler } from '@core/contentlinks/classes/module-list-handler';
|
||||||
|
import { CoreContentLinksHelperProvider } from '@core/contentlinks/providers/helper';
|
||||||
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handler to treat links to choice list page.
|
||||||
|
*/
|
||||||
|
@Injectable()
|
||||||
|
export class AddonModChoiceListLinkHandler extends CoreContentLinksModuleListHandler {
|
||||||
|
name = 'AddonModChoiceListLinkHandler';
|
||||||
|
|
||||||
|
constructor(linkHelper: CoreContentLinksHelperProvider, translate: TranslateService) {
|
||||||
|
super(linkHelper, translate, 'AddonModChoice', 'choice');
|
||||||
|
}
|
||||||
|
}
|
|
@ -17,6 +17,7 @@ import { NavController, NavOptions } from 'ionic-angular';
|
||||||
import { AddonModChoiceIndexComponent } from '../components/index/index';
|
import { AddonModChoiceIndexComponent } from '../components/index/index';
|
||||||
import { CoreCourseModuleHandler, CoreCourseModuleHandlerData } from '@core/course/providers/module-delegate';
|
import { CoreCourseModuleHandler, CoreCourseModuleHandlerData } from '@core/course/providers/module-delegate';
|
||||||
import { CoreCourseProvider } from '@core/course/providers/course';
|
import { CoreCourseProvider } from '@core/course/providers/course';
|
||||||
|
import { CoreConstants } from '@core/constants';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handler to support choice modules.
|
* Handler to support choice modules.
|
||||||
|
@ -26,6 +27,18 @@ export class AddonModChoiceModuleHandler implements CoreCourseModuleHandler {
|
||||||
name = 'AddonModChoice';
|
name = 'AddonModChoice';
|
||||||
modName = 'choice';
|
modName = 'choice';
|
||||||
|
|
||||||
|
supportedFeatures = {
|
||||||
|
[CoreConstants.FEATURE_GROUPS]: true,
|
||||||
|
[CoreConstants.FEATURE_GROUPINGS]: true,
|
||||||
|
[CoreConstants.FEATURE_MOD_INTRO]: true,
|
||||||
|
[CoreConstants.FEATURE_COMPLETION_TRACKS_VIEWS]: true,
|
||||||
|
[CoreConstants.FEATURE_COMPLETION_HAS_RULES]: true,
|
||||||
|
[CoreConstants.FEATURE_GRADE_HAS_GRADE]: false,
|
||||||
|
[CoreConstants.FEATURE_GRADE_OUTCOMES]: false,
|
||||||
|
[CoreConstants.FEATURE_BACKUP_MOODLE2]: true,
|
||||||
|
[CoreConstants.FEATURE_SHOW_DESCRIPTION]: true
|
||||||
|
};
|
||||||
|
|
||||||
constructor(private courseProvider: CoreCourseProvider) { }
|
constructor(private courseProvider: CoreCourseProvider) { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -25,6 +25,7 @@ import { AddonModDataApproveLinkHandler } from './providers/approve-link-handler
|
||||||
import { AddonModDataDeleteLinkHandler } from './providers/delete-link-handler';
|
import { AddonModDataDeleteLinkHandler } from './providers/delete-link-handler';
|
||||||
import { AddonModDataShowLinkHandler } from './providers/show-link-handler';
|
import { AddonModDataShowLinkHandler } from './providers/show-link-handler';
|
||||||
import { AddonModDataEditLinkHandler } from './providers/edit-link-handler';
|
import { AddonModDataEditLinkHandler } from './providers/edit-link-handler';
|
||||||
|
import { AddonModDataListLinkHandler } from './providers/list-link-handler';
|
||||||
import { AddonModDataHelperProvider } from './providers/helper';
|
import { AddonModDataHelperProvider } from './providers/helper';
|
||||||
import { AddonModDataPrefetchHandler } from './providers/prefetch-handler';
|
import { AddonModDataPrefetchHandler } from './providers/prefetch-handler';
|
||||||
import { AddonModDataSyncProvider } from './providers/sync';
|
import { AddonModDataSyncProvider } from './providers/sync';
|
||||||
|
@ -64,6 +65,7 @@ export const ADDON_MOD_DATA_PROVIDERS: any[] = [
|
||||||
AddonModDataDeleteLinkHandler,
|
AddonModDataDeleteLinkHandler,
|
||||||
AddonModDataShowLinkHandler,
|
AddonModDataShowLinkHandler,
|
||||||
AddonModDataEditLinkHandler,
|
AddonModDataEditLinkHandler,
|
||||||
|
AddonModDataListLinkHandler,
|
||||||
AddonModDataSyncCronHandler,
|
AddonModDataSyncCronHandler,
|
||||||
AddonModDataDefaultFieldHandler
|
AddonModDataDefaultFieldHandler
|
||||||
]
|
]
|
||||||
|
@ -74,7 +76,9 @@ export class AddonModDataModule {
|
||||||
contentLinksDelegate: CoreContentLinksDelegate, linkHandler: AddonModDataLinkHandler,
|
contentLinksDelegate: CoreContentLinksDelegate, linkHandler: AddonModDataLinkHandler,
|
||||||
cronDelegate: CoreCronDelegate, syncHandler: AddonModDataSyncCronHandler, updateManager: CoreUpdateManagerProvider,
|
cronDelegate: CoreCronDelegate, syncHandler: AddonModDataSyncCronHandler, updateManager: CoreUpdateManagerProvider,
|
||||||
approveLinkHandler: AddonModDataApproveLinkHandler, deleteLinkHandler: AddonModDataDeleteLinkHandler,
|
approveLinkHandler: AddonModDataApproveLinkHandler, deleteLinkHandler: AddonModDataDeleteLinkHandler,
|
||||||
showLinkHandler: AddonModDataShowLinkHandler, editLinkHandler: AddonModDataEditLinkHandler) {
|
showLinkHandler: AddonModDataShowLinkHandler, editLinkHandler: AddonModDataEditLinkHandler,
|
||||||
|
listLinkHandler: AddonModDataListLinkHandler) {
|
||||||
|
|
||||||
moduleDelegate.registerHandler(moduleHandler);
|
moduleDelegate.registerHandler(moduleHandler);
|
||||||
prefetchDelegate.registerHandler(prefetchHandler);
|
prefetchDelegate.registerHandler(prefetchHandler);
|
||||||
contentLinksDelegate.registerHandler(linkHandler);
|
contentLinksDelegate.registerHandler(linkHandler);
|
||||||
|
@ -82,6 +86,7 @@ export class AddonModDataModule {
|
||||||
contentLinksDelegate.registerHandler(deleteLinkHandler);
|
contentLinksDelegate.registerHandler(deleteLinkHandler);
|
||||||
contentLinksDelegate.registerHandler(showLinkHandler);
|
contentLinksDelegate.registerHandler(showLinkHandler);
|
||||||
contentLinksDelegate.registerHandler(editLinkHandler);
|
contentLinksDelegate.registerHandler(editLinkHandler);
|
||||||
|
contentLinksDelegate.registerHandler(listLinkHandler);
|
||||||
cronDelegate.register(syncHandler);
|
cronDelegate.register(syncHandler);
|
||||||
|
|
||||||
// Allow migrating the tables from the old app to the new schema.
|
// Allow migrating the tables from the old app to the new schema.
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
"fields": "Fields",
|
"fields": "Fields",
|
||||||
"latlongboth": "Both latitude and longitude are required.",
|
"latlongboth": "Both latitude and longitude are required.",
|
||||||
"menuchoose": "Choose...",
|
"menuchoose": "Choose...",
|
||||||
|
"modulenameplural": "Databases",
|
||||||
"more": "More",
|
"more": "More",
|
||||||
"nomatch": "No matching entries found!",
|
"nomatch": "No matching entries found!",
|
||||||
"norecords": "No entries in database",
|
"norecords": "No entries in database",
|
||||||
|
|
|
@ -0,0 +1,41 @@
|
||||||
|
// (C) Copyright 2015 Martin Dougiamas
|
||||||
|
//
|
||||||
|
// 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 { Injectable } from '@angular/core';
|
||||||
|
import { CoreContentLinksModuleListHandler } from '@core/contentlinks/classes/module-list-handler';
|
||||||
|
import { CoreContentLinksHelperProvider } from '@core/contentlinks/providers/helper';
|
||||||
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
|
import { AddonModDataProvider } from './data';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handler to treat links to data list page.
|
||||||
|
*/
|
||||||
|
@Injectable()
|
||||||
|
export class AddonModDataListLinkHandler extends CoreContentLinksModuleListHandler {
|
||||||
|
name = 'AddonModDataListLinkHandler';
|
||||||
|
|
||||||
|
constructor(linkHelper: CoreContentLinksHelperProvider, translate: TranslateService,
|
||||||
|
protected dataProvider: AddonModDataProvider) {
|
||||||
|
super(linkHelper, translate, 'AddonModData', 'data');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if the handler is enabled on a site level.
|
||||||
|
*
|
||||||
|
* @return {Promise<boolean>} Whether or not the handler is enabled on a site level.
|
||||||
|
*/
|
||||||
|
isEnabled(): Promise<boolean> {
|
||||||
|
return this.dataProvider.isPluginEnabled();
|
||||||
|
}
|
||||||
|
}
|
|
@ -18,6 +18,7 @@ import { AddonModDataIndexComponent } from '../components/index/index';
|
||||||
import { CoreCourseModuleHandler, CoreCourseModuleHandlerData } from '@core/course/providers/module-delegate';
|
import { CoreCourseModuleHandler, CoreCourseModuleHandlerData } from '@core/course/providers/module-delegate';
|
||||||
import { CoreCourseProvider } from '@core/course/providers/course';
|
import { CoreCourseProvider } from '@core/course/providers/course';
|
||||||
import { AddonModDataProvider } from './data';
|
import { AddonModDataProvider } from './data';
|
||||||
|
import { CoreConstants } from '@core/constants';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handler to support data modules.
|
* Handler to support data modules.
|
||||||
|
@ -27,6 +28,20 @@ export class AddonModDataModuleHandler implements CoreCourseModuleHandler {
|
||||||
name = 'AddonModData';
|
name = 'AddonModData';
|
||||||
modName = 'data';
|
modName = 'data';
|
||||||
|
|
||||||
|
supportedFeatures = {
|
||||||
|
[CoreConstants.FEATURE_GROUPS]: true,
|
||||||
|
[CoreConstants.FEATURE_GROUPINGS]: true,
|
||||||
|
[CoreConstants.FEATURE_MOD_INTRO]: true,
|
||||||
|
[CoreConstants.FEATURE_COMPLETION_TRACKS_VIEWS]: true,
|
||||||
|
[CoreConstants.FEATURE_COMPLETION_HAS_RULES]: true,
|
||||||
|
[CoreConstants.FEATURE_GRADE_HAS_GRADE]: true,
|
||||||
|
[CoreConstants.FEATURE_GRADE_OUTCOMES]: true,
|
||||||
|
[CoreConstants.FEATURE_BACKUP_MOODLE2]: true,
|
||||||
|
[CoreConstants.FEATURE_SHOW_DESCRIPTION]: true,
|
||||||
|
[CoreConstants.FEATURE_RATE]: true,
|
||||||
|
[CoreConstants.FEATURE_COMMENT]: true
|
||||||
|
};
|
||||||
|
|
||||||
constructor(private courseProvider: CoreCourseProvider, private dataProvider: AddonModDataProvider) { }
|
constructor(private courseProvider: CoreCourseProvider, private dataProvider: AddonModDataProvider) { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -26,6 +26,7 @@ import { AddonModFeedbackShowEntriesLinkHandler } from './providers/show-entries
|
||||||
import { AddonModFeedbackShowNonRespondentsLinkHandler } from './providers/show-non-respondents-link-handler';
|
import { AddonModFeedbackShowNonRespondentsLinkHandler } from './providers/show-non-respondents-link-handler';
|
||||||
import { AddonModFeedbackCompleteLinkHandler } from './providers/complete-link-handler';
|
import { AddonModFeedbackCompleteLinkHandler } from './providers/complete-link-handler';
|
||||||
import { AddonModFeedbackPrintLinkHandler } from './providers/print-link-handler';
|
import { AddonModFeedbackPrintLinkHandler } from './providers/print-link-handler';
|
||||||
|
import { AddonModFeedbackListLinkHandler } from './providers/list-link-handler';
|
||||||
import { AddonModFeedbackHelperProvider } from './providers/helper';
|
import { AddonModFeedbackHelperProvider } from './providers/helper';
|
||||||
import { AddonModFeedbackPrefetchHandler } from './providers/prefetch-handler';
|
import { AddonModFeedbackPrefetchHandler } from './providers/prefetch-handler';
|
||||||
import { AddonModFeedbackSyncProvider } from './providers/sync';
|
import { AddonModFeedbackSyncProvider } from './providers/sync';
|
||||||
|
@ -60,6 +61,7 @@ export const ADDON_MOD_FEEDBACK_PROVIDERS: any[] = [
|
||||||
AddonModFeedbackShowNonRespondentsLinkHandler,
|
AddonModFeedbackShowNonRespondentsLinkHandler,
|
||||||
AddonModFeedbackCompleteLinkHandler,
|
AddonModFeedbackCompleteLinkHandler,
|
||||||
AddonModFeedbackPrintLinkHandler,
|
AddonModFeedbackPrintLinkHandler,
|
||||||
|
AddonModFeedbackListLinkHandler,
|
||||||
AddonModFeedbackSyncCronHandler
|
AddonModFeedbackSyncCronHandler
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
@ -72,7 +74,8 @@ export class AddonModFeedbackModule {
|
||||||
showEntriesLinkHandler: AddonModFeedbackShowEntriesLinkHandler,
|
showEntriesLinkHandler: AddonModFeedbackShowEntriesLinkHandler,
|
||||||
showNonRespondentsLinkHandler: AddonModFeedbackShowNonRespondentsLinkHandler,
|
showNonRespondentsLinkHandler: AddonModFeedbackShowNonRespondentsLinkHandler,
|
||||||
completeLinkHandler: AddonModFeedbackCompleteLinkHandler,
|
completeLinkHandler: AddonModFeedbackCompleteLinkHandler,
|
||||||
printLinkHandler: AddonModFeedbackPrintLinkHandler) {
|
printLinkHandler: AddonModFeedbackPrintLinkHandler, listLinkHandler: AddonModFeedbackListLinkHandler) {
|
||||||
|
|
||||||
moduleDelegate.registerHandler(moduleHandler);
|
moduleDelegate.registerHandler(moduleHandler);
|
||||||
prefetchDelegate.registerHandler(prefetchHandler);
|
prefetchDelegate.registerHandler(prefetchHandler);
|
||||||
contentLinksDelegate.registerHandler(linkHandler);
|
contentLinksDelegate.registerHandler(linkHandler);
|
||||||
|
@ -81,6 +84,7 @@ export class AddonModFeedbackModule {
|
||||||
contentLinksDelegate.registerHandler(showNonRespondentsLinkHandler);
|
contentLinksDelegate.registerHandler(showNonRespondentsLinkHandler);
|
||||||
contentLinksDelegate.registerHandler(completeLinkHandler);
|
contentLinksDelegate.registerHandler(completeLinkHandler);
|
||||||
contentLinksDelegate.registerHandler(printLinkHandler);
|
contentLinksDelegate.registerHandler(printLinkHandler);
|
||||||
|
contentLinksDelegate.registerHandler(listLinkHandler);
|
||||||
cronDelegate.register(syncHandler);
|
cronDelegate.register(syncHandler);
|
||||||
|
|
||||||
// Allow migrating the tables from the old app to the new schema.
|
// Allow migrating the tables from the old app to the new schema.
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
"feedback_submitted_offline": "This feedback has been saved to be submitted later.",
|
"feedback_submitted_offline": "This feedback has been saved to be submitted later.",
|
||||||
"mapcourses": "Map feedback to courses",
|
"mapcourses": "Map feedback to courses",
|
||||||
"mode": "Mode",
|
"mode": "Mode",
|
||||||
|
"modulenameplural": "Feedback",
|
||||||
"next_page": "Next page",
|
"next_page": "Next page",
|
||||||
"non_anonymous": "User's name will be logged and shown with answers",
|
"non_anonymous": "User's name will be logged and shown with answers",
|
||||||
"non_anonymous_entries": "Non anonymous entries ({{$a}})",
|
"non_anonymous_entries": "Non anonymous entries ({{$a}})",
|
||||||
|
|
|
@ -0,0 +1,41 @@
|
||||||
|
// (C) Copyright 2015 Martin Dougiamas
|
||||||
|
//
|
||||||
|
// 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 { Injectable } from '@angular/core';
|
||||||
|
import { CoreContentLinksModuleListHandler } from '@core/contentlinks/classes/module-list-handler';
|
||||||
|
import { CoreContentLinksHelperProvider } from '@core/contentlinks/providers/helper';
|
||||||
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
|
import { AddonModFeedbackProvider } from './feedback';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handler to treat links to feedback list page.
|
||||||
|
*/
|
||||||
|
@Injectable()
|
||||||
|
export class AddonModFeedbackListLinkHandler extends CoreContentLinksModuleListHandler {
|
||||||
|
name = 'AddonModFeedbackListLinkHandler';
|
||||||
|
|
||||||
|
constructor(linkHelper: CoreContentLinksHelperProvider, translate: TranslateService,
|
||||||
|
protected feedbackProvider: AddonModFeedbackProvider) {
|
||||||
|
super(linkHelper, translate, 'AddonModFeedback', 'feedback');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if the handler is enabled on a site level.
|
||||||
|
*
|
||||||
|
* @return {Promise<boolean>} Whether or not the handler is enabled on a site level.
|
||||||
|
*/
|
||||||
|
isEnabled(): Promise<boolean> {
|
||||||
|
return this.feedbackProvider.isPluginEnabled();
|
||||||
|
}
|
||||||
|
}
|
|
@ -18,6 +18,7 @@ import { AddonModFeedbackIndexComponent } from '../components/index/index';
|
||||||
import { CoreCourseModuleHandler, CoreCourseModuleHandlerData } from '@core/course/providers/module-delegate';
|
import { CoreCourseModuleHandler, CoreCourseModuleHandlerData } from '@core/course/providers/module-delegate';
|
||||||
import { CoreCourseProvider } from '@core/course/providers/course';
|
import { CoreCourseProvider } from '@core/course/providers/course';
|
||||||
import { AddonModFeedbackProvider } from './feedback';
|
import { AddonModFeedbackProvider } from './feedback';
|
||||||
|
import { CoreConstants } from '@core/constants';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handler to support feedback modules.
|
* Handler to support feedback modules.
|
||||||
|
@ -27,6 +28,18 @@ export class AddonModFeedbackModuleHandler implements CoreCourseModuleHandler {
|
||||||
name = 'AddonModFeedback';
|
name = 'AddonModFeedback';
|
||||||
modName = 'feedback';
|
modName = 'feedback';
|
||||||
|
|
||||||
|
supportedFeatures = {
|
||||||
|
[CoreConstants.FEATURE_GROUPS]: true,
|
||||||
|
[CoreConstants.FEATURE_GROUPINGS]: true,
|
||||||
|
[CoreConstants.FEATURE_MOD_INTRO]: true,
|
||||||
|
[CoreConstants.FEATURE_COMPLETION_TRACKS_VIEWS]: true,
|
||||||
|
[CoreConstants.FEATURE_COMPLETION_HAS_RULES]: true,
|
||||||
|
[CoreConstants.FEATURE_GRADE_HAS_GRADE]: false,
|
||||||
|
[CoreConstants.FEATURE_GRADE_OUTCOMES]: false,
|
||||||
|
[CoreConstants.FEATURE_BACKUP_MOODLE2]: true,
|
||||||
|
[CoreConstants.FEATURE_SHOW_DESCRIPTION]: true
|
||||||
|
};
|
||||||
|
|
||||||
constructor(private courseProvider: CoreCourseProvider, private feedbackProvider: AddonModFeedbackProvider) { }
|
constructor(private courseProvider: CoreCourseProvider, private feedbackProvider: AddonModFeedbackProvider) { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -20,6 +20,7 @@ import { CoreCourseModuleDelegate } from '@core/course/providers/module-delegate
|
||||||
import { AddonModFolderComponentsModule } from './components/components.module';
|
import { AddonModFolderComponentsModule } from './components/components.module';
|
||||||
import { AddonModFolderPrefetchHandler } from './providers/prefetch-handler';
|
import { AddonModFolderPrefetchHandler } from './providers/prefetch-handler';
|
||||||
import { AddonModFolderLinkHandler } from './providers/link-handler';
|
import { AddonModFolderLinkHandler } from './providers/link-handler';
|
||||||
|
import { AddonModFolderListLinkHandler } from './providers/list-link-handler';
|
||||||
import { AddonModFolderPluginFileHandler } from './providers/pluginfile-handler';
|
import { AddonModFolderPluginFileHandler } from './providers/pluginfile-handler';
|
||||||
import { CoreContentLinksDelegate } from '@core/contentlinks/providers/delegate';
|
import { CoreContentLinksDelegate } from '@core/contentlinks/providers/delegate';
|
||||||
import { CoreCourseModulePrefetchDelegate } from '@core/course/providers/module-prefetch-delegate';
|
import { CoreCourseModulePrefetchDelegate } from '@core/course/providers/module-prefetch-delegate';
|
||||||
|
@ -43,6 +44,7 @@ export const ADDON_MOD_FOLDER_PROVIDERS: any[] = [
|
||||||
AddonModFolderModuleHandler,
|
AddonModFolderModuleHandler,
|
||||||
AddonModFolderPrefetchHandler,
|
AddonModFolderPrefetchHandler,
|
||||||
AddonModFolderLinkHandler,
|
AddonModFolderLinkHandler,
|
||||||
|
AddonModFolderListLinkHandler,
|
||||||
AddonModFolderPluginFileHandler
|
AddonModFolderPluginFileHandler
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
@ -50,10 +52,13 @@ export class AddonModFolderModule {
|
||||||
constructor(moduleDelegate: CoreCourseModuleDelegate, moduleHandler: AddonModFolderModuleHandler,
|
constructor(moduleDelegate: CoreCourseModuleDelegate, moduleHandler: AddonModFolderModuleHandler,
|
||||||
prefetchDelegate: CoreCourseModulePrefetchDelegate, prefetchHandler: AddonModFolderPrefetchHandler,
|
prefetchDelegate: CoreCourseModulePrefetchDelegate, prefetchHandler: AddonModFolderPrefetchHandler,
|
||||||
contentLinksDelegate: CoreContentLinksDelegate, linkHandler: AddonModFolderLinkHandler,
|
contentLinksDelegate: CoreContentLinksDelegate, linkHandler: AddonModFolderLinkHandler,
|
||||||
pluginfileDelegate: CorePluginFileDelegate, pluginfileHandler: AddonModFolderPluginFileHandler) {
|
pluginfileDelegate: CorePluginFileDelegate, pluginfileHandler: AddonModFolderPluginFileHandler,
|
||||||
|
listLinkHandler: AddonModFolderListLinkHandler) {
|
||||||
|
|
||||||
moduleDelegate.registerHandler(moduleHandler);
|
moduleDelegate.registerHandler(moduleHandler);
|
||||||
prefetchDelegate.registerHandler(prefetchHandler);
|
prefetchDelegate.registerHandler(prefetchHandler);
|
||||||
contentLinksDelegate.registerHandler(linkHandler);
|
contentLinksDelegate.registerHandler(linkHandler);
|
||||||
|
contentLinksDelegate.registerHandler(listLinkHandler);
|
||||||
pluginfileDelegate.registerHandler(pluginfileHandler);
|
pluginfileDelegate.registerHandler(pluginfileHandler);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
{
|
{
|
||||||
"emptyfilelist": "There are no files to show."
|
"emptyfilelist": "There are no files to show.",
|
||||||
|
"modulenameplural": "Folders"
|
||||||
}
|
}
|
|
@ -0,0 +1,30 @@
|
||||||
|
// (C) Copyright 2015 Martin Dougiamas
|
||||||
|
//
|
||||||
|
// 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 { Injectable } from '@angular/core';
|
||||||
|
import { CoreContentLinksModuleListHandler } from '@core/contentlinks/classes/module-list-handler';
|
||||||
|
import { CoreContentLinksHelperProvider } from '@core/contentlinks/providers/helper';
|
||||||
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handler to treat links to folder list page.
|
||||||
|
*/
|
||||||
|
@Injectable()
|
||||||
|
export class AddonModFolderListLinkHandler extends CoreContentLinksModuleListHandler {
|
||||||
|
name = 'AddonModFolderListLinkHandler';
|
||||||
|
|
||||||
|
constructor(linkHelper: CoreContentLinksHelperProvider, translate: TranslateService) {
|
||||||
|
super(linkHelper, translate, 'AddonModFolder', 'folder');
|
||||||
|
}
|
||||||
|
}
|
|
@ -17,6 +17,7 @@ import { NavController, NavOptions } from 'ionic-angular';
|
||||||
import { AddonModFolderIndexComponent } from '../components/index/index';
|
import { AddonModFolderIndexComponent } from '../components/index/index';
|
||||||
import { CoreCourseModuleHandler, CoreCourseModuleHandlerData } from '@core/course/providers/module-delegate';
|
import { CoreCourseModuleHandler, CoreCourseModuleHandlerData } from '@core/course/providers/module-delegate';
|
||||||
import { CoreCourseProvider } from '@core/course/providers/course';
|
import { CoreCourseProvider } from '@core/course/providers/course';
|
||||||
|
import { CoreConstants } from '@core/constants';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handler to support folder modules.
|
* Handler to support folder modules.
|
||||||
|
@ -26,6 +27,18 @@ export class AddonModFolderModuleHandler implements CoreCourseModuleHandler {
|
||||||
name = 'AddonModFolder';
|
name = 'AddonModFolder';
|
||||||
modName = 'folder';
|
modName = 'folder';
|
||||||
|
|
||||||
|
supportedFeatures = {
|
||||||
|
[CoreConstants.FEATURE_MOD_ARCHETYPE]: CoreConstants.MOD_ARCHETYPE_RESOURCE,
|
||||||
|
[CoreConstants.FEATURE_GROUPS]: false,
|
||||||
|
[CoreConstants.FEATURE_GROUPINGS]: false,
|
||||||
|
[CoreConstants.FEATURE_MOD_INTRO]: true,
|
||||||
|
[CoreConstants.FEATURE_COMPLETION_TRACKS_VIEWS]: true,
|
||||||
|
[CoreConstants.FEATURE_GRADE_HAS_GRADE]: false,
|
||||||
|
[CoreConstants.FEATURE_GRADE_OUTCOMES]: false,
|
||||||
|
[CoreConstants.FEATURE_BACKUP_MOODLE2]: true,
|
||||||
|
[CoreConstants.FEATURE_SHOW_DESCRIPTION]: true
|
||||||
|
};
|
||||||
|
|
||||||
constructor(private courseProvider: CoreCourseProvider) { }
|
constructor(private courseProvider: CoreCourseProvider) { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -26,6 +26,7 @@ import { AddonModForumPrefetchHandler } from './providers/prefetch-handler';
|
||||||
import { AddonModForumSyncCronHandler } from './providers/sync-cron-handler';
|
import { AddonModForumSyncCronHandler } from './providers/sync-cron-handler';
|
||||||
import { AddonModForumIndexLinkHandler } from './providers/index-link-handler';
|
import { AddonModForumIndexLinkHandler } from './providers/index-link-handler';
|
||||||
import { AddonModForumDiscussionLinkHandler } from './providers/discussion-link-handler';
|
import { AddonModForumDiscussionLinkHandler } from './providers/discussion-link-handler';
|
||||||
|
import { AddonModForumListLinkHandler } from './providers/list-link-handler';
|
||||||
import { AddonModForumComponentsModule } from './components/components.module';
|
import { AddonModForumComponentsModule } from './components/components.module';
|
||||||
import { CoreUpdateManagerProvider } from '@providers/update-manager';
|
import { CoreUpdateManagerProvider } from '@providers/update-manager';
|
||||||
|
|
||||||
|
@ -52,6 +53,7 @@ export const ADDON_MOD_FORUM_PROVIDERS: any[] = [
|
||||||
AddonModForumPrefetchHandler,
|
AddonModForumPrefetchHandler,
|
||||||
AddonModForumSyncCronHandler,
|
AddonModForumSyncCronHandler,
|
||||||
AddonModForumIndexLinkHandler,
|
AddonModForumIndexLinkHandler,
|
||||||
|
AddonModForumListLinkHandler,
|
||||||
AddonModForumDiscussionLinkHandler
|
AddonModForumDiscussionLinkHandler
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
@ -60,13 +62,14 @@ export class AddonModForumModule {
|
||||||
prefetchDelegate: CoreCourseModulePrefetchDelegate, prefetchHandler: AddonModForumPrefetchHandler,
|
prefetchDelegate: CoreCourseModulePrefetchDelegate, prefetchHandler: AddonModForumPrefetchHandler,
|
||||||
cronDelegate: CoreCronDelegate, syncHandler: AddonModForumSyncCronHandler, linksDelegate: CoreContentLinksDelegate,
|
cronDelegate: CoreCronDelegate, syncHandler: AddonModForumSyncCronHandler, linksDelegate: CoreContentLinksDelegate,
|
||||||
indexHandler: AddonModForumIndexLinkHandler, discussionHandler: AddonModForumDiscussionLinkHandler,
|
indexHandler: AddonModForumIndexLinkHandler, discussionHandler: AddonModForumDiscussionLinkHandler,
|
||||||
updateManager: CoreUpdateManagerProvider) {
|
updateManager: CoreUpdateManagerProvider, listLinkHandler: AddonModForumListLinkHandler) {
|
||||||
|
|
||||||
moduleDelegate.registerHandler(moduleHandler);
|
moduleDelegate.registerHandler(moduleHandler);
|
||||||
prefetchDelegate.registerHandler(prefetchHandler);
|
prefetchDelegate.registerHandler(prefetchHandler);
|
||||||
cronDelegate.register(syncHandler);
|
cronDelegate.register(syncHandler);
|
||||||
linksDelegate.registerHandler(indexHandler);
|
linksDelegate.registerHandler(indexHandler);
|
||||||
linksDelegate.registerHandler(discussionHandler);
|
linksDelegate.registerHandler(discussionHandler);
|
||||||
|
linksDelegate.registerHandler(listLinkHandler);
|
||||||
|
|
||||||
// Allow migrating the tables from the old app to the new schema.
|
// Allow migrating the tables from the old app to the new schema.
|
||||||
updateManager.registerSiteTablesMigration([
|
updateManager.registerSiteTablesMigration([
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
"modeflatnewestfirst": "Display replies flat, with newest first",
|
"modeflatnewestfirst": "Display replies flat, with newest first",
|
||||||
"modeflatoldestfirst": "Display replies flat, with oldest first",
|
"modeflatoldestfirst": "Display replies flat, with oldest first",
|
||||||
"modenested": "Display replies in nested form",
|
"modenested": "Display replies in nested form",
|
||||||
|
"modulenameplural": "Forums",
|
||||||
"numdiscussions": "{{numdiscussions}} discussions",
|
"numdiscussions": "{{numdiscussions}} discussions",
|
||||||
"numreplies": "{{numreplies}} replies",
|
"numreplies": "{{numreplies}} replies",
|
||||||
"posttoforum": "Post to forum",
|
"posttoforum": "Post to forum",
|
||||||
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
// (C) Copyright 2015 Martin Dougiamas
|
||||||
|
//
|
||||||
|
// 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 { Injectable } from '@angular/core';
|
||||||
|
import { CoreContentLinksModuleListHandler } from '@core/contentlinks/classes/module-list-handler';
|
||||||
|
import { CoreContentLinksHelperProvider } from '@core/contentlinks/providers/helper';
|
||||||
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handler to treat links to forum list page.
|
||||||
|
*/
|
||||||
|
@Injectable()
|
||||||
|
export class AddonModForumListLinkHandler extends CoreContentLinksModuleListHandler {
|
||||||
|
name = 'AddonModForumListLinkHandler';
|
||||||
|
|
||||||
|
constructor(linkHelper: CoreContentLinksHelperProvider, translate: TranslateService) {
|
||||||
|
super(linkHelper, translate, 'AddonModForum', 'forum');
|
||||||
|
}
|
||||||
|
}
|
|
@ -21,6 +21,7 @@ import { CoreCourseModuleHandler, CoreCourseModuleHandlerData } from '@core/cour
|
||||||
import { CoreCourseProvider } from '@core/course/providers/course';
|
import { CoreCourseProvider } from '@core/course/providers/course';
|
||||||
import { AddonModForumProvider } from './forum';
|
import { AddonModForumProvider } from './forum';
|
||||||
import { AddonModForumIndexComponent } from '../components/index/index';
|
import { AddonModForumIndexComponent } from '../components/index/index';
|
||||||
|
import { CoreConstants } from '@core/constants';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handler to support forum modules.
|
* Handler to support forum modules.
|
||||||
|
@ -30,6 +31,20 @@ export class AddonModForumModuleHandler implements CoreCourseModuleHandler {
|
||||||
name = 'AddonModForum';
|
name = 'AddonModForum';
|
||||||
modName = 'forum';
|
modName = 'forum';
|
||||||
|
|
||||||
|
supportedFeatures = {
|
||||||
|
[CoreConstants.FEATURE_GROUPS]: true,
|
||||||
|
[CoreConstants.FEATURE_GROUPINGS]: true,
|
||||||
|
[CoreConstants.FEATURE_MOD_INTRO]: true,
|
||||||
|
[CoreConstants.FEATURE_COMPLETION_TRACKS_VIEWS]: true,
|
||||||
|
[CoreConstants.FEATURE_COMPLETION_HAS_RULES]: true,
|
||||||
|
[CoreConstants.FEATURE_GRADE_HAS_GRADE]: true,
|
||||||
|
[CoreConstants.FEATURE_GRADE_OUTCOMES]: true,
|
||||||
|
[CoreConstants.FEATURE_BACKUP_MOODLE2]: true,
|
||||||
|
[CoreConstants.FEATURE_SHOW_DESCRIPTION]: true,
|
||||||
|
[CoreConstants.FEATURE_RATE]: true,
|
||||||
|
[CoreConstants.FEATURE_PLAGIARISM]: true
|
||||||
|
};
|
||||||
|
|
||||||
constructor(private courseProvider: CoreCourseProvider, private forumProvider: AddonModForumProvider,
|
constructor(private courseProvider: CoreCourseProvider, private forumProvider: AddonModForumProvider,
|
||||||
private translate: TranslateService, private eventsProvider: CoreEventsProvider,
|
private translate: TranslateService, private eventsProvider: CoreEventsProvider,
|
||||||
private sitesProvider: CoreSitesProvider) {}
|
private sitesProvider: CoreSitesProvider) {}
|
||||||
|
|
|
@ -26,6 +26,7 @@ import { AddonModGlossaryPrefetchHandler } from './providers/prefetch-handler';
|
||||||
import { AddonModGlossarySyncCronHandler } from './providers/sync-cron-handler';
|
import { AddonModGlossarySyncCronHandler } from './providers/sync-cron-handler';
|
||||||
import { AddonModGlossaryIndexLinkHandler } from './providers/index-link-handler';
|
import { AddonModGlossaryIndexLinkHandler } from './providers/index-link-handler';
|
||||||
import { AddonModGlossaryEntryLinkHandler } from './providers/entry-link-handler';
|
import { AddonModGlossaryEntryLinkHandler } from './providers/entry-link-handler';
|
||||||
|
import { AddonModGlossaryListLinkHandler } from './providers/list-link-handler';
|
||||||
import { AddonModGlossaryComponentsModule } from './components/components.module';
|
import { AddonModGlossaryComponentsModule } from './components/components.module';
|
||||||
import { CoreUpdateManagerProvider } from '@providers/update-manager';
|
import { CoreUpdateManagerProvider } from '@providers/update-manager';
|
||||||
|
|
||||||
|
@ -53,6 +54,7 @@ export const ADDON_MOD_GLOSSARY_PROVIDERS: any[] = [
|
||||||
AddonModGlossarySyncCronHandler,
|
AddonModGlossarySyncCronHandler,
|
||||||
AddonModGlossaryIndexLinkHandler,
|
AddonModGlossaryIndexLinkHandler,
|
||||||
AddonModGlossaryEntryLinkHandler,
|
AddonModGlossaryEntryLinkHandler,
|
||||||
|
AddonModGlossaryListLinkHandler
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class AddonModGlossaryModule {
|
export class AddonModGlossaryModule {
|
||||||
|
@ -60,13 +62,14 @@ export class AddonModGlossaryModule {
|
||||||
prefetchDelegate: CoreCourseModulePrefetchDelegate, prefetchHandler: AddonModGlossaryPrefetchHandler,
|
prefetchDelegate: CoreCourseModulePrefetchDelegate, prefetchHandler: AddonModGlossaryPrefetchHandler,
|
||||||
cronDelegate: CoreCronDelegate, syncHandler: AddonModGlossarySyncCronHandler, linksDelegate: CoreContentLinksDelegate,
|
cronDelegate: CoreCronDelegate, syncHandler: AddonModGlossarySyncCronHandler, linksDelegate: CoreContentLinksDelegate,
|
||||||
indexHandler: AddonModGlossaryIndexLinkHandler, discussionHandler: AddonModGlossaryEntryLinkHandler,
|
indexHandler: AddonModGlossaryIndexLinkHandler, discussionHandler: AddonModGlossaryEntryLinkHandler,
|
||||||
updateManager: CoreUpdateManagerProvider) {
|
updateManager: CoreUpdateManagerProvider, listLinkHandler: AddonModGlossaryListLinkHandler) {
|
||||||
|
|
||||||
moduleDelegate.registerHandler(moduleHandler);
|
moduleDelegate.registerHandler(moduleHandler);
|
||||||
prefetchDelegate.registerHandler(prefetchHandler);
|
prefetchDelegate.registerHandler(prefetchHandler);
|
||||||
cronDelegate.register(syncHandler);
|
cronDelegate.register(syncHandler);
|
||||||
linksDelegate.registerHandler(indexHandler);
|
linksDelegate.registerHandler(indexHandler);
|
||||||
linksDelegate.registerHandler(discussionHandler);
|
linksDelegate.registerHandler(discussionHandler);
|
||||||
|
linksDelegate.registerHandler(listLinkHandler);
|
||||||
|
|
||||||
// Allow migrating the tables from the old app to the new schema.
|
// Allow migrating the tables from the old app to the new schema.
|
||||||
updateManager.registerSiteTableMigration({
|
updateManager.registerSiteTableMigration({
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
"fillfields": "Concept and definition are mandatory fields.",
|
"fillfields": "Concept and definition are mandatory fields.",
|
||||||
"fullmatch": "Match whole words only",
|
"fullmatch": "Match whole words only",
|
||||||
"linking": "Auto-linking",
|
"linking": "Auto-linking",
|
||||||
|
"modulenameplural": "Glossaries",
|
||||||
"noentriesfound": "No entries were found.",
|
"noentriesfound": "No entries were found.",
|
||||||
"searchquery": "Search query"
|
"searchquery": "Search query"
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
// (C) Copyright 2015 Martin Dougiamas
|
||||||
|
//
|
||||||
|
// 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 { Injectable } from '@angular/core';
|
||||||
|
import { CoreContentLinksModuleListHandler } from '@core/contentlinks/classes/module-list-handler';
|
||||||
|
import { CoreContentLinksHelperProvider } from '@core/contentlinks/providers/helper';
|
||||||
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handler to treat links to glossary list page.
|
||||||
|
*/
|
||||||
|
@Injectable()
|
||||||
|
export class AddonModGlossaryListLinkHandler extends CoreContentLinksModuleListHandler {
|
||||||
|
name = 'AddonModGlossaryListLinkHandler';
|
||||||
|
|
||||||
|
constructor(linkHelper: CoreContentLinksHelperProvider, translate: TranslateService) {
|
||||||
|
super(linkHelper, translate, 'AddonModGlossary', 'glossary');
|
||||||
|
}
|
||||||
|
}
|
|
@ -17,6 +17,7 @@ import { NavController, NavOptions } from 'ionic-angular';
|
||||||
import { AddonModGlossaryIndexComponent } from '../components/index/index';
|
import { AddonModGlossaryIndexComponent } from '../components/index/index';
|
||||||
import { CoreCourseModuleHandler, CoreCourseModuleHandlerData } from '@core/course/providers/module-delegate';
|
import { CoreCourseModuleHandler, CoreCourseModuleHandlerData } from '@core/course/providers/module-delegate';
|
||||||
import { CoreCourseProvider } from '@core/course/providers/course';
|
import { CoreCourseProvider } from '@core/course/providers/course';
|
||||||
|
import { CoreConstants } from '@core/constants';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handler to support glossary modules.
|
* Handler to support glossary modules.
|
||||||
|
@ -26,6 +27,20 @@ export class AddonModGlossaryModuleHandler implements CoreCourseModuleHandler {
|
||||||
name = 'AddonModGlossary';
|
name = 'AddonModGlossary';
|
||||||
modName = 'glossary';
|
modName = 'glossary';
|
||||||
|
|
||||||
|
supportedFeatures = {
|
||||||
|
[CoreConstants.FEATURE_GROUPS]: false,
|
||||||
|
[CoreConstants.FEATURE_GROUPINGS]: false,
|
||||||
|
[CoreConstants.FEATURE_MOD_INTRO]: true,
|
||||||
|
[CoreConstants.FEATURE_COMPLETION_TRACKS_VIEWS]: true,
|
||||||
|
[CoreConstants.FEATURE_COMPLETION_HAS_RULES]: true,
|
||||||
|
[CoreConstants.FEATURE_GRADE_HAS_GRADE]: true,
|
||||||
|
[CoreConstants.FEATURE_GRADE_OUTCOMES]: true,
|
||||||
|
[CoreConstants.FEATURE_BACKUP_MOODLE2]: true,
|
||||||
|
[CoreConstants.FEATURE_SHOW_DESCRIPTION]: true,
|
||||||
|
[CoreConstants.FEATURE_RATE]: true,
|
||||||
|
[CoreConstants.FEATURE_PLAGIARISM]: true
|
||||||
|
};
|
||||||
|
|
||||||
constructor(private courseProvider: CoreCourseProvider) { }
|
constructor(private courseProvider: CoreCourseProvider) { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -18,6 +18,7 @@ import { AddonModImscpModuleHandler } from './providers/module-handler';
|
||||||
import { AddonModImscpProvider } from './providers/imscp';
|
import { AddonModImscpProvider } from './providers/imscp';
|
||||||
import { AddonModImscpPrefetchHandler } from './providers/prefetch-handler';
|
import { AddonModImscpPrefetchHandler } from './providers/prefetch-handler';
|
||||||
import { AddonModImscpLinkHandler } from './providers/link-handler';
|
import { AddonModImscpLinkHandler } from './providers/link-handler';
|
||||||
|
import { AddonModImscpListLinkHandler } from './providers/list-link-handler';
|
||||||
import { AddonModImscpPluginFileHandler } from './providers/pluginfile-handler';
|
import { AddonModImscpPluginFileHandler } from './providers/pluginfile-handler';
|
||||||
import { CoreContentLinksDelegate } from '@core/contentlinks/providers/delegate';
|
import { CoreContentLinksDelegate } from '@core/contentlinks/providers/delegate';
|
||||||
import { CoreCourseModuleDelegate } from '@core/course/providers/module-delegate';
|
import { CoreCourseModuleDelegate } from '@core/course/providers/module-delegate';
|
||||||
|
@ -40,6 +41,7 @@ export const ADDON_MOD_IMSCP_PROVIDERS: any[] = [
|
||||||
AddonModImscpModuleHandler,
|
AddonModImscpModuleHandler,
|
||||||
AddonModImscpPrefetchHandler,
|
AddonModImscpPrefetchHandler,
|
||||||
AddonModImscpLinkHandler,
|
AddonModImscpLinkHandler,
|
||||||
|
AddonModImscpListLinkHandler,
|
||||||
AddonModImscpPluginFileHandler
|
AddonModImscpPluginFileHandler
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
@ -47,10 +49,13 @@ export class AddonModImscpModule {
|
||||||
constructor(moduleDelegate: CoreCourseModuleDelegate, moduleHandler: AddonModImscpModuleHandler,
|
constructor(moduleDelegate: CoreCourseModuleDelegate, moduleHandler: AddonModImscpModuleHandler,
|
||||||
prefetchDelegate: CoreCourseModulePrefetchDelegate, prefetchHandler: AddonModImscpPrefetchHandler,
|
prefetchDelegate: CoreCourseModulePrefetchDelegate, prefetchHandler: AddonModImscpPrefetchHandler,
|
||||||
contentLinksDelegate: CoreContentLinksDelegate, linkHandler: AddonModImscpLinkHandler,
|
contentLinksDelegate: CoreContentLinksDelegate, linkHandler: AddonModImscpLinkHandler,
|
||||||
pluginfileDelegate: CorePluginFileDelegate, pluginfileHandler: AddonModImscpPluginFileHandler) {
|
pluginfileDelegate: CorePluginFileDelegate, pluginfileHandler: AddonModImscpPluginFileHandler,
|
||||||
|
listLinkHandler: AddonModImscpListLinkHandler) {
|
||||||
|
|
||||||
moduleDelegate.registerHandler(moduleHandler);
|
moduleDelegate.registerHandler(moduleHandler);
|
||||||
prefetchDelegate.registerHandler(prefetchHandler);
|
prefetchDelegate.registerHandler(prefetchHandler);
|
||||||
contentLinksDelegate.registerHandler(linkHandler);
|
contentLinksDelegate.registerHandler(linkHandler);
|
||||||
|
contentLinksDelegate.registerHandler(listLinkHandler);
|
||||||
pluginfileDelegate.registerHandler(pluginfileHandler);
|
pluginfileDelegate.registerHandler(pluginfileHandler);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{
|
{
|
||||||
"deploymenterror": "Content package error!",
|
"deploymenterror": "Content package error!",
|
||||||
|
"modulenameplural": "IMS content packages",
|
||||||
"showmoduledescription": "Show description"
|
"showmoduledescription": "Show description"
|
||||||
}
|
}
|
|
@ -0,0 +1,41 @@
|
||||||
|
// (C) Copyright 2015 Martin Dougiamas
|
||||||
|
//
|
||||||
|
// 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 { Injectable } from '@angular/core';
|
||||||
|
import { CoreContentLinksModuleListHandler } from '@core/contentlinks/classes/module-list-handler';
|
||||||
|
import { CoreContentLinksHelperProvider } from '@core/contentlinks/providers/helper';
|
||||||
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
|
import { AddonModImscpProvider } from './imscp';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handler to treat links to IMSCP list page.
|
||||||
|
*/
|
||||||
|
@Injectable()
|
||||||
|
export class AddonModImscpListLinkHandler extends CoreContentLinksModuleListHandler {
|
||||||
|
name = 'AddonModImscpListLinkHandler';
|
||||||
|
|
||||||
|
constructor(linkHelper: CoreContentLinksHelperProvider, translate: TranslateService,
|
||||||
|
protected imscpProvider: AddonModImscpProvider) {
|
||||||
|
super(linkHelper, translate, 'AddonModImscp', 'imscp');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if the handler is enabled on a site level.
|
||||||
|
*
|
||||||
|
* @return {boolean|Promise<boolean>} Whether or not the handler is enabled on a site level.
|
||||||
|
*/
|
||||||
|
isEnabled(): boolean | Promise<boolean> {
|
||||||
|
return this.imscpProvider.isPluginEnabled();
|
||||||
|
}
|
||||||
|
}
|
|
@ -18,6 +18,7 @@ import { CoreCourseModuleHandler, CoreCourseModuleHandlerData } from '@core/cour
|
||||||
import { CoreCourseProvider } from '@core/course/providers/course';
|
import { CoreCourseProvider } from '@core/course/providers/course';
|
||||||
import { AddonModImscpIndexComponent } from '../components/index/index';
|
import { AddonModImscpIndexComponent } from '../components/index/index';
|
||||||
import { AddonModImscpProvider } from './imscp';
|
import { AddonModImscpProvider } from './imscp';
|
||||||
|
import { CoreConstants } from '@core/constants';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handler to support IMSCP modules.
|
* Handler to support IMSCP modules.
|
||||||
|
@ -27,6 +28,18 @@ export class AddonModImscpModuleHandler implements CoreCourseModuleHandler {
|
||||||
name = 'AddonModImscp';
|
name = 'AddonModImscp';
|
||||||
modName = 'imscp';
|
modName = 'imscp';
|
||||||
|
|
||||||
|
supportedFeatures = {
|
||||||
|
[CoreConstants.FEATURE_MOD_ARCHETYPE]: CoreConstants.MOD_ARCHETYPE_RESOURCE,
|
||||||
|
[CoreConstants.FEATURE_GROUPS]: false,
|
||||||
|
[CoreConstants.FEATURE_GROUPINGS]: false,
|
||||||
|
[CoreConstants.FEATURE_MOD_INTRO]: true,
|
||||||
|
[CoreConstants.FEATURE_COMPLETION_TRACKS_VIEWS]: true,
|
||||||
|
[CoreConstants.FEATURE_GRADE_HAS_GRADE]: false,
|
||||||
|
[CoreConstants.FEATURE_GRADE_OUTCOMES]: false,
|
||||||
|
[CoreConstants.FEATURE_BACKUP_MOODLE2]: true,
|
||||||
|
[CoreConstants.FEATURE_SHOW_DESCRIPTION]: true
|
||||||
|
};
|
||||||
|
|
||||||
constructor(private courseProvider: CoreCourseProvider, protected imscpProvider: AddonModImscpProvider) { }
|
constructor(private courseProvider: CoreCourseProvider, protected imscpProvider: AddonModImscpProvider) { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
|
|
||||||
import { Injectable, Injector } from '@angular/core';
|
import { Injectable, Injector } from '@angular/core';
|
||||||
import { CoreCourseModuleHandler, CoreCourseModuleHandlerData } from '@core/course/providers/module-delegate';
|
import { CoreCourseModuleHandler, CoreCourseModuleHandlerData } from '@core/course/providers/module-delegate';
|
||||||
|
import { CoreConstants } from '@core/constants';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handler to support label modules.
|
* Handler to support label modules.
|
||||||
|
@ -23,6 +24,19 @@ export class AddonModLabelModuleHandler implements CoreCourseModuleHandler {
|
||||||
name = 'AddonModLabel';
|
name = 'AddonModLabel';
|
||||||
modName = 'label';
|
modName = 'label';
|
||||||
|
|
||||||
|
supportedFeatures = {
|
||||||
|
[CoreConstants.FEATURE_MOD_ARCHETYPE]: CoreConstants.MOD_ARCHETYPE_RESOURCE,
|
||||||
|
[CoreConstants.FEATURE_IDNUMBER]: true,
|
||||||
|
[CoreConstants.FEATURE_GROUPS]: false,
|
||||||
|
[CoreConstants.FEATURE_GROUPINGS]: false,
|
||||||
|
[CoreConstants.FEATURE_MOD_INTRO]: true,
|
||||||
|
[CoreConstants.FEATURE_COMPLETION_TRACKS_VIEWS]: false,
|
||||||
|
[CoreConstants.FEATURE_GRADE_HAS_GRADE]: false,
|
||||||
|
[CoreConstants.FEATURE_GRADE_OUTCOMES]: false,
|
||||||
|
[CoreConstants.FEATURE_BACKUP_MOODLE2]: true,
|
||||||
|
[CoreConstants.FEATURE_SHOW_DESCRIPTION]: true
|
||||||
|
};
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
// Nothing to do.
|
// Nothing to do.
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,6 +41,7 @@
|
||||||
"lowtime": "Low time",
|
"lowtime": "Low time",
|
||||||
"maximumnumberofattemptsreached": "Maximum number of attempts reached - Moving to next page",
|
"maximumnumberofattemptsreached": "Maximum number of attempts reached - Moving to next page",
|
||||||
"modattemptsnoteacher": "Student review only works for students.",
|
"modattemptsnoteacher": "Student review only works for students.",
|
||||||
|
"modulenameplural": "Lessons",
|
||||||
"noanswer": "One or more questions have no answer given. Please go back and submit an answer.",
|
"noanswer": "One or more questions have no answer given. Please go back and submit an answer.",
|
||||||
"nolessonattempts": "No attempts have been made on this lesson.",
|
"nolessonattempts": "No attempts have been made on this lesson.",
|
||||||
"nolessonattemptsgroup": "No attempts have been made by {{$a}} group members on this lesson.",
|
"nolessonattemptsgroup": "No attempts have been made by {{$a}} group members on this lesson.",
|
||||||
|
|
|
@ -28,6 +28,7 @@ import { AddonModLessonSyncCronHandler } from './providers/sync-cron-handler';
|
||||||
import { AddonModLessonIndexLinkHandler } from './providers/index-link-handler';
|
import { AddonModLessonIndexLinkHandler } from './providers/index-link-handler';
|
||||||
import { AddonModLessonGradeLinkHandler } from './providers/grade-link-handler';
|
import { AddonModLessonGradeLinkHandler } from './providers/grade-link-handler';
|
||||||
import { AddonModLessonReportLinkHandler } from './providers/report-link-handler';
|
import { AddonModLessonReportLinkHandler } from './providers/report-link-handler';
|
||||||
|
import { AddonModLessonListLinkHandler } from './providers/list-link-handler';
|
||||||
import { CoreUpdateManagerProvider } from '@providers/update-manager';
|
import { CoreUpdateManagerProvider } from '@providers/update-manager';
|
||||||
|
|
||||||
// List of providers (without handlers).
|
// List of providers (without handlers).
|
||||||
|
@ -54,7 +55,8 @@ export const ADDON_MOD_LESSON_PROVIDERS: any[] = [
|
||||||
AddonModLessonSyncCronHandler,
|
AddonModLessonSyncCronHandler,
|
||||||
AddonModLessonIndexLinkHandler,
|
AddonModLessonIndexLinkHandler,
|
||||||
AddonModLessonGradeLinkHandler,
|
AddonModLessonGradeLinkHandler,
|
||||||
AddonModLessonReportLinkHandler
|
AddonModLessonReportLinkHandler,
|
||||||
|
AddonModLessonListLinkHandler
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class AddonModLessonModule {
|
export class AddonModLessonModule {
|
||||||
|
@ -62,7 +64,8 @@ export class AddonModLessonModule {
|
||||||
prefetchDelegate: CoreCourseModulePrefetchDelegate, prefetchHandler: AddonModLessonPrefetchHandler,
|
prefetchDelegate: CoreCourseModulePrefetchDelegate, prefetchHandler: AddonModLessonPrefetchHandler,
|
||||||
cronDelegate: CoreCronDelegate, syncHandler: AddonModLessonSyncCronHandler, linksDelegate: CoreContentLinksDelegate,
|
cronDelegate: CoreCronDelegate, syncHandler: AddonModLessonSyncCronHandler, linksDelegate: CoreContentLinksDelegate,
|
||||||
indexHandler: AddonModLessonIndexLinkHandler, gradeHandler: AddonModLessonGradeLinkHandler,
|
indexHandler: AddonModLessonIndexLinkHandler, gradeHandler: AddonModLessonGradeLinkHandler,
|
||||||
reportHandler: AddonModLessonReportLinkHandler, updateManager: CoreUpdateManagerProvider) {
|
reportHandler: AddonModLessonReportLinkHandler, updateManager: CoreUpdateManagerProvider,
|
||||||
|
listLinkHandler: AddonModLessonListLinkHandler) {
|
||||||
|
|
||||||
moduleDelegate.registerHandler(moduleHandler);
|
moduleDelegate.registerHandler(moduleHandler);
|
||||||
prefetchDelegate.registerHandler(prefetchHandler);
|
prefetchDelegate.registerHandler(prefetchHandler);
|
||||||
|
@ -70,6 +73,7 @@ export class AddonModLessonModule {
|
||||||
linksDelegate.registerHandler(indexHandler);
|
linksDelegate.registerHandler(indexHandler);
|
||||||
linksDelegate.registerHandler(gradeHandler);
|
linksDelegate.registerHandler(gradeHandler);
|
||||||
linksDelegate.registerHandler(reportHandler);
|
linksDelegate.registerHandler(reportHandler);
|
||||||
|
linksDelegate.registerHandler(listLinkHandler);
|
||||||
|
|
||||||
// Allow migrating the tables from the old app to the new schema.
|
// Allow migrating the tables from the old app to the new schema.
|
||||||
updateManager.registerSiteTablesMigration([
|
updateManager.registerSiteTablesMigration([
|
||||||
|
|
|
@ -0,0 +1,41 @@
|
||||||
|
// (C) Copyright 2015 Martin Dougiamas
|
||||||
|
//
|
||||||
|
// 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 { Injectable } from '@angular/core';
|
||||||
|
import { CoreContentLinksModuleListHandler } from '@core/contentlinks/classes/module-list-handler';
|
||||||
|
import { CoreContentLinksHelperProvider } from '@core/contentlinks/providers/helper';
|
||||||
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
|
import { AddonModLessonProvider } from './lesson';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handler to treat links to lesson list page.
|
||||||
|
*/
|
||||||
|
@Injectable()
|
||||||
|
export class AddonModLessonListLinkHandler extends CoreContentLinksModuleListHandler {
|
||||||
|
name = 'AddonModLessonListLinkHandler';
|
||||||
|
|
||||||
|
constructor(linkHelper: CoreContentLinksHelperProvider, translate: TranslateService,
|
||||||
|
protected lessonProvider: AddonModLessonProvider) {
|
||||||
|
super(linkHelper, translate, 'AddonModLesson', 'lesson');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if the handler is enabled on a site level.
|
||||||
|
*
|
||||||
|
* @return {Promise<boolean>} Promise resolved with boolean: whether or not the handler is enabled on a site level.
|
||||||
|
*/
|
||||||
|
isEnabled(): Promise<boolean> {
|
||||||
|
return this.lessonProvider.isPluginEnabled();
|
||||||
|
}
|
||||||
|
}
|
|
@ -18,6 +18,7 @@ import { AddonModLessonIndexComponent } from '../components/index/index';
|
||||||
import { CoreCourseModuleHandler, CoreCourseModuleHandlerData } from '@core/course/providers/module-delegate';
|
import { CoreCourseModuleHandler, CoreCourseModuleHandlerData } from '@core/course/providers/module-delegate';
|
||||||
import { CoreCourseProvider } from '@core/course/providers/course';
|
import { CoreCourseProvider } from '@core/course/providers/course';
|
||||||
import { AddonModLessonProvider } from './lesson';
|
import { AddonModLessonProvider } from './lesson';
|
||||||
|
import { CoreConstants } from '@core/constants';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handler to support quiz modules.
|
* Handler to support quiz modules.
|
||||||
|
@ -27,6 +28,18 @@ export class AddonModLessonModuleHandler implements CoreCourseModuleHandler {
|
||||||
name = 'AddonModLesson';
|
name = 'AddonModLesson';
|
||||||
modName = 'lesson';
|
modName = 'lesson';
|
||||||
|
|
||||||
|
supportedFeatures = {
|
||||||
|
[CoreConstants.FEATURE_GROUPS]: true,
|
||||||
|
[CoreConstants.FEATURE_GROUPINGS]: true,
|
||||||
|
[CoreConstants.FEATURE_MOD_INTRO]: true,
|
||||||
|
[CoreConstants.FEATURE_COMPLETION_TRACKS_VIEWS]: true,
|
||||||
|
[CoreConstants.FEATURE_COMPLETION_HAS_RULES]: true,
|
||||||
|
[CoreConstants.FEATURE_GRADE_HAS_GRADE]: true,
|
||||||
|
[CoreConstants.FEATURE_GRADE_OUTCOMES]: true,
|
||||||
|
[CoreConstants.FEATURE_BACKUP_MOODLE2]: true,
|
||||||
|
[CoreConstants.FEATURE_SHOW_DESCRIPTION]: true
|
||||||
|
};
|
||||||
|
|
||||||
constructor(private courseProvider: CoreCourseProvider, private lessonProvider: AddonModLessonProvider) { }
|
constructor(private courseProvider: CoreCourseProvider, private lessonProvider: AddonModLessonProvider) { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
"errorgetlti": "Error getting module data.",
|
"errorgetlti": "Error getting module data.",
|
||||||
"errorinvalidlaunchurl": "The launch URL is not valid.",
|
"errorinvalidlaunchurl": "The launch URL is not valid.",
|
||||||
"launchactivity": "Launch the activity"
|
"launchactivity": "Launch the activity",
|
||||||
|
"modulenameplural": "External tools"
|
||||||
}
|
}
|
|
@ -17,6 +17,7 @@ import { AddonModLtiComponentsModule } from './components/components.module';
|
||||||
import { AddonModLtiModuleHandler } from './providers/module-handler';
|
import { AddonModLtiModuleHandler } from './providers/module-handler';
|
||||||
import { AddonModLtiProvider } from './providers/lti';
|
import { AddonModLtiProvider } from './providers/lti';
|
||||||
import { AddonModLtiLinkHandler } from './providers/link-handler';
|
import { AddonModLtiLinkHandler } from './providers/link-handler';
|
||||||
|
import { AddonModLtiListLinkHandler } from './providers/list-link-handler';
|
||||||
import { CoreContentLinksDelegate } from '@core/contentlinks/providers/delegate';
|
import { CoreContentLinksDelegate } from '@core/contentlinks/providers/delegate';
|
||||||
import { CoreCourseModuleDelegate } from '@core/course/providers/module-delegate';
|
import { CoreCourseModuleDelegate } from '@core/course/providers/module-delegate';
|
||||||
|
|
||||||
|
@ -34,13 +35,17 @@ export const ADDON_MOD_LTI_PROVIDERS: any[] = [
|
||||||
providers: [
|
providers: [
|
||||||
AddonModLtiProvider,
|
AddonModLtiProvider,
|
||||||
AddonModLtiModuleHandler,
|
AddonModLtiModuleHandler,
|
||||||
AddonModLtiLinkHandler
|
AddonModLtiLinkHandler,
|
||||||
|
AddonModLtiListLinkHandler
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class AddonModLtiModule {
|
export class AddonModLtiModule {
|
||||||
constructor(moduleDelegate: CoreCourseModuleDelegate, moduleHandler: AddonModLtiModuleHandler,
|
constructor(moduleDelegate: CoreCourseModuleDelegate, moduleHandler: AddonModLtiModuleHandler,
|
||||||
contentLinksDelegate: CoreContentLinksDelegate, linkHandler: AddonModLtiLinkHandler) {
|
contentLinksDelegate: CoreContentLinksDelegate, linkHandler: AddonModLtiLinkHandler,
|
||||||
|
listLinkHandler: AddonModLtiListLinkHandler) {
|
||||||
|
|
||||||
moduleDelegate.registerHandler(moduleHandler);
|
moduleDelegate.registerHandler(moduleHandler);
|
||||||
contentLinksDelegate.registerHandler(linkHandler);
|
contentLinksDelegate.registerHandler(linkHandler);
|
||||||
|
contentLinksDelegate.registerHandler(listLinkHandler);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
// (C) Copyright 2015 Martin Dougiamas
|
||||||
|
//
|
||||||
|
// 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 { Injectable } from '@angular/core';
|
||||||
|
import { CoreContentLinksModuleListHandler } from '@core/contentlinks/classes/module-list-handler';
|
||||||
|
import { CoreContentLinksHelperProvider } from '@core/contentlinks/providers/helper';
|
||||||
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handler to treat links to LTI list page.
|
||||||
|
*/
|
||||||
|
@Injectable()
|
||||||
|
export class AddonModLtiListLinkHandler extends CoreContentLinksModuleListHandler {
|
||||||
|
name = 'AddonModLtiListLinkHandler';
|
||||||
|
|
||||||
|
constructor(linkHelper: CoreContentLinksHelperProvider, translate: TranslateService) {
|
||||||
|
super(linkHelper, translate, 'AddonModLti', 'lti');
|
||||||
|
}
|
||||||
|
}
|
|
@ -23,6 +23,7 @@ import { CoreFilepoolProvider } from '@providers/filepool';
|
||||||
import { CoreSitesProvider } from '@providers/sites';
|
import { CoreSitesProvider } from '@providers/sites';
|
||||||
import { AddonModLtiIndexComponent } from '../components/index/index';
|
import { AddonModLtiIndexComponent } from '../components/index/index';
|
||||||
import { AddonModLtiProvider } from './lti';
|
import { AddonModLtiProvider } from './lti';
|
||||||
|
import { CoreConstants } from '@core/constants';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handler to support LTI modules.
|
* Handler to support LTI modules.
|
||||||
|
@ -32,6 +33,17 @@ export class AddonModLtiModuleHandler implements CoreCourseModuleHandler {
|
||||||
name = 'AddonModLti';
|
name = 'AddonModLti';
|
||||||
modName = 'lti';
|
modName = 'lti';
|
||||||
|
|
||||||
|
supportedFeatures = {
|
||||||
|
[CoreConstants.FEATURE_GROUPS]: false,
|
||||||
|
[CoreConstants.FEATURE_GROUPINGS]: false,
|
||||||
|
[CoreConstants.FEATURE_MOD_INTRO]: true,
|
||||||
|
[CoreConstants.FEATURE_COMPLETION_TRACKS_VIEWS]: true,
|
||||||
|
[CoreConstants.FEATURE_GRADE_HAS_GRADE]: true,
|
||||||
|
[CoreConstants.FEATURE_GRADE_OUTCOMES]: true,
|
||||||
|
[CoreConstants.FEATURE_BACKUP_MOODLE2]: true,
|
||||||
|
[CoreConstants.FEATURE_SHOW_DESCRIPTION]: true
|
||||||
|
};
|
||||||
|
|
||||||
constructor(private appProvider: CoreAppProvider,
|
constructor(private appProvider: CoreAppProvider,
|
||||||
private courseProvider: CoreCourseProvider,
|
private courseProvider: CoreCourseProvider,
|
||||||
private domUtils: CoreDomUtilsProvider,
|
private domUtils: CoreDomUtilsProvider,
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
{
|
{
|
||||||
"errorwhileloadingthepage": "Error while loading the page content."
|
"errorwhileloadingthepage": "Error while loading the page content.",
|
||||||
|
"modulenameplural": "Pages"
|
||||||
}
|
}
|
|
@ -18,6 +18,7 @@ import { AddonModPageModuleHandler } from './providers/module-handler';
|
||||||
import { AddonModPageProvider } from './providers/page';
|
import { AddonModPageProvider } from './providers/page';
|
||||||
import { AddonModPagePrefetchHandler } from './providers/prefetch-handler';
|
import { AddonModPagePrefetchHandler } from './providers/prefetch-handler';
|
||||||
import { AddonModPageLinkHandler } from './providers/link-handler';
|
import { AddonModPageLinkHandler } from './providers/link-handler';
|
||||||
|
import { AddonModPageListLinkHandler } from './providers/list-link-handler';
|
||||||
import { AddonModPagePluginFileHandler } from './providers/pluginfile-handler';
|
import { AddonModPagePluginFileHandler } from './providers/pluginfile-handler';
|
||||||
import { AddonModPageHelperProvider } from './providers/helper';
|
import { AddonModPageHelperProvider } from './providers/helper';
|
||||||
import { CoreContentLinksDelegate } from '@core/contentlinks/providers/delegate';
|
import { CoreContentLinksDelegate } from '@core/contentlinks/providers/delegate';
|
||||||
|
@ -43,6 +44,7 @@ export const ADDON_MOD_PAGE_PROVIDERS: any[] = [
|
||||||
AddonModPageModuleHandler,
|
AddonModPageModuleHandler,
|
||||||
AddonModPagePrefetchHandler,
|
AddonModPagePrefetchHandler,
|
||||||
AddonModPageLinkHandler,
|
AddonModPageLinkHandler,
|
||||||
|
AddonModPageListLinkHandler,
|
||||||
AddonModPagePluginFileHandler
|
AddonModPagePluginFileHandler
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
@ -50,10 +52,13 @@ export class AddonModPageModule {
|
||||||
constructor(moduleDelegate: CoreCourseModuleDelegate, moduleHandler: AddonModPageModuleHandler,
|
constructor(moduleDelegate: CoreCourseModuleDelegate, moduleHandler: AddonModPageModuleHandler,
|
||||||
prefetchDelegate: CoreCourseModulePrefetchDelegate, prefetchHandler: AddonModPagePrefetchHandler,
|
prefetchDelegate: CoreCourseModulePrefetchDelegate, prefetchHandler: AddonModPagePrefetchHandler,
|
||||||
contentLinksDelegate: CoreContentLinksDelegate, linkHandler: AddonModPageLinkHandler,
|
contentLinksDelegate: CoreContentLinksDelegate, linkHandler: AddonModPageLinkHandler,
|
||||||
pluginfileDelegate: CorePluginFileDelegate, pluginfileHandler: AddonModPagePluginFileHandler) {
|
pluginfileDelegate: CorePluginFileDelegate, pluginfileHandler: AddonModPagePluginFileHandler,
|
||||||
|
listLinkHandler: AddonModPageListLinkHandler) {
|
||||||
|
|
||||||
moduleDelegate.registerHandler(moduleHandler);
|
moduleDelegate.registerHandler(moduleHandler);
|
||||||
prefetchDelegate.registerHandler(prefetchHandler);
|
prefetchDelegate.registerHandler(prefetchHandler);
|
||||||
contentLinksDelegate.registerHandler(linkHandler);
|
contentLinksDelegate.registerHandler(linkHandler);
|
||||||
|
contentLinksDelegate.registerHandler(listLinkHandler);
|
||||||
pluginfileDelegate.registerHandler(pluginfileHandler);
|
pluginfileDelegate.registerHandler(pluginfileHandler);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,41 @@
|
||||||
|
// (C) Copyright 2015 Martin Dougiamas
|
||||||
|
//
|
||||||
|
// 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 { Injectable } from '@angular/core';
|
||||||
|
import { CoreContentLinksModuleListHandler } from '@core/contentlinks/classes/module-list-handler';
|
||||||
|
import { CoreContentLinksHelperProvider } from '@core/contentlinks/providers/helper';
|
||||||
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
|
import { AddonModPageProvider } from './page';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handler to treat links to page list page.
|
||||||
|
*/
|
||||||
|
@Injectable()
|
||||||
|
export class AddonModPageListLinkHandler extends CoreContentLinksModuleListHandler {
|
||||||
|
name = 'AddonModPageListLinkHandler';
|
||||||
|
|
||||||
|
constructor(linkHelper: CoreContentLinksHelperProvider, translate: TranslateService,
|
||||||
|
protected pageProvider: AddonModPageProvider) {
|
||||||
|
super(linkHelper, translate, 'AddonModPage', 'page');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if the handler is enabled on a site level.
|
||||||
|
*
|
||||||
|
* @return {boolean|Promise<boolean>} Whether or not the handler is enabled on a site level.
|
||||||
|
*/
|
||||||
|
isEnabled(): boolean | Promise<boolean> {
|
||||||
|
return this.pageProvider.isPluginEnabled();
|
||||||
|
}
|
||||||
|
}
|
|
@ -18,6 +18,7 @@ import { AddonModPageProvider } from './page';
|
||||||
import { AddonModPageIndexComponent } from '../components/index/index';
|
import { AddonModPageIndexComponent } from '../components/index/index';
|
||||||
import { CoreCourseModuleHandler, CoreCourseModuleHandlerData } from '@core/course/providers/module-delegate';
|
import { CoreCourseModuleHandler, CoreCourseModuleHandlerData } from '@core/course/providers/module-delegate';
|
||||||
import { CoreCourseProvider } from '@core/course/providers/course';
|
import { CoreCourseProvider } from '@core/course/providers/course';
|
||||||
|
import { CoreConstants } from '@core/constants';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handler to support page modules.
|
* Handler to support page modules.
|
||||||
|
@ -27,6 +28,18 @@ export class AddonModPageModuleHandler implements CoreCourseModuleHandler {
|
||||||
name = 'AddonModPage';
|
name = 'AddonModPage';
|
||||||
modName = 'page';
|
modName = 'page';
|
||||||
|
|
||||||
|
supportedFeatures = {
|
||||||
|
[CoreConstants.FEATURE_MOD_ARCHETYPE]: CoreConstants.MOD_ARCHETYPE_RESOURCE,
|
||||||
|
[CoreConstants.FEATURE_GROUPS]: false,
|
||||||
|
[CoreConstants.FEATURE_GROUPINGS]: false,
|
||||||
|
[CoreConstants.FEATURE_MOD_INTRO]: true,
|
||||||
|
[CoreConstants.FEATURE_COMPLETION_TRACKS_VIEWS]: true,
|
||||||
|
[CoreConstants.FEATURE_GRADE_HAS_GRADE]: false,
|
||||||
|
[CoreConstants.FEATURE_GRADE_OUTCOMES]: false,
|
||||||
|
[CoreConstants.FEATURE_BACKUP_MOODLE2]: true,
|
||||||
|
[CoreConstants.FEATURE_SHOW_DESCRIPTION]: true
|
||||||
|
};
|
||||||
|
|
||||||
constructor(private courseProvider: CoreCourseProvider, protected pageProvider: AddonModPageProvider) { }
|
constructor(private courseProvider: CoreCourseProvider, protected pageProvider: AddonModPageProvider) { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
"grademethod": "Grading method",
|
"grademethod": "Grading method",
|
||||||
"gradesofar": "{{$a.method}}: {{$a.mygrade}} / {{$a.quizgrade}}.",
|
"gradesofar": "{{$a.method}}: {{$a.mygrade}} / {{$a.quizgrade}}.",
|
||||||
"marks": "Marks",
|
"marks": "Marks",
|
||||||
|
"modulenameplural": "Quizzes",
|
||||||
"mustbesubmittedby": "This attempt must be submitted by {{$a}}.",
|
"mustbesubmittedby": "This attempt must be submitted by {{$a}}.",
|
||||||
"noquestions": "No questions have been added yet",
|
"noquestions": "No questions have been added yet",
|
||||||
"noreviewattempt": "You are not allowed to review this attempt.",
|
"noreviewattempt": "You are not allowed to review this attempt.",
|
||||||
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
// (C) Copyright 2015 Martin Dougiamas
|
||||||
|
//
|
||||||
|
// 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 { Injectable } from '@angular/core';
|
||||||
|
import { CoreContentLinksModuleListHandler } from '@core/contentlinks/classes/module-list-handler';
|
||||||
|
import { CoreContentLinksHelperProvider } from '@core/contentlinks/providers/helper';
|
||||||
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handler to treat links to quiz list page.
|
||||||
|
*/
|
||||||
|
@Injectable()
|
||||||
|
export class AddonModQuizListLinkHandler extends CoreContentLinksModuleListHandler {
|
||||||
|
name = 'AddonModQuizListLinkHandler';
|
||||||
|
|
||||||
|
constructor(linkHelper: CoreContentLinksHelperProvider, translate: TranslateService) {
|
||||||
|
super(linkHelper, translate, 'AddonModQuiz', 'quiz');
|
||||||
|
}
|
||||||
|
}
|
|
@ -17,6 +17,7 @@ import { NavController, NavOptions } from 'ionic-angular';
|
||||||
import { AddonModQuizIndexComponent } from '../components/index/index';
|
import { AddonModQuizIndexComponent } from '../components/index/index';
|
||||||
import { CoreCourseModuleHandler, CoreCourseModuleHandlerData } from '@core/course/providers/module-delegate';
|
import { CoreCourseModuleHandler, CoreCourseModuleHandlerData } from '@core/course/providers/module-delegate';
|
||||||
import { CoreCourseProvider } from '@core/course/providers/course';
|
import { CoreCourseProvider } from '@core/course/providers/course';
|
||||||
|
import { CoreConstants } from '@core/constants';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handler to support quiz modules.
|
* Handler to support quiz modules.
|
||||||
|
@ -26,6 +27,20 @@ export class AddonModQuizModuleHandler implements CoreCourseModuleHandler {
|
||||||
name = 'AddonModQuiz';
|
name = 'AddonModQuiz';
|
||||||
modName = 'quiz';
|
modName = 'quiz';
|
||||||
|
|
||||||
|
supportedFeatures = {
|
||||||
|
[CoreConstants.FEATURE_GROUPS]: true,
|
||||||
|
[CoreConstants.FEATURE_GROUPINGS]: true,
|
||||||
|
[CoreConstants.FEATURE_MOD_INTRO]: true,
|
||||||
|
[CoreConstants.FEATURE_COMPLETION_TRACKS_VIEWS]: true,
|
||||||
|
[CoreConstants.FEATURE_COMPLETION_HAS_RULES]: true,
|
||||||
|
[CoreConstants.FEATURE_GRADE_HAS_GRADE]: true,
|
||||||
|
[CoreConstants.FEATURE_GRADE_OUTCOMES]: true,
|
||||||
|
[CoreConstants.FEATURE_BACKUP_MOODLE2]: true,
|
||||||
|
[CoreConstants.FEATURE_SHOW_DESCRIPTION]: true,
|
||||||
|
[CoreConstants.FEATURE_CONTROLS_GRADE_VISIBILITY]: true,
|
||||||
|
[CoreConstants.FEATURE_USES_QUESTIONS]: true
|
||||||
|
};
|
||||||
|
|
||||||
constructor(private courseProvider: CoreCourseProvider) { }
|
constructor(private courseProvider: CoreCourseProvider) { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -28,6 +28,7 @@ import { AddonModQuizSyncCronHandler } from './providers/sync-cron-handler';
|
||||||
import { AddonModQuizIndexLinkHandler } from './providers/index-link-handler';
|
import { AddonModQuizIndexLinkHandler } from './providers/index-link-handler';
|
||||||
import { AddonModQuizGradeLinkHandler } from './providers/grade-link-handler';
|
import { AddonModQuizGradeLinkHandler } from './providers/grade-link-handler';
|
||||||
import { AddonModQuizReviewLinkHandler } from './providers/review-link-handler';
|
import { AddonModQuizReviewLinkHandler } from './providers/review-link-handler';
|
||||||
|
import { AddonModQuizListLinkHandler } from './providers/list-link-handler';
|
||||||
import { AddonModQuizComponentsModule } from './components/components.module';
|
import { AddonModQuizComponentsModule } from './components/components.module';
|
||||||
import { CoreUpdateManagerProvider } from '@providers/update-manager';
|
import { CoreUpdateManagerProvider } from '@providers/update-manager';
|
||||||
|
|
||||||
|
@ -77,7 +78,8 @@ export const ADDON_MOD_QUIZ_PROVIDERS: any[] = [
|
||||||
AddonModQuizSyncCronHandler,
|
AddonModQuizSyncCronHandler,
|
||||||
AddonModQuizIndexLinkHandler,
|
AddonModQuizIndexLinkHandler,
|
||||||
AddonModQuizGradeLinkHandler,
|
AddonModQuizGradeLinkHandler,
|
||||||
AddonModQuizReviewLinkHandler
|
AddonModQuizReviewLinkHandler,
|
||||||
|
AddonModQuizListLinkHandler
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class AddonModQuizModule {
|
export class AddonModQuizModule {
|
||||||
|
@ -85,7 +87,8 @@ export class AddonModQuizModule {
|
||||||
prefetchDelegate: CoreCourseModulePrefetchDelegate, prefetchHandler: AddonModQuizPrefetchHandler,
|
prefetchDelegate: CoreCourseModulePrefetchDelegate, prefetchHandler: AddonModQuizPrefetchHandler,
|
||||||
cronDelegate: CoreCronDelegate, syncHandler: AddonModQuizSyncCronHandler, linksDelegate: CoreContentLinksDelegate,
|
cronDelegate: CoreCronDelegate, syncHandler: AddonModQuizSyncCronHandler, linksDelegate: CoreContentLinksDelegate,
|
||||||
indexHandler: AddonModQuizIndexLinkHandler, gradeHandler: AddonModQuizGradeLinkHandler,
|
indexHandler: AddonModQuizIndexLinkHandler, gradeHandler: AddonModQuizGradeLinkHandler,
|
||||||
reviewHandler: AddonModQuizReviewLinkHandler, updateManager: CoreUpdateManagerProvider) {
|
reviewHandler: AddonModQuizReviewLinkHandler, updateManager: CoreUpdateManagerProvider,
|
||||||
|
listLinkHandler: AddonModQuizListLinkHandler) {
|
||||||
|
|
||||||
moduleDelegate.registerHandler(moduleHandler);
|
moduleDelegate.registerHandler(moduleHandler);
|
||||||
prefetchDelegate.registerHandler(prefetchHandler);
|
prefetchDelegate.registerHandler(prefetchHandler);
|
||||||
|
@ -93,6 +96,7 @@ export class AddonModQuizModule {
|
||||||
linksDelegate.registerHandler(indexHandler);
|
linksDelegate.registerHandler(indexHandler);
|
||||||
linksDelegate.registerHandler(gradeHandler);
|
linksDelegate.registerHandler(gradeHandler);
|
||||||
linksDelegate.registerHandler(reviewHandler);
|
linksDelegate.registerHandler(reviewHandler);
|
||||||
|
linksDelegate.registerHandler(listLinkHandler);
|
||||||
|
|
||||||
// Allow migrating the tables from the old app to the new schema.
|
// Allow migrating the tables from the old app to the new schema.
|
||||||
updateManager.registerSiteTableMigration({
|
updateManager.registerSiteTableMigration({
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
"errorwhileloadingthecontent": "Error while loading the content.",
|
"errorwhileloadingthecontent": "Error while loading the content.",
|
||||||
"modifieddate": "Modified {{$a}}",
|
"modifieddate": "Modified {{$a}}",
|
||||||
|
"modulenameplural": "Files",
|
||||||
"openthefile": "Open the file",
|
"openthefile": "Open the file",
|
||||||
"uploadeddate": "Uploaded {{$a}}"
|
"uploadeddate": "Uploaded {{$a}}"
|
||||||
}
|
}
|
|
@ -0,0 +1,41 @@
|
||||||
|
// (C) Copyright 2015 Martin Dougiamas
|
||||||
|
//
|
||||||
|
// 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 { Injectable } from '@angular/core';
|
||||||
|
import { CoreContentLinksModuleListHandler } from '@core/contentlinks/classes/module-list-handler';
|
||||||
|
import { CoreContentLinksHelperProvider } from '@core/contentlinks/providers/helper';
|
||||||
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
|
import { AddonModResourceProvider } from './resource';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handler to treat links to resource list page.
|
||||||
|
*/
|
||||||
|
@Injectable()
|
||||||
|
export class AddonModResourceListLinkHandler extends CoreContentLinksModuleListHandler {
|
||||||
|
name = 'AddonModResourceListLinkHandler';
|
||||||
|
|
||||||
|
constructor(linkHelper: CoreContentLinksHelperProvider, translate: TranslateService,
|
||||||
|
protected resourceProvider: AddonModResourceProvider) {
|
||||||
|
super(linkHelper, translate, 'AddonModResource', 'resource');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if the handler is enabled on a site level.
|
||||||
|
*
|
||||||
|
* @return {boolean|Promise<boolean>} Whether or not the handler is enabled on a site level.
|
||||||
|
*/
|
||||||
|
isEnabled(): boolean | Promise<boolean> {
|
||||||
|
return this.resourceProvider.isPluginEnabled();
|
||||||
|
}
|
||||||
|
}
|
|
@ -34,6 +34,18 @@ export class AddonModResourceModuleHandler implements CoreCourseModuleHandler {
|
||||||
name = 'AddonModResource';
|
name = 'AddonModResource';
|
||||||
modName = 'resource';
|
modName = 'resource';
|
||||||
|
|
||||||
|
supportedFeatures = {
|
||||||
|
[CoreConstants.FEATURE_MOD_ARCHETYPE]: CoreConstants.MOD_ARCHETYPE_RESOURCE,
|
||||||
|
[CoreConstants.FEATURE_GROUPS]: false,
|
||||||
|
[CoreConstants.FEATURE_GROUPINGS]: false,
|
||||||
|
[CoreConstants.FEATURE_MOD_INTRO]: true,
|
||||||
|
[CoreConstants.FEATURE_COMPLETION_TRACKS_VIEWS]: true,
|
||||||
|
[CoreConstants.FEATURE_GRADE_HAS_GRADE]: false,
|
||||||
|
[CoreConstants.FEATURE_GRADE_OUTCOMES]: false,
|
||||||
|
[CoreConstants.FEATURE_BACKUP_MOODLE2]: true,
|
||||||
|
[CoreConstants.FEATURE_SHOW_DESCRIPTION]: true
|
||||||
|
};
|
||||||
|
|
||||||
protected statusObserver;
|
protected statusObserver;
|
||||||
|
|
||||||
constructor(protected resourceProvider: AddonModResourceProvider, private courseProvider: CoreCourseProvider,
|
constructor(protected resourceProvider: AddonModResourceProvider, private courseProvider: CoreCourseProvider,
|
||||||
|
|
|
@ -18,6 +18,7 @@ import { AddonModResourceModuleHandler } from './providers/module-handler';
|
||||||
import { AddonModResourceProvider } from './providers/resource';
|
import { AddonModResourceProvider } from './providers/resource';
|
||||||
import { AddonModResourcePrefetchHandler } from './providers/prefetch-handler';
|
import { AddonModResourcePrefetchHandler } from './providers/prefetch-handler';
|
||||||
import { AddonModResourceLinkHandler } from './providers/link-handler';
|
import { AddonModResourceLinkHandler } from './providers/link-handler';
|
||||||
|
import { AddonModResourceListLinkHandler } from './providers/list-link-handler';
|
||||||
import { AddonModResourcePluginFileHandler } from './providers/pluginfile-handler';
|
import { AddonModResourcePluginFileHandler } from './providers/pluginfile-handler';
|
||||||
import { AddonModResourceHelperProvider } from './providers/helper';
|
import { AddonModResourceHelperProvider } from './providers/helper';
|
||||||
import { CoreContentLinksDelegate } from '@core/contentlinks/providers/delegate';
|
import { CoreContentLinksDelegate } from '@core/contentlinks/providers/delegate';
|
||||||
|
@ -42,6 +43,7 @@ export const ADDON_MOD_RESOURCE_PROVIDERS: any[] = [
|
||||||
AddonModResourceHelperProvider,
|
AddonModResourceHelperProvider,
|
||||||
AddonModResourcePrefetchHandler,
|
AddonModResourcePrefetchHandler,
|
||||||
AddonModResourceLinkHandler,
|
AddonModResourceLinkHandler,
|
||||||
|
AddonModResourceListLinkHandler,
|
||||||
AddonModResourcePluginFileHandler
|
AddonModResourcePluginFileHandler
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
@ -49,10 +51,13 @@ export class AddonModResourceModule {
|
||||||
constructor(moduleDelegate: CoreCourseModuleDelegate, moduleHandler: AddonModResourceModuleHandler,
|
constructor(moduleDelegate: CoreCourseModuleDelegate, moduleHandler: AddonModResourceModuleHandler,
|
||||||
prefetchDelegate: CoreCourseModulePrefetchDelegate, prefetchHandler: AddonModResourcePrefetchHandler,
|
prefetchDelegate: CoreCourseModulePrefetchDelegate, prefetchHandler: AddonModResourcePrefetchHandler,
|
||||||
contentLinksDelegate: CoreContentLinksDelegate, linkHandler: AddonModResourceLinkHandler,
|
contentLinksDelegate: CoreContentLinksDelegate, linkHandler: AddonModResourceLinkHandler,
|
||||||
pluginfileDelegate: CorePluginFileDelegate, pluginfileHandler: AddonModResourcePluginFileHandler) {
|
pluginfileDelegate: CorePluginFileDelegate, pluginfileHandler: AddonModResourcePluginFileHandler,
|
||||||
|
listLinkHandler: AddonModResourceListLinkHandler) {
|
||||||
|
|
||||||
moduleDelegate.registerHandler(moduleHandler);
|
moduleDelegate.registerHandler(moduleHandler);
|
||||||
prefetchDelegate.registerHandler(prefetchHandler);
|
prefetchDelegate.registerHandler(prefetchHandler);
|
||||||
contentLinksDelegate.registerHandler(linkHandler);
|
contentLinksDelegate.registerHandler(linkHandler);
|
||||||
|
contentLinksDelegate.registerHandler(listLinkHandler);
|
||||||
pluginfileDelegate.registerHandler(pluginfileHandler);
|
pluginfileDelegate.registerHandler(pluginfileHandler);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
"incomplete": "Incomplete",
|
"incomplete": "Incomplete",
|
||||||
"lastattempt": "Last completed attempt",
|
"lastattempt": "Last completed attempt",
|
||||||
"mode": "Mode",
|
"mode": "Mode",
|
||||||
|
"modulenameplural": "SCORM packages",
|
||||||
"newattempt": "Start a new attempt",
|
"newattempt": "Start a new attempt",
|
||||||
"noattemptsallowed": "Number of attempts allowed",
|
"noattemptsallowed": "Number of attempts allowed",
|
||||||
"noattemptsmade": "Number of attempts you have made",
|
"noattemptsmade": "Number of attempts you have made",
|
||||||
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
// (C) Copyright 2015 Martin Dougiamas
|
||||||
|
//
|
||||||
|
// 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 { Injectable } from '@angular/core';
|
||||||
|
import { CoreContentLinksModuleListHandler } from '@core/contentlinks/classes/module-list-handler';
|
||||||
|
import { CoreContentLinksHelperProvider } from '@core/contentlinks/providers/helper';
|
||||||
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handler to treat links to SCORM list page.
|
||||||
|
*/
|
||||||
|
@Injectable()
|
||||||
|
export class AddonModScormListLinkHandler extends CoreContentLinksModuleListHandler {
|
||||||
|
name = 'AddonModScormListLinkHandler';
|
||||||
|
|
||||||
|
constructor(linkHelper: CoreContentLinksHelperProvider, translate: TranslateService) {
|
||||||
|
super(linkHelper, translate, 'AddonModScorm', 'scorm');
|
||||||
|
}
|
||||||
|
}
|
|
@ -17,6 +17,7 @@ import { NavController, NavOptions } from 'ionic-angular';
|
||||||
import { AddonModScormIndexComponent } from '../components/index/index';
|
import { AddonModScormIndexComponent } from '../components/index/index';
|
||||||
import { CoreCourseModuleHandler, CoreCourseModuleHandlerData } from '@core/course/providers/module-delegate';
|
import { CoreCourseModuleHandler, CoreCourseModuleHandlerData } from '@core/course/providers/module-delegate';
|
||||||
import { CoreCourseProvider } from '@core/course/providers/course';
|
import { CoreCourseProvider } from '@core/course/providers/course';
|
||||||
|
import { CoreConstants } from '@core/constants';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handler to support SCORM modules.
|
* Handler to support SCORM modules.
|
||||||
|
@ -26,6 +27,18 @@ export class AddonModScormModuleHandler implements CoreCourseModuleHandler {
|
||||||
name = 'AddonModScorm';
|
name = 'AddonModScorm';
|
||||||
modName = 'scorm';
|
modName = 'scorm';
|
||||||
|
|
||||||
|
supportedFeatures = {
|
||||||
|
[CoreConstants.FEATURE_GROUPS]: true,
|
||||||
|
[CoreConstants.FEATURE_GROUPINGS]: true,
|
||||||
|
[CoreConstants.FEATURE_MOD_INTRO]: true,
|
||||||
|
[CoreConstants.FEATURE_COMPLETION_TRACKS_VIEWS]: true,
|
||||||
|
[CoreConstants.FEATURE_COMPLETION_HAS_RULES]: true,
|
||||||
|
[CoreConstants.FEATURE_GRADE_HAS_GRADE]: true,
|
||||||
|
[CoreConstants.FEATURE_GRADE_OUTCOMES]: true,
|
||||||
|
[CoreConstants.FEATURE_BACKUP_MOODLE2]: true,
|
||||||
|
[CoreConstants.FEATURE_SHOW_DESCRIPTION]: true
|
||||||
|
};
|
||||||
|
|
||||||
constructor(private courseProvider: CoreCourseProvider) { }
|
constructor(private courseProvider: CoreCourseProvider) { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -25,6 +25,7 @@ import { AddonModScormPrefetchHandler } from './providers/prefetch-handler';
|
||||||
import { AddonModScormSyncCronHandler } from './providers/sync-cron-handler';
|
import { AddonModScormSyncCronHandler } from './providers/sync-cron-handler';
|
||||||
import { AddonModScormIndexLinkHandler } from './providers/index-link-handler';
|
import { AddonModScormIndexLinkHandler } from './providers/index-link-handler';
|
||||||
import { AddonModScormGradeLinkHandler } from './providers/grade-link-handler';
|
import { AddonModScormGradeLinkHandler } from './providers/grade-link-handler';
|
||||||
|
import { AddonModScormListLinkHandler } from './providers/list-link-handler';
|
||||||
import { AddonModScormSyncProvider } from './providers/scorm-sync';
|
import { AddonModScormSyncProvider } from './providers/scorm-sync';
|
||||||
import { AddonModScormComponentsModule } from './components/components.module';
|
import { AddonModScormComponentsModule } from './components/components.module';
|
||||||
import { CoreUpdateManagerProvider } from '@providers/update-manager';
|
import { CoreUpdateManagerProvider } from '@providers/update-manager';
|
||||||
|
@ -52,7 +53,8 @@ export const ADDON_MOD_SCORM_PROVIDERS: any[] = [
|
||||||
AddonModScormPrefetchHandler,
|
AddonModScormPrefetchHandler,
|
||||||
AddonModScormSyncCronHandler,
|
AddonModScormSyncCronHandler,
|
||||||
AddonModScormIndexLinkHandler,
|
AddonModScormIndexLinkHandler,
|
||||||
AddonModScormGradeLinkHandler
|
AddonModScormGradeLinkHandler,
|
||||||
|
AddonModScormListLinkHandler
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class AddonModScormModule {
|
export class AddonModScormModule {
|
||||||
|
@ -60,13 +62,14 @@ export class AddonModScormModule {
|
||||||
prefetchDelegate: CoreCourseModulePrefetchDelegate, prefetchHandler: AddonModScormPrefetchHandler,
|
prefetchDelegate: CoreCourseModulePrefetchDelegate, prefetchHandler: AddonModScormPrefetchHandler,
|
||||||
cronDelegate: CoreCronDelegate, syncHandler: AddonModScormSyncCronHandler, linksDelegate: CoreContentLinksDelegate,
|
cronDelegate: CoreCronDelegate, syncHandler: AddonModScormSyncCronHandler, linksDelegate: CoreContentLinksDelegate,
|
||||||
indexHandler: AddonModScormIndexLinkHandler, gradeHandler: AddonModScormGradeLinkHandler,
|
indexHandler: AddonModScormIndexLinkHandler, gradeHandler: AddonModScormGradeLinkHandler,
|
||||||
updateManager: CoreUpdateManagerProvider) {
|
updateManager: CoreUpdateManagerProvider, listLinkHandler: AddonModScormListLinkHandler) {
|
||||||
|
|
||||||
moduleDelegate.registerHandler(moduleHandler);
|
moduleDelegate.registerHandler(moduleHandler);
|
||||||
prefetchDelegate.registerHandler(prefetchHandler);
|
prefetchDelegate.registerHandler(prefetchHandler);
|
||||||
cronDelegate.register(syncHandler);
|
cronDelegate.register(syncHandler);
|
||||||
linksDelegate.registerHandler(indexHandler);
|
linksDelegate.registerHandler(indexHandler);
|
||||||
linksDelegate.registerHandler(gradeHandler);
|
linksDelegate.registerHandler(gradeHandler);
|
||||||
|
linksDelegate.registerHandler(listLinkHandler);
|
||||||
|
|
||||||
// Allow migrating the tables from the old app to the new schema.
|
// Allow migrating the tables from the old app to the new schema.
|
||||||
updateManager.registerSiteTablesMigration([
|
updateManager.registerSiteTablesMigration([
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
"errorgetsurvey": "Error getting survey data.",
|
"errorgetsurvey": "Error getting survey data.",
|
||||||
"ifoundthat": "I found that",
|
"ifoundthat": "I found that",
|
||||||
"ipreferthat": "I prefer that",
|
"ipreferthat": "I prefer that",
|
||||||
|
"modulenameplural": "Surveys",
|
||||||
"responses": "Responses",
|
"responses": "Responses",
|
||||||
"results": "Results",
|
"results": "Results",
|
||||||
"surveycompletednograph": "You have completed this survey."
|
"surveycompletednograph": "You have completed this survey."
|
||||||
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
// (C) Copyright 2015 Martin Dougiamas
|
||||||
|
//
|
||||||
|
// 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 { Injectable } from '@angular/core';
|
||||||
|
import { CoreContentLinksModuleListHandler } from '@core/contentlinks/classes/module-list-handler';
|
||||||
|
import { CoreContentLinksHelperProvider } from '@core/contentlinks/providers/helper';
|
||||||
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handler to treat links to survey list page.
|
||||||
|
*/
|
||||||
|
@Injectable()
|
||||||
|
export class AddonModSurveyListLinkHandler extends CoreContentLinksModuleListHandler {
|
||||||
|
name = 'AddonModSurveyListLinkHandler';
|
||||||
|
|
||||||
|
constructor(linkHelper: CoreContentLinksHelperProvider, translate: TranslateService) {
|
||||||
|
super(linkHelper, translate, 'AddonModSurvey', 'survey');
|
||||||
|
}
|
||||||
|
}
|
|
@ -17,6 +17,7 @@ import { NavController, NavOptions } from 'ionic-angular';
|
||||||
import { AddonModSurveyIndexComponent } from '../components/index/index';
|
import { AddonModSurveyIndexComponent } from '../components/index/index';
|
||||||
import { CoreCourseModuleHandler, CoreCourseModuleHandlerData } from '@core/course/providers/module-delegate';
|
import { CoreCourseModuleHandler, CoreCourseModuleHandlerData } from '@core/course/providers/module-delegate';
|
||||||
import { CoreCourseProvider } from '@core/course/providers/course';
|
import { CoreCourseProvider } from '@core/course/providers/course';
|
||||||
|
import { CoreConstants } from '@core/constants';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handler to support survey modules.
|
* Handler to support survey modules.
|
||||||
|
@ -26,6 +27,18 @@ export class AddonModSurveyModuleHandler implements CoreCourseModuleHandler {
|
||||||
name = 'AddonModSurvey';
|
name = 'AddonModSurvey';
|
||||||
modName = 'survey';
|
modName = 'survey';
|
||||||
|
|
||||||
|
supportedFeatures = {
|
||||||
|
[CoreConstants.FEATURE_GROUPS]: true,
|
||||||
|
[CoreConstants.FEATURE_GROUPINGS]: true,
|
||||||
|
[CoreConstants.FEATURE_MOD_INTRO]: true,
|
||||||
|
[CoreConstants.FEATURE_COMPLETION_TRACKS_VIEWS]: true,
|
||||||
|
[CoreConstants.FEATURE_COMPLETION_HAS_RULES]: true,
|
||||||
|
[CoreConstants.FEATURE_GRADE_HAS_GRADE]: false,
|
||||||
|
[CoreConstants.FEATURE_GRADE_OUTCOMES]: false,
|
||||||
|
[CoreConstants.FEATURE_BACKUP_MOODLE2]: true,
|
||||||
|
[CoreConstants.FEATURE_SHOW_DESCRIPTION]: true
|
||||||
|
};
|
||||||
|
|
||||||
constructor(private courseProvider: CoreCourseProvider) { }
|
constructor(private courseProvider: CoreCourseProvider) { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -21,6 +21,7 @@ import { AddonModSurveyComponentsModule } from './components/components.module';
|
||||||
import { AddonModSurveyModuleHandler } from './providers/module-handler';
|
import { AddonModSurveyModuleHandler } from './providers/module-handler';
|
||||||
import { AddonModSurveyProvider } from './providers/survey';
|
import { AddonModSurveyProvider } from './providers/survey';
|
||||||
import { AddonModSurveyLinkHandler } from './providers/link-handler';
|
import { AddonModSurveyLinkHandler } from './providers/link-handler';
|
||||||
|
import { AddonModSurveyListLinkHandler } from './providers/list-link-handler';
|
||||||
import { AddonModSurveyHelperProvider } from './providers/helper';
|
import { AddonModSurveyHelperProvider } from './providers/helper';
|
||||||
import { AddonModSurveyPrefetchHandler } from './providers/prefetch-handler';
|
import { AddonModSurveyPrefetchHandler } from './providers/prefetch-handler';
|
||||||
import { AddonModSurveySyncProvider } from './providers/sync';
|
import { AddonModSurveySyncProvider } from './providers/sync';
|
||||||
|
@ -50,6 +51,7 @@ export const ADDON_MOD_SURVEY_PROVIDERS: any[] = [
|
||||||
AddonModSurveyModuleHandler,
|
AddonModSurveyModuleHandler,
|
||||||
AddonModSurveyPrefetchHandler,
|
AddonModSurveyPrefetchHandler,
|
||||||
AddonModSurveyLinkHandler,
|
AddonModSurveyLinkHandler,
|
||||||
|
AddonModSurveyListLinkHandler,
|
||||||
AddonModSurveySyncCronHandler
|
AddonModSurveySyncCronHandler
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
@ -57,11 +59,13 @@ export class AddonModSurveyModule {
|
||||||
constructor(moduleDelegate: CoreCourseModuleDelegate, moduleHandler: AddonModSurveyModuleHandler,
|
constructor(moduleDelegate: CoreCourseModuleDelegate, moduleHandler: AddonModSurveyModuleHandler,
|
||||||
prefetchDelegate: CoreCourseModulePrefetchDelegate, prefetchHandler: AddonModSurveyPrefetchHandler,
|
prefetchDelegate: CoreCourseModulePrefetchDelegate, prefetchHandler: AddonModSurveyPrefetchHandler,
|
||||||
contentLinksDelegate: CoreContentLinksDelegate, linkHandler: AddonModSurveyLinkHandler,
|
contentLinksDelegate: CoreContentLinksDelegate, linkHandler: AddonModSurveyLinkHandler,
|
||||||
cronDelegate: CoreCronDelegate, syncHandler: AddonModSurveySyncCronHandler, updateManager: CoreUpdateManagerProvider) {
|
cronDelegate: CoreCronDelegate, syncHandler: AddonModSurveySyncCronHandler, updateManager: CoreUpdateManagerProvider,
|
||||||
|
listLinkHandler: AddonModSurveyListLinkHandler) {
|
||||||
|
|
||||||
moduleDelegate.registerHandler(moduleHandler);
|
moduleDelegate.registerHandler(moduleHandler);
|
||||||
prefetchDelegate.registerHandler(prefetchHandler);
|
prefetchDelegate.registerHandler(prefetchHandler);
|
||||||
contentLinksDelegate.registerHandler(linkHandler);
|
contentLinksDelegate.registerHandler(linkHandler);
|
||||||
|
contentLinksDelegate.registerHandler(listLinkHandler);
|
||||||
cronDelegate.register(syncHandler);
|
cronDelegate.register(syncHandler);
|
||||||
|
|
||||||
// Allow migrating the tables from the old app to the new schema.
|
// Allow migrating the tables from the old app to the new schema.
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{
|
{
|
||||||
"accessurl": "Access the URL",
|
"accessurl": "Access the URL",
|
||||||
|
"modulenameplural": "URLs",
|
||||||
"pointingtourl": "URL that the resource points to."
|
"pointingtourl": "URL that the resource points to."
|
||||||
}
|
}
|
|
@ -0,0 +1,30 @@
|
||||||
|
// (C) Copyright 2015 Martin Dougiamas
|
||||||
|
//
|
||||||
|
// 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 { Injectable } from '@angular/core';
|
||||||
|
import { CoreContentLinksModuleListHandler } from '@core/contentlinks/classes/module-list-handler';
|
||||||
|
import { CoreContentLinksHelperProvider } from '@core/contentlinks/providers/helper';
|
||||||
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handler to treat links to URL list page.
|
||||||
|
*/
|
||||||
|
@Injectable()
|
||||||
|
export class AddonModUrlListLinkHandler extends CoreContentLinksModuleListHandler {
|
||||||
|
name = 'AddonModUrlListLinkHandler';
|
||||||
|
|
||||||
|
constructor(linkHelper: CoreContentLinksHelperProvider, translate: TranslateService) {
|
||||||
|
super(linkHelper, translate, 'AddonModUrl', 'url');
|
||||||
|
}
|
||||||
|
}
|
|
@ -31,6 +31,18 @@ export class AddonModUrlModuleHandler implements CoreCourseModuleHandler {
|
||||||
name = 'AddonModUrl';
|
name = 'AddonModUrl';
|
||||||
modName = 'url';
|
modName = 'url';
|
||||||
|
|
||||||
|
supportedFeatures = {
|
||||||
|
[CoreConstants.FEATURE_MOD_ARCHETYPE]: CoreConstants.MOD_ARCHETYPE_RESOURCE,
|
||||||
|
[CoreConstants.FEATURE_GROUPS]: false,
|
||||||
|
[CoreConstants.FEATURE_GROUPINGS]: false,
|
||||||
|
[CoreConstants.FEATURE_MOD_INTRO]: true,
|
||||||
|
[CoreConstants.FEATURE_COMPLETION_TRACKS_VIEWS]: true,
|
||||||
|
[CoreConstants.FEATURE_GRADE_HAS_GRADE]: false,
|
||||||
|
[CoreConstants.FEATURE_GRADE_OUTCOMES]: false,
|
||||||
|
[CoreConstants.FEATURE_BACKUP_MOODLE2]: true,
|
||||||
|
[CoreConstants.FEATURE_SHOW_DESCRIPTION]: true
|
||||||
|
};
|
||||||
|
|
||||||
constructor(private courseProvider: CoreCourseProvider, private urlProvider: AddonModUrlProvider,
|
constructor(private courseProvider: CoreCourseProvider, private urlProvider: AddonModUrlProvider,
|
||||||
private urlHelper: AddonModUrlHelperProvider, private domUtils: CoreDomUtilsProvider,
|
private urlHelper: AddonModUrlHelperProvider, private domUtils: CoreDomUtilsProvider,
|
||||||
private contentLinksHelper: CoreContentLinksHelperProvider) { }
|
private contentLinksHelper: CoreContentLinksHelperProvider) { }
|
||||||
|
|
|
@ -17,6 +17,7 @@ import { AddonModUrlComponentsModule } from './components/components.module';
|
||||||
import { AddonModUrlModuleHandler } from './providers/module-handler';
|
import { AddonModUrlModuleHandler } from './providers/module-handler';
|
||||||
import { AddonModUrlProvider } from './providers/url';
|
import { AddonModUrlProvider } from './providers/url';
|
||||||
import { AddonModUrlLinkHandler } from './providers/link-handler';
|
import { AddonModUrlLinkHandler } from './providers/link-handler';
|
||||||
|
import { AddonModUrlListLinkHandler } from './providers/list-link-handler';
|
||||||
import { AddonModUrlHelperProvider } from './providers/helper';
|
import { AddonModUrlHelperProvider } from './providers/helper';
|
||||||
import { CoreContentLinksDelegate } from '@core/contentlinks/providers/delegate';
|
import { CoreContentLinksDelegate } from '@core/contentlinks/providers/delegate';
|
||||||
import { CoreCourseModuleDelegate } from '@core/course/providers/module-delegate';
|
import { CoreCourseModuleDelegate } from '@core/course/providers/module-delegate';
|
||||||
|
@ -37,13 +38,17 @@ export const ADDON_MOD_URL_PROVIDERS: any[] = [
|
||||||
AddonModUrlProvider,
|
AddonModUrlProvider,
|
||||||
AddonModUrlHelperProvider,
|
AddonModUrlHelperProvider,
|
||||||
AddonModUrlModuleHandler,
|
AddonModUrlModuleHandler,
|
||||||
AddonModUrlLinkHandler
|
AddonModUrlLinkHandler,
|
||||||
|
AddonModUrlListLinkHandler
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class AddonModUrlModule {
|
export class AddonModUrlModule {
|
||||||
constructor(moduleDelegate: CoreCourseModuleDelegate, moduleHandler: AddonModUrlModuleHandler,
|
constructor(moduleDelegate: CoreCourseModuleDelegate, moduleHandler: AddonModUrlModuleHandler,
|
||||||
contentLinksDelegate: CoreContentLinksDelegate, linkHandler: AddonModUrlLinkHandler) {
|
contentLinksDelegate: CoreContentLinksDelegate, linkHandler: AddonModUrlLinkHandler,
|
||||||
|
listLinkHandler: AddonModUrlListLinkHandler) {
|
||||||
|
|
||||||
moduleDelegate.registerHandler(moduleHandler);
|
moduleDelegate.registerHandler(moduleHandler);
|
||||||
contentLinksDelegate.registerHandler(linkHandler);
|
contentLinksDelegate.registerHandler(linkHandler);
|
||||||
|
contentLinksDelegate.registerHandler(listLinkHandler);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
"errornowikiavailable": "This wiki does not have any content yet.",
|
"errornowikiavailable": "This wiki does not have any content yet.",
|
||||||
"gowikihome": "Go to the wiki first page",
|
"gowikihome": "Go to the wiki first page",
|
||||||
"map": "Map",
|
"map": "Map",
|
||||||
|
"modulenameplural": "Wikis",
|
||||||
"newpagehdr": "New page",
|
"newpagehdr": "New page",
|
||||||
"newpagetitle": "New page title",
|
"newpagetitle": "New page title",
|
||||||
"nocontent": "There is no content for this page",
|
"nocontent": "There is no content for this page",
|
||||||
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
// (C) Copyright 2015 Martin Dougiamas
|
||||||
|
//
|
||||||
|
// 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 { Injectable } from '@angular/core';
|
||||||
|
import { CoreContentLinksModuleListHandler } from '@core/contentlinks/classes/module-list-handler';
|
||||||
|
import { CoreContentLinksHelperProvider } from '@core/contentlinks/providers/helper';
|
||||||
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handler to treat links to wiki list page.
|
||||||
|
*/
|
||||||
|
@Injectable()
|
||||||
|
export class AddonModWikiListLinkHandler extends CoreContentLinksModuleListHandler {
|
||||||
|
name = 'AddonModWikiListLinkHandler';
|
||||||
|
|
||||||
|
constructor(linkHelper: CoreContentLinksHelperProvider, translate: TranslateService) {
|
||||||
|
super(linkHelper, translate, 'AddonModWiki', 'wiki');
|
||||||
|
}
|
||||||
|
}
|
|
@ -17,6 +17,7 @@ import { NavController, NavOptions } from 'ionic-angular';
|
||||||
import { AddonModWikiIndexComponent } from '../components/index/index';
|
import { AddonModWikiIndexComponent } from '../components/index/index';
|
||||||
import { CoreCourseModuleHandler, CoreCourseModuleHandlerData } from '@core/course/providers/module-delegate';
|
import { CoreCourseModuleHandler, CoreCourseModuleHandlerData } from '@core/course/providers/module-delegate';
|
||||||
import { CoreCourseProvider } from '@core/course/providers/course';
|
import { CoreCourseProvider } from '@core/course/providers/course';
|
||||||
|
import { CoreConstants } from '@core/constants';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handler to support wiki modules.
|
* Handler to support wiki modules.
|
||||||
|
@ -26,6 +27,19 @@ export class AddonModWikiModuleHandler implements CoreCourseModuleHandler {
|
||||||
name = 'AddonModWiki';
|
name = 'AddonModWiki';
|
||||||
modName = 'wiki';
|
modName = 'wiki';
|
||||||
|
|
||||||
|
supportedFeatures = {
|
||||||
|
[CoreConstants.FEATURE_GROUPS]: true,
|
||||||
|
[CoreConstants.FEATURE_GROUPINGS]: true,
|
||||||
|
[CoreConstants.FEATURE_MOD_INTRO]: true,
|
||||||
|
[CoreConstants.FEATURE_COMPLETION_TRACKS_VIEWS]: true,
|
||||||
|
[CoreConstants.FEATURE_GRADE_HAS_GRADE]: false,
|
||||||
|
[CoreConstants.FEATURE_GRADE_OUTCOMES]: false,
|
||||||
|
[CoreConstants.FEATURE_BACKUP_MOODLE2]: true,
|
||||||
|
[CoreConstants.FEATURE_SHOW_DESCRIPTION]: true,
|
||||||
|
[CoreConstants.FEATURE_RATE]: false,
|
||||||
|
[CoreConstants.FEATURE_COMMENT]: true
|
||||||
|
};
|
||||||
|
|
||||||
constructor(private courseProvider: CoreCourseProvider) { }
|
constructor(private courseProvider: CoreCourseProvider) { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -28,6 +28,7 @@ import { AddonModWikiIndexLinkHandler } from './providers/index-link-handler';
|
||||||
import { AddonModWikiPageOrMapLinkHandler } from './providers/page-or-map-link-handler';
|
import { AddonModWikiPageOrMapLinkHandler } from './providers/page-or-map-link-handler';
|
||||||
import { AddonModWikiCreateLinkHandler } from './providers/create-link-handler';
|
import { AddonModWikiCreateLinkHandler } from './providers/create-link-handler';
|
||||||
import { AddonModWikiEditLinkHandler } from './providers/edit-link-handler';
|
import { AddonModWikiEditLinkHandler } from './providers/edit-link-handler';
|
||||||
|
import { AddonModWikiListLinkHandler } from './providers/list-link-handler';
|
||||||
import { CoreUpdateManagerProvider } from '@providers/update-manager';
|
import { CoreUpdateManagerProvider } from '@providers/update-manager';
|
||||||
|
|
||||||
// List of providers (without handlers).
|
// List of providers (without handlers).
|
||||||
|
@ -53,7 +54,8 @@ export const ADDON_MOD_WIKI_PROVIDERS: any[] = [
|
||||||
AddonModWikiIndexLinkHandler,
|
AddonModWikiIndexLinkHandler,
|
||||||
AddonModWikiPageOrMapLinkHandler,
|
AddonModWikiPageOrMapLinkHandler,
|
||||||
AddonModWikiCreateLinkHandler,
|
AddonModWikiCreateLinkHandler,
|
||||||
AddonModWikiEditLinkHandler
|
AddonModWikiEditLinkHandler,
|
||||||
|
AddonModWikiListLinkHandler
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class AddonModWikiModule {
|
export class AddonModWikiModule {
|
||||||
|
@ -62,7 +64,7 @@ export class AddonModWikiModule {
|
||||||
cronDelegate: CoreCronDelegate, syncHandler: AddonModWikiSyncCronHandler, linksDelegate: CoreContentLinksDelegate,
|
cronDelegate: CoreCronDelegate, syncHandler: AddonModWikiSyncCronHandler, linksDelegate: CoreContentLinksDelegate,
|
||||||
indexHandler: AddonModWikiIndexLinkHandler, pageOrMapHandler: AddonModWikiPageOrMapLinkHandler,
|
indexHandler: AddonModWikiIndexLinkHandler, pageOrMapHandler: AddonModWikiPageOrMapLinkHandler,
|
||||||
createHandler: AddonModWikiCreateLinkHandler, editHandler: AddonModWikiEditLinkHandler,
|
createHandler: AddonModWikiCreateLinkHandler, editHandler: AddonModWikiEditLinkHandler,
|
||||||
updateManager: CoreUpdateManagerProvider) {
|
updateManager: CoreUpdateManagerProvider, listLinkHandler: AddonModWikiListLinkHandler) {
|
||||||
|
|
||||||
moduleDelegate.registerHandler(moduleHandler);
|
moduleDelegate.registerHandler(moduleHandler);
|
||||||
prefetchDelegate.registerHandler(prefetchHandler);
|
prefetchDelegate.registerHandler(prefetchHandler);
|
||||||
|
@ -71,6 +73,7 @@ export class AddonModWikiModule {
|
||||||
linksDelegate.registerHandler(pageOrMapHandler);
|
linksDelegate.registerHandler(pageOrMapHandler);
|
||||||
linksDelegate.registerHandler(createHandler);
|
linksDelegate.registerHandler(createHandler);
|
||||||
linksDelegate.registerHandler(editHandler);
|
linksDelegate.registerHandler(editHandler);
|
||||||
|
linksDelegate.registerHandler(listLinkHandler);
|
||||||
|
|
||||||
// Allow migrating the tables from the old app to the new schema.
|
// Allow migrating the tables from the old app to the new schema.
|
||||||
updateManager.registerSiteTableMigration({
|
updateManager.registerSiteTableMigration({
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
"gradinggradecalculated": "Calculated grade for assessment",
|
"gradinggradecalculated": "Calculated grade for assessment",
|
||||||
"gradinggradeof": "Grade for assessment (of {{$a}})",
|
"gradinggradeof": "Grade for assessment (of {{$a}})",
|
||||||
"gradinggradeover": "Override grade for assessment",
|
"gradinggradeover": "Override grade for assessment",
|
||||||
|
"modulenameplural": "Workshops",
|
||||||
"nogradeyet": "No grade yet",
|
"nogradeyet": "No grade yet",
|
||||||
"notassessed": "Not assessed yet",
|
"notassessed": "Not assessed yet",
|
||||||
"notoverridden": "Not overridden",
|
"notoverridden": "Not overridden",
|
||||||
|
|
|
@ -0,0 +1,41 @@
|
||||||
|
// (C) Copyright 2015 Martin Dougiamas
|
||||||
|
//
|
||||||
|
// 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 { Injectable } from '@angular/core';
|
||||||
|
import { CoreContentLinksModuleListHandler } from '@core/contentlinks/classes/module-list-handler';
|
||||||
|
import { CoreContentLinksHelperProvider } from '@core/contentlinks/providers/helper';
|
||||||
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
|
import { AddonModWorkshopProvider } from './workshop';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handler to treat links to workshop list page.
|
||||||
|
*/
|
||||||
|
@Injectable()
|
||||||
|
export class AddonModWorkshopListLinkHandler extends CoreContentLinksModuleListHandler {
|
||||||
|
name = 'AddonModWorkshopListLinkHandler';
|
||||||
|
|
||||||
|
constructor(linkHelper: CoreContentLinksHelperProvider, translate: TranslateService,
|
||||||
|
protected workshopProvider: AddonModWorkshopProvider) {
|
||||||
|
super(linkHelper, translate, 'AddonModWorkshop', 'workshop');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if the handler is enabled on a site level.
|
||||||
|
*
|
||||||
|
* @return {Promise<boolean>} Whether or not the handler is enabled on a site level.
|
||||||
|
*/
|
||||||
|
isEnabled(): Promise<boolean> {
|
||||||
|
return this.workshopProvider.isPluginEnabled();
|
||||||
|
}
|
||||||
|
}
|
|
@ -18,6 +18,7 @@ import { AddonModWorkshopIndexComponent } from '../components/index/index';
|
||||||
import { CoreCourseModuleHandler, CoreCourseModuleHandlerData } from '@core/course/providers/module-delegate';
|
import { CoreCourseModuleHandler, CoreCourseModuleHandlerData } from '@core/course/providers/module-delegate';
|
||||||
import { CoreCourseProvider } from '@core/course/providers/course';
|
import { CoreCourseProvider } from '@core/course/providers/course';
|
||||||
import { AddonModWorkshopProvider } from './workshop';
|
import { AddonModWorkshopProvider } from './workshop';
|
||||||
|
import { CoreConstants } from '@core/constants';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handler to support workshop modules.
|
* Handler to support workshop modules.
|
||||||
|
@ -27,6 +28,17 @@ export class AddonModWorkshopModuleHandler implements CoreCourseModuleHandler {
|
||||||
name = 'AddonModWorkshop';
|
name = 'AddonModWorkshop';
|
||||||
modName = 'workshop';
|
modName = 'workshop';
|
||||||
|
|
||||||
|
supportedFeatures = {
|
||||||
|
[CoreConstants.FEATURE_GROUPS]: true,
|
||||||
|
[CoreConstants.FEATURE_GROUPINGS]: true,
|
||||||
|
[CoreConstants.FEATURE_MOD_INTRO]: true,
|
||||||
|
[CoreConstants.FEATURE_COMPLETION_TRACKS_VIEWS]: true,
|
||||||
|
[CoreConstants.FEATURE_GRADE_HAS_GRADE]: true,
|
||||||
|
[CoreConstants.FEATURE_BACKUP_MOODLE2]: true,
|
||||||
|
[CoreConstants.FEATURE_SHOW_DESCRIPTION]: true,
|
||||||
|
[CoreConstants.FEATURE_PLAGIARISM]: true
|
||||||
|
};
|
||||||
|
|
||||||
constructor(private courseProvider: CoreCourseProvider, private workshopProvider: AddonModWorkshopProvider) { }
|
constructor(private courseProvider: CoreCourseProvider, private workshopProvider: AddonModWorkshopProvider) { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -22,6 +22,7 @@ import { AddonModWorkshopComponentsModule } from './components/components.module
|
||||||
import { AddonModWorkshopModuleHandler } from './providers/module-handler';
|
import { AddonModWorkshopModuleHandler } from './providers/module-handler';
|
||||||
import { AddonModWorkshopProvider } from './providers/workshop';
|
import { AddonModWorkshopProvider } from './providers/workshop';
|
||||||
import { AddonModWorkshopLinkHandler } from './providers/link-handler';
|
import { AddonModWorkshopLinkHandler } from './providers/link-handler';
|
||||||
|
import { AddonModWorkshopListLinkHandler } from './providers/list-link-handler';
|
||||||
import { AddonModWorkshopOfflineProvider } from './providers/offline';
|
import { AddonModWorkshopOfflineProvider } from './providers/offline';
|
||||||
import { AddonModWorkshopSyncProvider } from './providers/sync';
|
import { AddonModWorkshopSyncProvider } from './providers/sync';
|
||||||
import { AddonModWorkshopHelperProvider } from './providers/helper';
|
import { AddonModWorkshopHelperProvider } from './providers/helper';
|
||||||
|
@ -50,6 +51,7 @@ export const ADDON_MOD_WORKSHOP_PROVIDERS: any[] = [
|
||||||
AddonModWorkshopProvider,
|
AddonModWorkshopProvider,
|
||||||
AddonModWorkshopModuleHandler,
|
AddonModWorkshopModuleHandler,
|
||||||
AddonModWorkshopLinkHandler,
|
AddonModWorkshopLinkHandler,
|
||||||
|
AddonModWorkshopListLinkHandler,
|
||||||
AddonModWorkshopOfflineProvider,
|
AddonModWorkshopOfflineProvider,
|
||||||
AddonModWorkshopSyncProvider,
|
AddonModWorkshopSyncProvider,
|
||||||
AddonModWorkshopHelperProvider,
|
AddonModWorkshopHelperProvider,
|
||||||
|
@ -63,10 +65,11 @@ export class AddonModWorkshopModule {
|
||||||
contentLinksDelegate: CoreContentLinksDelegate, linkHandler: AddonModWorkshopLinkHandler,
|
contentLinksDelegate: CoreContentLinksDelegate, linkHandler: AddonModWorkshopLinkHandler,
|
||||||
prefetchDelegate: CoreCourseModulePrefetchDelegate, prefetchHandler: AddonModWorkshopPrefetchHandler,
|
prefetchDelegate: CoreCourseModulePrefetchDelegate, prefetchHandler: AddonModWorkshopPrefetchHandler,
|
||||||
cronDelegate: CoreCronDelegate, syncHandler: AddonModWorkshopSyncCronHandler,
|
cronDelegate: CoreCronDelegate, syncHandler: AddonModWorkshopSyncCronHandler,
|
||||||
updateManager: CoreUpdateManagerProvider) {
|
updateManager: CoreUpdateManagerProvider, listLinkHandler: AddonModWorkshopListLinkHandler) {
|
||||||
|
|
||||||
moduleDelegate.registerHandler(moduleHandler);
|
moduleDelegate.registerHandler(moduleHandler);
|
||||||
contentLinksDelegate.registerHandler(linkHandler);
|
contentLinksDelegate.registerHandler(linkHandler);
|
||||||
|
contentLinksDelegate.registerHandler(listLinkHandler);
|
||||||
prefetchDelegate.registerHandler(prefetchHandler);
|
prefetchDelegate.registerHandler(prefetchHandler);
|
||||||
cronDelegate.register(syncHandler);
|
cronDelegate.register(syncHandler);
|
||||||
|
|
||||||
|
|
|
@ -75,6 +75,7 @@ import { CoreSitePluginsModule } from '@core/siteplugins/siteplugins.module';
|
||||||
import { CoreCompileModule } from '@core/compile/compile.module';
|
import { CoreCompileModule } from '@core/compile/compile.module';
|
||||||
import { CoreQuestionModule } from '@core/question/question.module';
|
import { CoreQuestionModule } from '@core/question/question.module';
|
||||||
import { CoreCommentsModule } from '@core/comments/comments.module';
|
import { CoreCommentsModule } from '@core/comments/comments.module';
|
||||||
|
import { CoreBlockModule } from '@core/block/block.module';
|
||||||
|
|
||||||
// Addon modules.
|
// Addon modules.
|
||||||
import { AddonBadgesModule } from '@addon/badges/badges.module';
|
import { AddonBadgesModule } from '@addon/badges/badges.module';
|
||||||
|
@ -83,7 +84,9 @@ import { AddonCompetencyModule } from '@addon/competency/competency.module';
|
||||||
import { AddonCourseCompletionModule } from '@addon/coursecompletion/coursecompletion.module';
|
import { AddonCourseCompletionModule } from '@addon/coursecompletion/coursecompletion.module';
|
||||||
import { AddonUserProfileFieldModule } from '@addon/userprofilefield/userprofilefield.module';
|
import { AddonUserProfileFieldModule } from '@addon/userprofilefield/userprofilefield.module';
|
||||||
import { AddonFilesModule } from '@addon/files/files.module';
|
import { AddonFilesModule } from '@addon/files/files.module';
|
||||||
|
import { AddonBlockActivityModulesModule } from '@addon/block/activitymodules/activitymodules.module';
|
||||||
import { AddonBlockMyOverviewModule } from '@addon/block/myoverview/myoverview.module';
|
import { AddonBlockMyOverviewModule } from '@addon/block/myoverview/myoverview.module';
|
||||||
|
import { AddonBlockSiteMainMenuModule } from '@addon/block/sitemainmenu/sitemainmenu.module';
|
||||||
import { AddonBlockTimelineModule } from '@addon/block/timeline/timeline.module';
|
import { AddonBlockTimelineModule } from '@addon/block/timeline/timeline.module';
|
||||||
import { AddonModAssignModule } from '@addon/mod/assign/assign.module';
|
import { AddonModAssignModule } from '@addon/mod/assign/assign.module';
|
||||||
import { AddonModBookModule } from '@addon/mod/book/book.module';
|
import { AddonModBookModule } from '@addon/mod/book/book.module';
|
||||||
|
@ -188,13 +191,16 @@ export const CORE_PROVIDERS: any[] = [
|
||||||
CoreCompileModule,
|
CoreCompileModule,
|
||||||
CoreQuestionModule,
|
CoreQuestionModule,
|
||||||
CoreCommentsModule,
|
CoreCommentsModule,
|
||||||
|
CoreBlockModule,
|
||||||
AddonBadgesModule,
|
AddonBadgesModule,
|
||||||
AddonCalendarModule,
|
AddonCalendarModule,
|
||||||
AddonCompetencyModule,
|
AddonCompetencyModule,
|
||||||
AddonCourseCompletionModule,
|
AddonCourseCompletionModule,
|
||||||
AddonUserProfileFieldModule,
|
AddonUserProfileFieldModule,
|
||||||
AddonFilesModule,
|
AddonFilesModule,
|
||||||
|
AddonBlockActivityModulesModule,
|
||||||
AddonBlockMyOverviewModule,
|
AddonBlockMyOverviewModule,
|
||||||
|
AddonBlockSiteMainMenuModule,
|
||||||
AddonBlockTimelineModule,
|
AddonBlockTimelineModule,
|
||||||
AddonModAssignModule,
|
AddonModAssignModule,
|
||||||
AddonModBookModule,
|
AddonModBookModule,
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
"addon.badges.issuername": "Issuer name",
|
"addon.badges.issuername": "Issuer name",
|
||||||
"addon.badges.nobadges": "There are no badges available.",
|
"addon.badges.nobadges": "There are no badges available.",
|
||||||
"addon.badges.recipientdetails": "Recipient details",
|
"addon.badges.recipientdetails": "Recipient details",
|
||||||
|
"addon.block_activitymodules.pluginname": "Activities",
|
||||||
"addon.block_myoverview.all": "All",
|
"addon.block_myoverview.all": "All",
|
||||||
"addon.block_myoverview.future": "Future",
|
"addon.block_myoverview.future": "Future",
|
||||||
"addon.block_myoverview.inprogress": "In progress",
|
"addon.block_myoverview.inprogress": "In progress",
|
||||||
|
@ -20,6 +21,7 @@
|
||||||
"addon.block_myoverview.nocoursespast": "No past courses",
|
"addon.block_myoverview.nocoursespast": "No past courses",
|
||||||
"addon.block_myoverview.past": "Past",
|
"addon.block_myoverview.past": "Past",
|
||||||
"addon.block_myoverview.title": "Title",
|
"addon.block_myoverview.title": "Title",
|
||||||
|
"addon.block_sitemainmenu.pluginname": "Main menu",
|
||||||
"addon.block_timeline.duedate": "Due date",
|
"addon.block_timeline.duedate": "Due date",
|
||||||
"addon.block_timeline.next30days": "Next 30 days",
|
"addon.block_timeline.next30days": "Next 30 days",
|
||||||
"addon.block_timeline.next3months": "Next 3 months",
|
"addon.block_timeline.next3months": "Next 3 months",
|
||||||
|
@ -202,6 +204,7 @@
|
||||||
"addon.mod_assign.markingworkflowstatereadyforrelease": "Ready for release",
|
"addon.mod_assign.markingworkflowstatereadyforrelease": "Ready for release",
|
||||||
"addon.mod_assign.markingworkflowstatereadyforreview": "Marking completed",
|
"addon.mod_assign.markingworkflowstatereadyforreview": "Marking completed",
|
||||||
"addon.mod_assign.markingworkflowstatereleased": "Released",
|
"addon.mod_assign.markingworkflowstatereleased": "Released",
|
||||||
|
"addon.mod_assign.modulenameplural": "Assignments",
|
||||||
"addon.mod_assign.multipleteams": "Member of more than one group",
|
"addon.mod_assign.multipleteams": "Member of more than one group",
|
||||||
"addon.mod_assign.multipleteams_desc": "The assignment requires submission in groups. You are a member of more than one group. To be able to submit you must be a member of only one group. Please contact your teacher to change your group membership.",
|
"addon.mod_assign.multipleteams_desc": "The assignment requires submission in groups. You are a member of more than one group. To be able to submit you must be a member of only one group. Please contact your teacher to change your group membership.",
|
||||||
"addon.mod_assign.noattempt": "No attempt",
|
"addon.mod_assign.noattempt": "No attempt",
|
||||||
|
@ -256,6 +259,7 @@
|
||||||
"addon.mod_assign_submission_file.pluginname": "File submissions",
|
"addon.mod_assign_submission_file.pluginname": "File submissions",
|
||||||
"addon.mod_assign_submission_onlinetext.pluginname": "Online text submissions",
|
"addon.mod_assign_submission_onlinetext.pluginname": "Online text submissions",
|
||||||
"addon.mod_book.errorchapter": "Error reading chapter of book.",
|
"addon.mod_book.errorchapter": "Error reading chapter of book.",
|
||||||
|
"addon.mod_book.modulenameplural": "Books",
|
||||||
"addon.mod_chat.beep": "Beep",
|
"addon.mod_chat.beep": "Beep",
|
||||||
"addon.mod_chat.currentusers": "Current users",
|
"addon.mod_chat.currentusers": "Current users",
|
||||||
"addon.mod_chat.enterchat": "Click here to enter the chat now",
|
"addon.mod_chat.enterchat": "Click here to enter the chat now",
|
||||||
|
@ -268,6 +272,7 @@
|
||||||
"addon.mod_chat.messagebeepsyou": "{{$a}} has just beeped you!",
|
"addon.mod_chat.messagebeepsyou": "{{$a}} has just beeped you!",
|
||||||
"addon.mod_chat.messageenter": "{{$a}} has just entered this chat",
|
"addon.mod_chat.messageenter": "{{$a}} has just entered this chat",
|
||||||
"addon.mod_chat.messageexit": "{{$a}} has left this chat",
|
"addon.mod_chat.messageexit": "{{$a}} has left this chat",
|
||||||
|
"addon.mod_chat.modulenameplural": "Chats",
|
||||||
"addon.mod_chat.mustbeonlinetosendmessages": "You must be online to send messages.",
|
"addon.mod_chat.mustbeonlinetosendmessages": "You must be online to send messages.",
|
||||||
"addon.mod_chat.nomessages": "No messages yet",
|
"addon.mod_chat.nomessages": "No messages yet",
|
||||||
"addon.mod_chat.send": "Send",
|
"addon.mod_chat.send": "Send",
|
||||||
|
@ -278,6 +283,7 @@
|
||||||
"addon.mod_choice.errorgetchoice": "Error getting choice data.",
|
"addon.mod_choice.errorgetchoice": "Error getting choice data.",
|
||||||
"addon.mod_choice.expired": "Sorry, this activity closed on {{$a}} and is no longer available",
|
"addon.mod_choice.expired": "Sorry, this activity closed on {{$a}} and is no longer available",
|
||||||
"addon.mod_choice.full": "(Full)",
|
"addon.mod_choice.full": "(Full)",
|
||||||
|
"addon.mod_choice.modulenameplural": "Choices",
|
||||||
"addon.mod_choice.noresultsviewable": "The results are not currently viewable.",
|
"addon.mod_choice.noresultsviewable": "The results are not currently viewable.",
|
||||||
"addon.mod_choice.notopenyet": "Sorry, this activity is not available until {{$a}}",
|
"addon.mod_choice.notopenyet": "Sorry, this activity is not available until {{$a}}",
|
||||||
"addon.mod_choice.numberofuser": "Number of responses",
|
"addon.mod_choice.numberofuser": "Number of responses",
|
||||||
|
@ -317,6 +323,7 @@
|
||||||
"addon.mod_data.fields": "Fields",
|
"addon.mod_data.fields": "Fields",
|
||||||
"addon.mod_data.latlongboth": "Both latitude and longitude are required.",
|
"addon.mod_data.latlongboth": "Both latitude and longitude are required.",
|
||||||
"addon.mod_data.menuchoose": "Choose...",
|
"addon.mod_data.menuchoose": "Choose...",
|
||||||
|
"addon.mod_data.modulenameplural": "Databases",
|
||||||
"addon.mod_data.more": "More",
|
"addon.mod_data.more": "More",
|
||||||
"addon.mod_data.nomatch": "No matching entries found!",
|
"addon.mod_data.nomatch": "No matching entries found!",
|
||||||
"addon.mod_data.norecords": "No entries in database",
|
"addon.mod_data.norecords": "No entries in database",
|
||||||
|
@ -348,6 +355,7 @@
|
||||||
"addon.mod_feedback.feedbackopen": "Allow answers from",
|
"addon.mod_feedback.feedbackopen": "Allow answers from",
|
||||||
"addon.mod_feedback.mapcourses": "Map feedback to courses",
|
"addon.mod_feedback.mapcourses": "Map feedback to courses",
|
||||||
"addon.mod_feedback.mode": "Mode",
|
"addon.mod_feedback.mode": "Mode",
|
||||||
|
"addon.mod_feedback.modulenameplural": "Feedback",
|
||||||
"addon.mod_feedback.next_page": "Next page",
|
"addon.mod_feedback.next_page": "Next page",
|
||||||
"addon.mod_feedback.non_anonymous": "User's name will be logged and shown with answers",
|
"addon.mod_feedback.non_anonymous": "User's name will be logged and shown with answers",
|
||||||
"addon.mod_feedback.non_anonymous_entries": "Non anonymous entries ({{$a}})",
|
"addon.mod_feedback.non_anonymous_entries": "Non anonymous entries ({{$a}})",
|
||||||
|
@ -368,6 +376,7 @@
|
||||||
"addon.mod_feedback.started": "Started",
|
"addon.mod_feedback.started": "Started",
|
||||||
"addon.mod_feedback.this_feedback_is_already_submitted": "You've already completed this activity.",
|
"addon.mod_feedback.this_feedback_is_already_submitted": "You've already completed this activity.",
|
||||||
"addon.mod_folder.emptyfilelist": "There are no files to show.",
|
"addon.mod_folder.emptyfilelist": "There are no files to show.",
|
||||||
|
"addon.mod_folder.modulenameplural": "Folders",
|
||||||
"addon.mod_forum.addanewdiscussion": "Add a new discussion topic",
|
"addon.mod_forum.addanewdiscussion": "Add a new discussion topic",
|
||||||
"addon.mod_forum.addanewquestion": "Add a new question",
|
"addon.mod_forum.addanewquestion": "Add a new question",
|
||||||
"addon.mod_forum.addanewtopic": "Add a new topic",
|
"addon.mod_forum.addanewtopic": "Add a new topic",
|
||||||
|
@ -390,6 +399,7 @@
|
||||||
"addon.mod_forum.modeflatnewestfirst": "Display replies flat, with newest first",
|
"addon.mod_forum.modeflatnewestfirst": "Display replies flat, with newest first",
|
||||||
"addon.mod_forum.modeflatoldestfirst": "Display replies flat, with oldest first",
|
"addon.mod_forum.modeflatoldestfirst": "Display replies flat, with oldest first",
|
||||||
"addon.mod_forum.modenested": "Display replies in nested form",
|
"addon.mod_forum.modenested": "Display replies in nested form",
|
||||||
|
"addon.mod_forum.modulenameplural": "Forums",
|
||||||
"addon.mod_forum.numdiscussions": "{{numdiscussions}} discussions",
|
"addon.mod_forum.numdiscussions": "{{numdiscussions}} discussions",
|
||||||
"addon.mod_forum.numreplies": "{{numreplies}} replies",
|
"addon.mod_forum.numreplies": "{{numreplies}} replies",
|
||||||
"addon.mod_forum.posttoforum": "Post to forum",
|
"addon.mod_forum.posttoforum": "Post to forum",
|
||||||
|
@ -425,9 +435,11 @@
|
||||||
"addon.mod_glossary.fillfields": "Concept and definition are mandatory fields.",
|
"addon.mod_glossary.fillfields": "Concept and definition are mandatory fields.",
|
||||||
"addon.mod_glossary.fullmatch": "Match whole words only",
|
"addon.mod_glossary.fullmatch": "Match whole words only",
|
||||||
"addon.mod_glossary.linking": "Auto-linking",
|
"addon.mod_glossary.linking": "Auto-linking",
|
||||||
|
"addon.mod_glossary.modulenameplural": "Glossaries",
|
||||||
"addon.mod_glossary.noentriesfound": "No entries were found.",
|
"addon.mod_glossary.noentriesfound": "No entries were found.",
|
||||||
"addon.mod_glossary.searchquery": "Search query",
|
"addon.mod_glossary.searchquery": "Search query",
|
||||||
"addon.mod_imscp.deploymenterror": "Content package error!",
|
"addon.mod_imscp.deploymenterror": "Content package error!",
|
||||||
|
"addon.mod_imscp.modulenameplural": "IMS content packages",
|
||||||
"addon.mod_imscp.showmoduledescription": "Show description",
|
"addon.mod_imscp.showmoduledescription": "Show description",
|
||||||
"addon.mod_lesson.answer": "Answer",
|
"addon.mod_lesson.answer": "Answer",
|
||||||
"addon.mod_lesson.attempt": "Attempt: {{$a}}",
|
"addon.mod_lesson.attempt": "Attempt: {{$a}}",
|
||||||
|
@ -471,6 +483,7 @@
|
||||||
"addon.mod_lesson.lowtime": "Low time",
|
"addon.mod_lesson.lowtime": "Low time",
|
||||||
"addon.mod_lesson.maximumnumberofattemptsreached": "Maximum number of attempts reached - Moving to next page",
|
"addon.mod_lesson.maximumnumberofattemptsreached": "Maximum number of attempts reached - Moving to next page",
|
||||||
"addon.mod_lesson.modattemptsnoteacher": "Student review only works for students.",
|
"addon.mod_lesson.modattemptsnoteacher": "Student review only works for students.",
|
||||||
|
"addon.mod_lesson.modulenameplural": "Lessons",
|
||||||
"addon.mod_lesson.noanswer": "One or more questions have no answer given. Please go back and submit an answer.",
|
"addon.mod_lesson.noanswer": "One or more questions have no answer given. Please go back and submit an answer.",
|
||||||
"addon.mod_lesson.nolessonattempts": "No attempts have been made on this lesson.",
|
"addon.mod_lesson.nolessonattempts": "No attempts have been made on this lesson.",
|
||||||
"addon.mod_lesson.nolessonattemptsgroup": "No attempts have been made by {{$a}} group members on this lesson.",
|
"addon.mod_lesson.nolessonattemptsgroup": "No attempts have been made by {{$a}} group members on this lesson.",
|
||||||
|
@ -515,7 +528,9 @@
|
||||||
"addon.mod_lti.errorgetlti": "Error getting module data.",
|
"addon.mod_lti.errorgetlti": "Error getting module data.",
|
||||||
"addon.mod_lti.errorinvalidlaunchurl": "The launch URL is not valid.",
|
"addon.mod_lti.errorinvalidlaunchurl": "The launch URL is not valid.",
|
||||||
"addon.mod_lti.launchactivity": "Launch the activity",
|
"addon.mod_lti.launchactivity": "Launch the activity",
|
||||||
|
"addon.mod_lti.modulenameplural": "External tools",
|
||||||
"addon.mod_page.errorwhileloadingthepage": "Error while loading the page content.",
|
"addon.mod_page.errorwhileloadingthepage": "Error while loading the page content.",
|
||||||
|
"addon.mod_page.modulenameplural": "Pages",
|
||||||
"addon.mod_quiz.attemptfirst": "First attempt",
|
"addon.mod_quiz.attemptfirst": "First attempt",
|
||||||
"addon.mod_quiz.attemptlast": "Last attempt",
|
"addon.mod_quiz.attemptlast": "Last attempt",
|
||||||
"addon.mod_quiz.attemptnumber": "Attempt",
|
"addon.mod_quiz.attemptnumber": "Attempt",
|
||||||
|
@ -550,6 +565,7 @@
|
||||||
"addon.mod_quiz.grademethod": "Grading method",
|
"addon.mod_quiz.grademethod": "Grading method",
|
||||||
"addon.mod_quiz.gradesofar": "{{$a.method}}: {{$a.mygrade}} / {{$a.quizgrade}}.",
|
"addon.mod_quiz.gradesofar": "{{$a.method}}: {{$a.mygrade}} / {{$a.quizgrade}}.",
|
||||||
"addon.mod_quiz.marks": "Marks",
|
"addon.mod_quiz.marks": "Marks",
|
||||||
|
"addon.mod_quiz.modulenameplural": "Quizzes",
|
||||||
"addon.mod_quiz.mustbesubmittedby": "This attempt must be submitted by {{$a}}.",
|
"addon.mod_quiz.mustbesubmittedby": "This attempt must be submitted by {{$a}}.",
|
||||||
"addon.mod_quiz.noquestions": "No questions have been added yet",
|
"addon.mod_quiz.noquestions": "No questions have been added yet",
|
||||||
"addon.mod_quiz.noreviewattempt": "You are not allowed to review this attempt.",
|
"addon.mod_quiz.noreviewattempt": "You are not allowed to review this attempt.",
|
||||||
|
@ -594,6 +610,7 @@
|
||||||
"addon.mod_quiz.yourfinalgradeis": "Your final grade for this quiz is {{$a}}.",
|
"addon.mod_quiz.yourfinalgradeis": "Your final grade for this quiz is {{$a}}.",
|
||||||
"addon.mod_resource.errorwhileloadingthecontent": "Error while loading the content.",
|
"addon.mod_resource.errorwhileloadingthecontent": "Error while loading the content.",
|
||||||
"addon.mod_resource.modifieddate": "Modified {{$a}}",
|
"addon.mod_resource.modifieddate": "Modified {{$a}}",
|
||||||
|
"addon.mod_resource.modulenameplural": "Files",
|
||||||
"addon.mod_resource.openthefile": "Open the file",
|
"addon.mod_resource.openthefile": "Open the file",
|
||||||
"addon.mod_resource.uploadeddate": "Uploaded {{$a}}",
|
"addon.mod_resource.uploadeddate": "Uploaded {{$a}}",
|
||||||
"addon.mod_scorm.asset": "Asset",
|
"addon.mod_scorm.asset": "Asset",
|
||||||
|
@ -630,6 +647,7 @@
|
||||||
"addon.mod_scorm.incomplete": "Incomplete",
|
"addon.mod_scorm.incomplete": "Incomplete",
|
||||||
"addon.mod_scorm.lastattempt": "Last completed attempt",
|
"addon.mod_scorm.lastattempt": "Last completed attempt",
|
||||||
"addon.mod_scorm.mode": "Mode",
|
"addon.mod_scorm.mode": "Mode",
|
||||||
|
"addon.mod_scorm.modulenameplural": "SCORM packages",
|
||||||
"addon.mod_scorm.newattempt": "Start a new attempt",
|
"addon.mod_scorm.newattempt": "Start a new attempt",
|
||||||
"addon.mod_scorm.noattemptsallowed": "Number of attempts allowed",
|
"addon.mod_scorm.noattemptsallowed": "Number of attempts allowed",
|
||||||
"addon.mod_scorm.noattemptsmade": "Number of attempts you have made",
|
"addon.mod_scorm.noattemptsmade": "Number of attempts you have made",
|
||||||
|
@ -649,10 +667,12 @@
|
||||||
"addon.mod_survey.errorgetsurvey": "Error getting survey data.",
|
"addon.mod_survey.errorgetsurvey": "Error getting survey data.",
|
||||||
"addon.mod_survey.ifoundthat": "I found that",
|
"addon.mod_survey.ifoundthat": "I found that",
|
||||||
"addon.mod_survey.ipreferthat": "I prefer that",
|
"addon.mod_survey.ipreferthat": "I prefer that",
|
||||||
|
"addon.mod_survey.modulenameplural": "Surveys",
|
||||||
"addon.mod_survey.responses": "Responses",
|
"addon.mod_survey.responses": "Responses",
|
||||||
"addon.mod_survey.results": "Results",
|
"addon.mod_survey.results": "Results",
|
||||||
"addon.mod_survey.surveycompletednograph": "You have completed this survey.",
|
"addon.mod_survey.surveycompletednograph": "You have completed this survey.",
|
||||||
"addon.mod_url.accessurl": "Access the URL",
|
"addon.mod_url.accessurl": "Access the URL",
|
||||||
|
"addon.mod_url.modulenameplural": "URLs",
|
||||||
"addon.mod_url.pointingtourl": "URL that the resource points to.",
|
"addon.mod_url.pointingtourl": "URL that the resource points to.",
|
||||||
"addon.mod_wiki.cannoteditpage": "You can not edit this page.",
|
"addon.mod_wiki.cannoteditpage": "You can not edit this page.",
|
||||||
"addon.mod_wiki.createpage": "Create page",
|
"addon.mod_wiki.createpage": "Create page",
|
||||||
|
@ -661,6 +681,7 @@
|
||||||
"addon.mod_wiki.errornowikiavailable": "This wiki does not have any content yet.",
|
"addon.mod_wiki.errornowikiavailable": "This wiki does not have any content yet.",
|
||||||
"addon.mod_wiki.gowikihome": "Go to the wiki first page",
|
"addon.mod_wiki.gowikihome": "Go to the wiki first page",
|
||||||
"addon.mod_wiki.map": "Map",
|
"addon.mod_wiki.map": "Map",
|
||||||
|
"addon.mod_wiki.modulenameplural": "Wikis",
|
||||||
"addon.mod_wiki.newpagehdr": "New page",
|
"addon.mod_wiki.newpagehdr": "New page",
|
||||||
"addon.mod_wiki.newpagetitle": "New page title",
|
"addon.mod_wiki.newpagetitle": "New page title",
|
||||||
"addon.mod_wiki.nocontent": "There is no content for this page",
|
"addon.mod_wiki.nocontent": "There is no content for this page",
|
||||||
|
@ -699,6 +720,7 @@
|
||||||
"addon.mod_workshop.gradinggradecalculated": "Calculated grade for assessment",
|
"addon.mod_workshop.gradinggradecalculated": "Calculated grade for assessment",
|
||||||
"addon.mod_workshop.gradinggradeof": "Grade for assessment (of {{$a}})",
|
"addon.mod_workshop.gradinggradeof": "Grade for assessment (of {{$a}})",
|
||||||
"addon.mod_workshop.gradinggradeover": "Override grade for assessment",
|
"addon.mod_workshop.gradinggradeover": "Override grade for assessment",
|
||||||
|
"addon.mod_workshop.modulenameplural": "Workshops",
|
||||||
"addon.mod_workshop.nogradeyet": "No grade yet",
|
"addon.mod_workshop.nogradeyet": "No grade yet",
|
||||||
"addon.mod_workshop.notassessed": "Not assessed yet",
|
"addon.mod_workshop.notassessed": "Not assessed yet",
|
||||||
"addon.mod_workshop.notoverridden": "Not overridden",
|
"addon.mod_workshop.notoverridden": "Not overridden",
|
||||||
|
@ -1467,6 +1489,7 @@
|
||||||
"core.refresh": "Refresh",
|
"core.refresh": "Refresh",
|
||||||
"core.required": "Required",
|
"core.required": "Required",
|
||||||
"core.requireduserdatamissing": "This user lacks some required profile data. Please enter the data in your site and try again.<br>{{$a}}",
|
"core.requireduserdatamissing": "This user lacks some required profile data. Please enter the data in your site and try again.<br>{{$a}}",
|
||||||
|
"core.resources": "Resources",
|
||||||
"core.restore": "Restore",
|
"core.restore": "Restore",
|
||||||
"core.retry": "Retry",
|
"core.retry": "Retry",
|
||||||
"core.save": "Save",
|
"core.save": "Save",
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue