MOBILE-3583 quiz: Fix matching questions in 3.10
This commit is contained in:
		
							parent
							
								
									b66935cb49
								
							
						
					
					
						commit
						5a95304505
					
				| @ -34,8 +34,6 @@ import { CoreConfigConstants } from '../../../configconstants'; | |||||||
| import { ILocalNotification } from '@ionic-native/local-notifications'; | import { ILocalNotification } from '@ionic-native/local-notifications'; | ||||||
| import { SQLiteDB } from '@classes/sqlitedb'; | import { SQLiteDB } from '@classes/sqlitedb'; | ||||||
| import { CoreSite } from '@classes/site'; | 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. |  * Data needed to register a device in a Moodle site. | ||||||
| @ -196,8 +194,6 @@ export class CorePushNotificationsProvider { | |||||||
|             platform: Platform, |             platform: Platform, | ||||||
|             appProvider: CoreAppProvider, |             appProvider: CoreAppProvider, | ||||||
|             private sitesFactory: CoreSitesFactoryProvider, |             private sitesFactory: CoreSitesFactoryProvider, | ||||||
|             private filterProvider: CoreFilterProvider, |  | ||||||
|             private filterDelegate: CoreFilterDelegate |  | ||||||
|             ) { |             ) { | ||||||
|         this.logger = logger.getInstance('CorePushNotificationsProvider'); |         this.logger = logger.getInstance('CorePushNotificationsProvider'); | ||||||
|         this.appDB = appProvider.getDB(); |         this.appDB = appProvider.getDB(); | ||||||
|  | |||||||
| @ -473,8 +473,14 @@ export class CoreQuestionBaseComponent { | |||||||
| 
 | 
 | ||||||
|                 this.question.disabled = this.question.disabled && element.disabled; |                 this.question.disabled = this.question.disabled && element.disabled; | ||||||
| 
 | 
 | ||||||
|                 // Get the label with the question text.
 |                 // Get the label with the question text. Try the new format first.
 | ||||||
|                 const label = questionEl.querySelector('label[for="' + option.id + '"]'); |                 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) { |                 if (label) { | ||||||
|                     option.text = label.innerHTML; |                     option.text = label.innerHTML; | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user