Merge pull request #2590 from dpalou/MOBILE-3583
MOBILE-3583 quiz: Fix matching questions in 3.10main
commit
f780b3afc3
|
@ -34,8 +34,6 @@ import { CoreConfigConstants } from '../../../configconstants';
|
|||
import { ILocalNotification } from '@ionic-native/local-notifications';
|
||||
import { SQLiteDB } from '@classes/sqlitedb';
|
||||
import { CoreSite } from '@classes/site';
|
||||
import { CoreFilterProvider } from '@core/filter/providers/filter';
|
||||
import { CoreFilterDelegate } from '@core/filter/providers/delegate';
|
||||
|
||||
/**
|
||||
* Data needed to register a device in a Moodle site.
|
||||
|
@ -196,8 +194,6 @@ export class CorePushNotificationsProvider {
|
|||
platform: Platform,
|
||||
appProvider: CoreAppProvider,
|
||||
private sitesFactory: CoreSitesFactoryProvider,
|
||||
private filterProvider: CoreFilterProvider,
|
||||
private filterDelegate: CoreFilterDelegate
|
||||
) {
|
||||
this.logger = logger.getInstance('CorePushNotificationsProvider');
|
||||
this.appDB = appProvider.getDB();
|
||||
|
|
|
@ -473,8 +473,14 @@ export class CoreQuestionBaseComponent {
|
|||
|
||||
this.question.disabled = this.question.disabled && element.disabled;
|
||||
|
||||
// Get the label with the question text.
|
||||
const label = questionEl.querySelector('label[for="' + option.id + '"]');
|
||||
// Get the label with the question text. Try the new format first.
|
||||
const labelId = element.getAttribute('aria-labelledby');
|
||||
let label = labelId ? questionEl.querySelector('#' + labelId.replace(/:/g, '\\:')) : undefined;
|
||||
if (!label) {
|
||||
// Not found, use the old format.
|
||||
label = questionEl.querySelector('label[for="' + option.id + '"]');
|
||||
}
|
||||
|
||||
if (label) {
|
||||
option.text = label.innerHTML;
|
||||
|
||||
|
|
Loading…
Reference in New Issue