5050}
5151
5252$ surveyId = $ survey ->getIid ();
53-
54- SurveyManager::checkTimeAvailability ($ survey );
5553$ invitations = SurveyUtil::get_invited_users ($ survey );
5654$ students = $ invitations ['course_users ' ] ?? [];
5755
6563$ url = api_get_self ().'?survey_id= ' .$ surveyId .'&invitationcode= ' .$ invitationcode .'& ' .api_get_cidreq ();
6664$ urlEdit = $ url .'&action=edit ' ;
6765
66+ if (!api_is_allowed_to_edit ()) {
67+ SurveyManager::checkTimeAvailability ($ survey );
68+ }
69+
6870$ questions = $ survey ->getQuestions ();
6971
7072if (isset ($ _POST ) && !empty ($ _POST )) {
110112
111113$ template = new Template ();
112114
113- $ table = new HTML_Table (['class ' => 'table ' ]);
115+ $ table = new HTML_Table (['class ' => 'table table-hover table-striped data_table mt-5 ' ]);
114116$ row = 0 ;
115- $ column = 1 ;
117+ $ column = 0 ;
116118$ answerList = [];
119+
120+ $ table ->setHeaderContents ($ row , $ column , "" );
121+ $ column ++;
117122foreach ($ questions as $ item ) {
118123 $ questionId = $ item ->getIid ();
119124 $ answers = SurveyUtil::get_answers_of_question_by_user ($ surveyId , $ questionId );
142147 }
143148
144149 $ 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> " );
146151 $ column ++;
147152}
148153
149- $ row = 1 ;
154+ $ row = 0 ;
150155$ column = 0 ;
151156
152157// Total counter
153- $ table ->setHeaderContents (
158+ $ table ->setCellContents (
154159 $ row ,
155160 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> '
157162);
158163
159164foreach ($ questions as $ item ) {
166171 $ questionsWithAnswer ++;
167172 }
168173 }
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> ' ;
171176 }
172177 $ table ->setCellContents (
173178 $ row ,
176181 );
177182}
178183
179- $ row = 2 ;
184+ $ row = 1 ;
180185$ column = 0 ;
181186$ availableIcon = Display::getMdiIcon (StateIcon::ACTIVE , 'ch-tool-icon ' , null , ICON_SIZE_SMALL , get_lang ('Available ' ));
182187$ notAvailableIcon = Display::getMdiIcon (StateIcon::INACTIVE , 'ch-tool-icon ' , null , ICON_SIZE_SMALL , get_lang ('Not available ' ));
210215 }
211216
212217 if ('edit ' === $ action ) {
213- $ html = '<div class="alert alert-info"><input
218+ $ html = '<div class="alert alert-info text-center "><input
214219 id=" ' .$ questionId .'"
215220 name="options[ ' .$ questionId .']"
216221 class="question" ' .$ checked .'
@@ -220,7 +225,7 @@ class="question" '.$checked.'
220225 $ html = $ checked ;
221226 }
222227
223- $ table ->setHeaderContents (
228+ $ table ->setCellContents (
224229 $ row ,
225230 $ rowColumn ,
226231 $ html
@@ -238,7 +243,7 @@ class="question" '.$checked.'
238243 $ checked = $ notAvailableIcon ;
239244 }
240245 }
241- $ table ->setHeaderContents (
246+ $ table ->setCellContents (
242247 $ row ,
243248 $ rowColumn ,
244249 $ checked
@@ -247,7 +252,7 @@ class="question" '.$checked.'
247252 }
248253 }
249254 $ column = 0 ;
250- $ table ->setCellContents ($ row , $ column , $ name );
255+ $ table ->setCellContents ($ row , $ column , ' <span class="text-bold font-extrabold text-lg"> ' . $ name. ' </span> ' );
251256 $ row ++;
252257}
253258if ('edit ' === $ action ) {
0 commit comments