forked from CIT/Vmeda.Online
		
	MOBILE-3320 assign: Fix leave confirm displayed when shouldn't
This commit is contained in:
		
							parent
							
								
									f1d6014304
								
							
						
					
					
						commit
						331fd9fef9
					
				@ -93,7 +93,7 @@ export class AddonModAssignFeedbackCommentsComponent extends AddonModAssignFeedb
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            // Update the text and save it as draft.
 | 
					            // Update the text and save it as draft.
 | 
				
			||||||
            this.isSent = false;
 | 
					            this.isSent = false;
 | 
				
			||||||
            this.text = this.replacePluginfileUrls(text);
 | 
					            this.text = this.replacePluginfileUrls(text || '');
 | 
				
			||||||
            AddonModAssignFeedbackDelegate.saveFeedbackDraft(this.assign.id, this.userId, this.plugin, {
 | 
					            AddonModAssignFeedbackDelegate.saveFeedbackDraft(this.assign.id, this.userId, this.plugin, {
 | 
				
			||||||
                text: text,
 | 
					                text: text,
 | 
				
			||||||
                format: 1,
 | 
					                format: 1,
 | 
				
			||||||
 | 
				
			|||||||
@ -49,13 +49,14 @@ export class AddonModAssignFeedbackCommentsHandlerService implements AddonModAss
 | 
				
			|||||||
     * @param inputData Data entered in the feedback edit form.
 | 
					     * @param inputData Data entered in the feedback edit form.
 | 
				
			||||||
     * @return Text to submit.
 | 
					     * @return Text to submit.
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    getTextFromInputData(plugin: AddonModAssignPlugin, inputData: AddonModAssignFeedbackCommentsTextData): string {
 | 
					    getTextFromInputData(plugin: AddonModAssignPlugin, inputData: AddonModAssignFeedbackCommentsTextData): string | undefined {
 | 
				
			||||||
 | 
					        if (inputData.assignfeedbackcomments_editor === undefined) {
 | 
				
			||||||
 | 
					            return undefined;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        const files = plugin.fileareas && plugin.fileareas[0] ? plugin.fileareas[0].files : [];
 | 
					        const files = plugin.fileareas && plugin.fileareas[0] ? plugin.fileareas[0].files : [];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // The input data can have a string or an object with text and format. Get the text.
 | 
					        return CoreTextUtils.restorePluginfileUrls(inputData.assignfeedbackcomments_editor, files || []);
 | 
				
			||||||
        const text = inputData.assignfeedbackcomments_editor || '';
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        return CoreTextUtils.restorePluginfileUrls(text, files || []);
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user