50
50
}
51
51
52
52
$ surveyId = $ survey ->getIid ();
53
-
54
- SurveyManager::checkTimeAvailability ($ survey );
55
53
$ invitations = SurveyUtil::get_invited_users ($ survey );
56
54
$ students = $ invitations ['course_users ' ] ?? [];
57
55
65
63
$ url = api_get_self ().'?survey_id= ' .$ surveyId .'&invitationcode= ' .$ invitationcode .'& ' .api_get_cidreq ();
66
64
$ urlEdit = $ url .'&action=edit ' ;
67
65
66
+ if (!api_is_allowed_to_edit ()) {
67
+ SurveyManager::checkTimeAvailability ($ survey );
68
+ }
69
+
68
70
$ questions = $ survey ->getQuestions ();
69
71
70
72
if (isset ($ _POST ) && !empty ($ _POST )) {
110
112
111
113
$ template = new Template ();
112
114
113
- $ table = new HTML_Table (['class ' => 'table ' ]);
115
+ $ table = new HTML_Table (['class ' => 'table table-hover table-striped data_table mt-5 ' ]);
114
116
$ row = 0 ;
115
- $ column = 1 ;
117
+ $ column = 0 ;
116
118
$ answerList = [];
119
+
120
+ $ table ->setHeaderContents ($ row , $ column , "" );
121
+ $ column ++;
117
122
foreach ($ questions as $ item ) {
118
123
$ questionId = $ item ->getIid ();
119
124
$ answers = SurveyUtil::get_answers_of_question_by_user ($ surveyId , $ questionId );
142
147
}
143
148
144
149
$ mainDate = api_format_date ($ mainDate , DATE_FORMAT_SHORT );
145
- $ table ->setHeaderContents ($ row , $ column , "<h4> $ mainDate</h4> $ startTime <br > $ endTime " );
150
+ $ table ->setHeaderContents ($ row , $ column , "<h4> $ mainDate</h4> <span class='text-lg'> $ startTime <br > $ endTime</span> " );
146
151
$ column ++;
147
152
}
148
153
149
- $ row = 1 ;
154
+ $ row = 0 ;
150
155
$ column = 0 ;
151
156
152
157
// Total counter
153
- $ table ->setHeaderContents (
158
+ $ table ->setCellContents (
154
159
$ row ,
155
160
0 ,
156
- get_lang ('Number of users ' ).': ' .count ($ students )
161
+ ' <span class="text-bold font-extrabold text-xl"> ' . get_lang ('Number of users ' ).': ' .count ($ students ). ' </span> '
157
162
);
158
163
159
164
foreach ($ questions as $ item ) {
166
171
$ questionsWithAnswer ++;
167
172
}
168
173
}
169
- $ count = '<p style="color:cornflowerblue" >
170
- <span class="fa fa -check fa-2x "></span> ' .$ questionsWithAnswer .'</p> ' ;
174
+ $ count = '<p class="text-info text-center p-2 text-bold font-extrabold text-2xl" >
175
+ <span class="mdi mdi -check text-3xl "></span> ' .$ questionsWithAnswer .'</p> ' ;
171
176
}
172
177
$ table ->setCellContents (
173
178
$ row ,
176
181
);
177
182
}
178
183
179
- $ row = 2 ;
184
+ $ row = 1 ;
180
185
$ column = 0 ;
181
186
$ availableIcon = Display::getMdiIcon (StateIcon::ACTIVE , 'ch-tool-icon ' , null , ICON_SIZE_SMALL , get_lang ('Available ' ));
182
187
$ notAvailableIcon = Display::getMdiIcon (StateIcon::INACTIVE , 'ch-tool-icon ' , null , ICON_SIZE_SMALL , get_lang ('Not available ' ));
210
215
}
211
216
212
217
if ('edit ' === $ action ) {
213
- $ html = '<div class="alert alert-info"><input
218
+ $ html = '<div class="alert alert-info text-center "><input
214
219
id=" ' .$ questionId .'"
215
220
name="options[ ' .$ questionId .']"
216
221
class="question" ' .$ checked .'
@@ -220,7 +225,7 @@ class="question" '.$checked.'
220
225
$ html = $ checked ;
221
226
}
222
227
223
- $ table ->setHeaderContents (
228
+ $ table ->setCellContents (
224
229
$ row ,
225
230
$ rowColumn ,
226
231
$ html
@@ -238,7 +243,7 @@ class="question" '.$checked.'
238
243
$ checked = $ notAvailableIcon ;
239
244
}
240
245
}
241
- $ table ->setHeaderContents (
246
+ $ table ->setCellContents (
242
247
$ row ,
243
248
$ rowColumn ,
244
249
$ checked
@@ -247,7 +252,7 @@ class="question" '.$checked.'
247
252
}
248
253
}
249
254
$ column = 0 ;
250
- $ table ->setCellContents ($ row , $ column , $ name );
255
+ $ table ->setCellContents ($ row , $ column , ' <span class="text-bold font-extrabold text-lg"> ' . $ name. ' </span> ' );
251
256
$ row ++;
252
257
}
253
258
if ('edit ' === $ action ) {
0 commit comments