Línea 182... |
Línea 182... |
182 |
|
182 |
|
183 |
public function print_analysed($item, $itemnr = '', $groupid = false, $courseid = false) {
|
183 |
public function print_analysed($item, $itemnr = '', $groupid = false, $courseid = false) {
|
184 |
global $OUTPUT;
|
184 |
global $OUTPUT;
|
185 |
$analysed_item = $this->get_analysed($item, $groupid, $courseid);
|
185 |
$analysed_item = $this->get_analysed($item, $groupid, $courseid);
|
186 |
if ($analysed_item) {
|
186 |
if ($analysed_item) {
|
187 |
echo "<table class=\"analysis itemtype_{$item->typ}\">";
|
187 |
echo "<table class=\"analysis itemtype_{$item->typ} table-reboot\">";
|
188 |
echo '<tr><th class="text-left">';
|
188 |
echo '<tr><th class="text-start">';
|
189 |
echo $itemnr . ' ';
|
189 |
echo $itemnr . ' ';
|
190 |
if (strval($item->label) !== '') {
|
190 |
if (strval($item->label) !== '') {
|
191 |
echo '('. format_string($item->label).') ';
|
191 |
echo '('. format_string($item->label).') ';
|
192 |
}
|
192 |
}
|
Línea 219... |
Línea 219... |
219 |
$series->set_labels($data['series_labels']);
|
219 |
$series->set_labels($data['series_labels']);
|
220 |
$chart->add_series($series);
|
220 |
$chart->add_series($series);
|
221 |
$chart->set_labels($data['labels']);
|
221 |
$chart->set_labels($data['labels']);
|
222 |
echo '<tr><td>'. $OUTPUT->render($chart) . '</td></tr>';
|
222 |
echo '<tr><td>'. $OUTPUT->render($chart) . '</td></tr>';
|
223 |
$avg = format_float($avg, 2);
|
223 |
$avg = format_float($avg, 2);
|
224 |
echo '<tr><td class="text-left"><b>';
|
224 |
echo '<tr><td class="text-start"><b>';
|
225 |
echo get_string('average', 'feedback').': '.$avg.'</b>';
|
225 |
echo get_string('average', 'feedback').': '.$avg.'</b>';
|
226 |
echo '</td></tr>';
|
226 |
echo '</td></tr>';
|
227 |
echo '</table>';
|
227 |
echo '</table>';
|
228 |
}
|
228 |
}
|
229 |
}
|
229 |
}
|
Línea 322... |
Línea 322... |
322 |
foreach ($options as $idx => $label) {
|
322 |
foreach ($options as $idx => $label) {
|
323 |
$objs[] = ['radio', $inputname, '', $label, $idx];
|
323 |
$objs[] = ['radio', $inputname, '', $label, $idx];
|
324 |
}
|
324 |
}
|
325 |
// Span to hold the element id. The id is used for drag and drop reordering.
|
325 |
// Span to hold the element id. The id is used for drag and drop reordering.
|
326 |
$objs[] = ['static', '', '', html_writer::span('', '', ['id' => 'feedback_item_' . $item->id])];
|
326 |
$objs[] = ['static', '', '', html_writer::span('', '', ['id' => 'feedback_item_' . $item->id])];
|
327 |
$separator = $info->horizontal ? ' ' : '<br>';
|
327 |
$separator = $info->horizontal ? ' ' : \html_writer::div('', 'w-100');
|
328 |
$class .= ' multichoicerated-' . ($info->horizontal ? 'horizontal' : 'vertical');
|
328 |
$class .= ' multichoicerated-' . ($info->horizontal ? 'horizontal' : 'vertical');
|
329 |
$el = $form->add_form_group_element($item, 'group_'.$inputname, $name, $objs, $separator, $class);
|
329 |
$el = $form->add_form_group_element($item, 'group_'.$inputname, $name, $objs, $separator, $class);
|
330 |
$form->set_element_type($inputname, PARAM_INT);
|
330 |
$form->set_element_type($inputname, PARAM_INT);
|
Línea 331... |
Línea 331... |
331 |
|
331 |
|