Skip to content

Commit 77f2c21

Browse files
authored
Merge pull request #937 from crazyserver/MOBILE-1987
Mobile 1987
2 parents 5b3bf52 + f145cdd commit 77f2c21

File tree

11 files changed

+91
-37
lines changed

11 files changed

+91
-37
lines changed

www/addons/mod/assign/directives/submission.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,8 @@ angular.module('mm.addons.mod_assign')
222222
originalGrades.applyToAll = true;
223223
}
224224
if (assign.markingworkflow && scope.grade.gradingStatus) {
225-
scope.workflowStatusTranslationId = getSubmissionGradingStatusTranslationId(scope.grade.gradingStatus);
225+
scope.workflowStatusTranslationId =
226+
$mmaModAssign.getSubmissionGradingStatusTranslationId(scope.grade.gradingStatus);
226227
}
227228

228229
if (!scope.feedback) {

www/addons/mod/chat/scss/styles.scss

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,14 @@ $mma-chat-notice-badge: "stable" !default;
3333

3434
.mma-chat-reconnect-button, .button.mma-chat-reconnect-button {
3535
margin: 0;
36+
}
37+
38+
.mma-mod_chat-users-modal {
39+
.item-complex .item-avatar {
40+
padding-bottom: 0;
41+
42+
.tabs {
43+
border: 0;
44+
}
45+
}
3646
}

www/addons/mod/chat/templates/chat.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ <h2>{{ message.userfullname }}</h2>
3939
</div>
4040
</div>
4141

42-
<div ng-if="!messages || messages.length <= 0">
42+
<div class="padding" ng-if="!messages || messages.length <= 0">
4343
<p>{{ 'mma.mod_chat.nomessages' | translate}}</p>
4444
</div>
4545
</section>

www/addons/mod/chat/templates/users.html

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,23 @@
33
<h1 class="title">{{ 'mma.mod_chat.currentusers' | translate }}</h1>
44
<button class="button button-icon ion-close-round" ng-click="closeModal()" aria-label="{{ 'mm.core.close' | translate }}"></button>
55
</ion-header-bar>
6-
<ion-content padding="true">
6+
<ion-content>
77
<mm-loading hide-until="usersLoaded">
88
<ul class="list">
9-
<li ng-repeat="user in chatUsers" class="card">
9+
<li ng-repeat="user in chatUsers" class="item-complex">
1010
<div class="item item-avatar">
1111
<img ng-src="{{user.profileimageurl}}" alt="{{ 'mm.core.pictureof' | translate:{$a: user.fullname} }}" mm-external-content>
1212
<mm-format-text>{{user.fullname}}</mm-format-text>
13-
</div>
14-
<div class="item tabs tabs-secondary tabs-icon-left" ng-if="currentUserId != user.id && !isAppOffline()">
15-
<a class="tab-item" ng-click="talkTo(user.fullname)">
16-
<i class="icon ion-chatbox"></i>
17-
{{ 'mma.mod_chat.talk' | translate}}
18-
</a>
19-
<a class="tab-item" ng-click="beepTo(user.id)">
20-
<i class="icon ion-ios-bell"></i>
21-
{{ 'mma.mod_chat.beep' | translate}}
22-
</a>
13+
<div class="item tabs tabs-secondary tabs-icon-left" ng-if="currentUserId != user.id && !isAppOffline()">
14+
<a class="tab-item" ng-click="talkTo(user.fullname)">
15+
<i class="icon ion-chatbox"></i>
16+
{{ 'mma.mod_chat.talk' | translate}}
17+
</a>
18+
<a class="tab-item" ng-click="beepTo(user.id)">
19+
<i class="icon ion-ios-bell"></i>
20+
{{ 'mma.mod_chat.beep' | translate}}
21+
</a>
22+
</div>
2323
</div>
2424
</li>
2525
</ul>

www/addons/mod/forum/scss/styles.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
border-style: solid;
1414
}
1515

