diff --git a/src/components/context-menu/context-menu-item.ts b/src/components/context-menu/context-menu-item.ts
index 61ab66d29..7527c3953 100644
--- a/src/components/context-menu/context-menu-item.ts
+++ b/src/components/context-menu/context-menu-item.ts
@@ -38,7 +38,7 @@ export class CoreContextMenuItemComponent implements OnInit, OnDestroy, OnChange
@Input() iconDescription?: string; // Name of the icon to be shown on the left side of the item.
@Input() iconAction?: string; // Name of the icon to be shown on the right side of the item. It represents the action to do on
// click. If is "spinner" an spinner will be shown. If no icon or spinner is selected, no action
- // or link will work. If href but no iconAction is provided ion-arrow-right-c will be used.
+ // or link will work. If href but no iconAction is provided arrow-right will be used.
@Input() ariaDescription?: string; // Aria label to add to iconDescription.
@Input() ariaAction?: string; // Aria label to add to iconAction. If not set, it will be equal to content.
@Input() href?: string; // Link to go if no action provided.
diff --git a/src/components/context-menu/context-menu-popover.ts b/src/components/context-menu/context-menu-popover.ts
index fa144228e..19ad6f0d2 100644
--- a/src/components/context-menu/context-menu-popover.ts
+++ b/src/components/context-menu/context-menu-popover.ts
@@ -15,6 +15,7 @@
import { Component } from '@angular/core';
import { NavParams, ViewController } from 'ionic-angular';
import { CoreContextMenuItemComponent } from './context-menu-item';
+import { CoreLoggerProvider } from '../../providers/logger';
/**
* Component to display a list of items received by param in a popover.
@@ -26,10 +27,12 @@ import { CoreContextMenuItemComponent } from './context-menu-item';
export class CoreContextMenuPopoverComponent {
title: string;
items: CoreContextMenuItemComponent[];
+ protected logger: any;
- constructor(navParams: NavParams, private viewCtrl: ViewController) {
+ constructor(navParams: NavParams, private viewCtrl: ViewController, logger: CoreLoggerProvider) {
this.title = navParams.get('title');
this.items = navParams.get('items') || [];
+ this.logger = logger.getInstance('CoreContextMenuPopoverComponent');
}
/**
@@ -51,7 +54,10 @@ export class CoreContextMenuPopoverComponent {
event.preventDefault();
event.stopPropagation();
- if (!item.iconAction || item.iconAction == 'spinner') {
+ if (!item.iconAction) {
+ this.logger.warn('Items with action must have an icon action to work', item);
+ return false;
+ } else if (item.iconAction == 'spinner') {
return false;
}
diff --git a/src/core/course/components/format/format.html b/src/core/course/components/format/format.html
index f95f21e6f..cd368e00f 100644
--- a/src/core/course/components/format/format.html
+++ b/src/core/course/components/format/format.html
@@ -10,18 +10,14 @@
-
-
-
-
- {{section.formattedName || section.name}}
-
-
-
-
-
-
-
+