Skip to content

Commit 9a5ab42

Browse files
committed
Merge pull request #450 from dpalou/MOBILE-1527
Mobile 1527
2 parents d60a3c1 + 4b2749e commit 9a5ab42

File tree

7 files changed

+12
-7
lines changed

7 files changed

+12
-7
lines changed

www/addons/coursecompletion/services/handlers.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,8 @@ angular.module('mm.addons.coursecompletion')
232232
});
233233
$mmEvents.on(mmCoursesEventMyCoursesRefreshed, $mmaCourseCompletionHandlers.clearCoursesNavCache);
234234
$mmEvents.on(mmUserEventProfileRefreshed, function(data) {
235-
$mmaCourseCompletionHandlers.clearViewCompletionCache(data.courseid, data.userid);
235+
if (data) {
236+
$mmaCourseCompletionHandlers.clearViewCompletionCache(data.courseid, data.userid);
237+
}
236238
});
237239
});

www/addons/grades/services/handlers.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,8 @@ angular.module('mm.addons.grades')
281281
.run(function($mmaGradesHandlers, $mmEvents, mmCoreEventLogout, mmUserEventProfileRefreshed) {
282282
$mmEvents.on(mmCoreEventLogout, $mmaGradesHandlers.clearViewGradesCache);
283283
$mmEvents.on(mmUserEventProfileRefreshed, function(data) {
284-
$mmaGradesHandlers.clearViewGradesCache(data.courseid, data.userid);
284+
if (data) {
285+
$mmaGradesHandlers.clearViewGradesCache(data.courseid, data.userid);
286+
}
285287
});
286288
});

www/addons/messages/controllers/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ angular.module('mm.addons.messages')
3636
}).then(function(user) {
3737
// Verify that no other user was loaded while the async call was in progress.
3838
if ($scope.userId == userId) {
39-
$scope.profileLink = user.profileimageurl;
39+
// Use a default icon if no image URL available.
40+
$scope.profileLink = user.profileimageurl || true;
4041
}
4142
});
4243
}

www/addons/messages/templates/discussion.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
<ion-nav-buttons side="secondary">
55
<a ng-if="profileLink" mm-user-link userid="{{userId}}" aria-label="{{ 'mm.user.viewprofile' | translate }}">
6-
<img ng-if="profileLink && profileLink !== true" class="button mm-bar-button-image" ng-src="{{profileLink}}">
6+
<img ng-if="profileLink && profileLink !== true" class="button mm-bar-button-image" ng-src="{{profileLink}}" mm-external-content>
77
<span ng-if="profileLink === true" class="button button-icon icon ion-person"></span>
88
</a>
99
</ion-nav-buttons>

www/addons/messages/templates/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<ion-view view-title="{{ 'mma.messages.messages' | translate }}">
22
<ion-nav-buttons side="secondary">
33
<a ng-if="profileLink" mm-user-link userid="{{userId}}" aria-label="{{ 'mm.user.viewprofile' | translate }}">
4-
<img ng-if="profileLink && profileLink !== true" class="button mm-bar-button-image" ng-src="{{profileLink}}">
4+
<img ng-if="profileLink && profileLink !== true" class="button mm-bar-button-image" ng-src="{{profileLink}}" mm-external-content>
55
<span ng-if="profileLink === true" class="button button-icon icon ion-person"></span>
66
</a>
77
</ion-nav-buttons>

www/addons/mod_chat/templates/chat.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@
3131
<img ng-if="message.userprofileimageurl" ng-src="{{message.userprofileimageurl}}" mm-external-content alt="{{ 'mm.core.pictureof' | translate:{$a: message.userfullname} }}" role="presentation">
3232
<img ng-if="!message.userprofileimageurl" src="img/user-avatar.png" alt="{{ 'mm.core.pictureof' | translate:{$a: message.userfullname} }}" role="presentation">
3333
<h2>{{ message.userfullname }}</h2>
34+
<span class="item-note">{{ message.timestamp * 1000 | mmFormatDate:"dftimedate" }}</span>
3435

3536
<mm-format-text after-render="scrollAfterRender" watch="true">{{ message.message }}</mm-format-text>
3637

37-
<span class="item-note">{{ message.timestamp * 1000 | mmFormatDate:"dftimedate" }}</span>
3838
</article>
3939
</div>
4040
</div>

www/addons/mod_wiki/lang/en.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"errorloadingpage": "An error occured while loading page.",
3-
"errornowikiavailable": "There's no wiki available to be shown.",
3+
"errornowikiavailable": "This wiki does not have any content yet.",
44
"gowikihome": "Go Wiki home",
55
"map": "Map",
66
"notingroup": "Not in group",

0 commit comments

Comments
 (0)