Skip to content

Instantly share code, notes, and snippets.

:root {
--primary: red;
--core-header-toolbar-background: green;
}
.core-siteurl {
text-decoration: underline;
}
// Form variables.
descriptionControl: FormControl<string>;
form!: FormGroup<{
name: FormControl<string>;
timestart: FormControl<string>;
eventtype: FormControl<AddonCalendarEventType | null>;
categoryid: FormControl<number | null>;
courseid: FormControl<number>;
groupcourseid: FormControl<number | null>;
groupid: FormControl<number | null>;
this.saveData = (params) => {
this.CoreDomUtilsProvider.showModalLoading().then((modal) => {
params.vote = prep_data();
this.CoreSitePluginsProviders.callWS('mod_vote_vote', params, {getFromCache: 0, saveToCache: 0}).then((result) => {
check_response(result);
}).catch((error) => {
this.CoreDomUtilsProvider.showErrorModalDefault(error, 'core.serverconnection', true);
}).finally(() => {
modal.dismiss();
.remotetheme-bgimg {
background-image:url('https://www.google.es/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png');
}
function throttle(func, duration) {
let shouldWait = false
let hasIgnoredCalls = false;
return function (...args) {
if (!shouldWait) {
func.apply(this, args)
shouldWait = true
setTimeout(function () {
shouldWait = false
/* Styles for Ionic 5. */
body.ionic5 ion-toolbar {
--background: #004C9C;
}
/* Behind the tabs */
body.ionic5 ion-tab-bar {
--background: #fff;
--color: #004C9C;
var that = this;
this.myForm = this.FormBuilder.group({
username: ["", this.Validators.required],
password: ["", this.Validators.required],
bio: ["", this.Validators.required],
});
this.create = function() {
console.log("VALUES", that.myForm.valid, that.myForm.value);
var that = this;
// Create a class that "inherits" from CoreCourseActivityPrefetchHandlerBase.
function AddonModCertificateModulePrefetchHandler() {
that.CoreCourseActivityPrefetchHandlerBase.call(this, that.TranslateService, that.CoreAppProvider, that.CoreUtilsProvider,
that.CoreCourseProvider, that.CoreFilepoolProvider, that.CoreSitesProvider, that.CoreDomUtilsProvider);
this.name = "AddonModCertificateModulePrefetchHandler";
this.modName = "certificate";
this.component = "AddonModCertificate";