16+
.mma-forum-reply-edit {
17+
padding: $item-padding/2;
18+
}
19+
1620
.mm-site_mod_forum, .mm-site_mod_forum-discussion {
1721
.item.item-heading {
1822
padding-bottom: 2px;

www/addons/mod/forum/templates/newdiscussion.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<ion-view view-title="{{ 'mma.mod_forum.addanewdiscussion' | translate }}">
2-
<ion-content padding="true" mm-state-class delegate-handle="mmaModForumNewDiscussion">
2+
<ion-content mm-state-class delegate-handle="mmaModForumNewDiscussion">
33
<ion-refresher pulling-text="{{ 'mm.core.pulltorefresh' | translate }}" ng-if="groupsLoaded" on-refresh="refreshGroups()">
44
</ion-refresher>
55
<mm-loading hide-until="groupsLoaded">
6-
<form ng-if="showForm" class="list mma-forum-border">
6+
<form ng-if="showForm" class="list">
77
<ion-input class="item item-input item-stacked-label">
88
<ion-label>{{ 'mma.mod_forum.subject' | translate }}</ion-label>
99
<input type="text" placeholder="{{ 'mma.mod_forum.subject' | translate }}" ng-model="newDiscussion.subject">

www/addons/mod/survey/templates/index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@
2727
</div>
2828

2929
<!-- Survey questions -->
30-
<section class="card padding" ng-if="!survey.surveydone && !hasOffline && questions && questions.length">
30+
<section ng-if="!survey.surveydone && !hasOffline && questions && questions.length">
3131
<div ng-repeat="question in questions">
3232
<!-- Parent question (Category header) -->
3333
<div ng-if="question.multi && question.multi.length" ng-class="{'mma-mod_survey-padding-top': !$first}">
34-
<h2>{{ question.text }}</h2>
34+
<h3 class="padding-horizontal">{{ question.text }}</h3>
3535
<div class="row" ng-if="isTablet">
3636
<div class="col col-50">{{ 'mma.mod_survey.responses' | translate }}</div>
3737
<div class="col text-center" ng-repeat="option in question.options">
@@ -51,7 +51,7 @@ <h2>{{ question.text }}</h2>
5151
<input type="radio" name="{{question.name}}" ng-model="answers[question.name]" ng-value="$index + 1" aria-labelledby="mma-mod_survey-{{question.name}}">
5252
</div>
5353
<!-- Phone view: select -->
54-
<div ng-if="!isTablet" class="col-40 text-center item-select">
54+
<div ng-if="!isTablet" class="col-40 item-select">
5555
<select class="mma-mod_survey-select" ng-model="answers[question.name]" ng-options="question.options.indexOf(o)+1 as o for o in question.options" aria-labelledby="mma-mod_survey-{{question.name}}" mm-ios-select-fix>
5656
<option class="mma-mod_survey-defaultoption" value="" disabled selected>{{ 'mm.core.choose' | translate }}</option>
5757
</select>
@@ -78,7 +78,7 @@ <h2>{{ question.text }}</h2>
7878
</div>
7979
</div>
8080
</div>
81-
<div>
81+
<div class="padding">
8282
<button class="button button-block" ng-click="submit()" ng-disabled="!isValidResponse()">{{ 'mma.mod_survey.clicktocontinue' | translate }}</button>
8383
</div>
8484
</section>
Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
// Style match content a bit.
2-
.mma-qtype-match-container {
3-
select {
2+
.mma-qtype-match-container .item-select {
3+
select,
4+
.mm-select-fix {
45
padding: 0 36px 0 0;
56
max-width: 100%;
7+
display: flex;
8+
justify-content:center;
9+
align-content:center;
10+
flex-direction:column;
611
}
712
}

www/addons/qtype/match/template.html

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,17 @@
22
<div class="item item-text-wrap">
33
<p><mm-format-text watch="true" component="{{component}}" component-id="{{componentId}}">{{ question.text }}</mm-format-text></p>
44
</div>
5-
<div class="item item-text-wrap row mm-item-padding" ng-repeat="row in question.rows">
6-
<div class="col">
7-
<p><mm-format-text watch="true" id="mma-question-{{row.id}}" component="{{component}}" component-id="{{componentId}}">{{ row.text }}</mm-format-text></p>
8-
</div>
9-
<div class="col text-center item-select" ng-class='{"mm-question-answer-correct": row.isCorrect === 1, "mm-question-answer-incorrect": row.isCorrect === 0}'>
10-
<label class="accesshide" for="{{row.id}}" ng-if="row.accessibilityLabel">{{ row.accessibilityLabel }}</label>
11-
<select id="{{row.id}}" name="{{row.name}}" ng-disabled="row.disabled" aria-labelledby="mma-question-{{row.id}}" mm-ios-select-fix>
12-
<option ng-repeat="o in row.options" value="{{o.value}}" label="{{o.label}}" ng-selected="{{o.selected}}">{{o.label}}</option>
13-
</select>
14-
</div>
15-
</div>
5+
<div class="item item-text-wrap row mm-item-padding" ng-repeat="row in question.rows">
6+
<div class="col">
7+
<p><mm-format-text watch="true" id="mma-question-{{row.id}}" component="{{component}}" component-id="{{componentId}}">{{ row.text }}</mm-format-text></p>
8+
</div>
9+
<div class="col" ng-class='{"item-select": !row.disabled, "mm-question-answer-correct": row.isCorrect === 1, "mm-question-answer-incorrect": row.isCorrect === 0}'>
10+
<label class="accesshide" for="{{row.id}}" ng-if="row.accessibilityLabel">{{ row.accessibilityLabel }}</label>
11+
<select id="{{row.id}}" name="{{row.name}}" ng-if="!row.disabled" aria-labelledby="mma-question-{{row.id}}" ng-options="option.label for option in row.options track by option.value" ng-model="row.selected" mm-ios-select-fix>
12+
</select>
13+
<p class="mm-select-fix" ng-if="row.selected && row.selected.label">
14+
{{row.selected.label}}
15+
</p>
16+
</div>
17+
</div>
1618
</section>

www/core/components/question/services/helper.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -687,6 +687,7 @@ angular.module('mm.core.question')
687687
rowModel.id = select.id;
688688
rowModel.name = select.name;
689689
rowModel.disabled = select.disabled;
690+
rowModel.selected = false;
690691
rowModel.options = [];
691692

692693
// Check if answer is correct.
@@ -702,12 +703,17 @@ angular.module('mm.core.question')
702703
log.warn('Aborting because couldn\'t find option value.', question.name);
703704
return self.showDirectiveError(scope);
704705
}
705-
706-
rowModel.options.push({
706+
var opt = {
707707
value: option.value,
708708
label: option.innerHTML,
709709
selected: option.selected
710-
});
710+
};
711+
712+
if (opt.selected) {
713+
rowModel.selected = opt;
714+
}
715+
716+
rowModel.options.push(opt);
711717
});
712718

713719
// Get the accessibility label.

0 commit comments

Comments
 (0)