From 36c76f27aa670a174a8c69423d069051dde97cdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Tue, 28 Feb 2017 12:35:58 +0100 Subject: [PATCH] MOBILE-1987 assign: Recover draft from offline on feedback comments --- www/addons/mod/assign/feedback/comments/directive.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/www/addons/mod/assign/feedback/comments/directive.js b/www/addons/mod/assign/feedback/comments/directive.js index 36dd3a3fa5b..34f292bdc5f 100644 --- a/www/addons/mod/assign/feedback/comments/directive.js +++ b/www/addons/mod/assign/feedback/comments/directive.js @@ -36,6 +36,9 @@ angular.module('mm.addons.mod_assign') }).then(function(offlineData) { if (offlineData && offlineData.plugindata && offlineData.plugindata.assignfeedbackcomments_editor) { scope.isSent = false; + // Save offline as draft. + $mmaModAssignFeedbackCommentsHandler.saveDraft(scope.assign.id, scope.userid, + offlineData.plugindata.assignfeedbackcomments_editor); return offlineData.plugindata.assignfeedbackcomments_editor.text; }