MOBILE-4569 grades: Remove actions menu
Right now, this menu is only used to link to the "Grade Analysis" because this link was removed from the LMS after some recent changes. But the mobile app never had this link, so we can safely remove the menu for now.
This commit is contained in:
		
							parent
							
								
									92ceb61740
								
							
						
					
					
						commit
						312fb13b3a
					
				@ -118,6 +118,12 @@ export class CoreGradesHelperProvider {
 | 
				
			|||||||
                row.gradeClass = column.class.includes('gradepass') ? 'text-success' :
 | 
					                row.gradeClass = column.class.includes('gradepass') ? 'text-success' :
 | 
				
			||||||
                    (column.class.includes('gradefail') ? 'text-danger' : '');
 | 
					                    (column.class.includes('gradefail') ? 'text-danger' : '');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                if (content.includes('action-menu')) {
 | 
				
			||||||
 | 
					                    content = CoreTextUtils.processHTML(content, (element) => {
 | 
				
			||||||
 | 
					                        element.querySelector('.action-menu')?.parentElement?.remove();
 | 
				
			||||||
 | 
					                    });
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                if (content.includes('fa-check')) {
 | 
					                if (content.includes('fa-check')) {
 | 
				
			||||||
                    row.gradeIcon = 'fas-check';
 | 
					                    row.gradeIcon = 'fas-check';
 | 
				
			||||||
                    row.gradeIconAlt = Translate.instant('core.grades.pass');
 | 
					                    row.gradeIconAlt = Translate.instant('core.grades.pass');
 | 
				
			||||||
 | 
				
			|||||||
@ -273,6 +273,21 @@ export class CoreTextUtilsProvider {
 | 
				
			|||||||
        return Translate.instant('core.humanreadablesize', { size: bytes, unit: units[keys[pos]] });
 | 
					        return Translate.instant('core.humanreadablesize', { size: bytes, unit: units[keys[pos]] });
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Process HTML string.
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * @param text HTML string.
 | 
				
			||||||
 | 
					     * @param process Method to process the HTML.
 | 
				
			||||||
 | 
					     * @returns Processed HTML string.
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    processHTML(text: string, process: (element: HTMLElement) => unknown): string {
 | 
				
			||||||
 | 
					        const element = this.convertToElement(text);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        process(element);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        return element.innerHTML;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * Clean HTML tags.
 | 
					     * Clean HTML tags.
 | 
				
			||||||
     *
 | 
					     *
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user