mirror of
https://github.com/moodle/moodle.git
synced 2025-06-06 16:16:51 +02:00
MDL-53638 mod_feedback: analysis page enhancements
This commit is contained in:
parent
c83c052230
commit
c33c1ed59e
@ -95,7 +95,7 @@ echo '<div>';
|
|||||||
if ($check_anonymously) {
|
if ($check_anonymously) {
|
||||||
// Print the items in an analysed form.
|
// Print the items in an analysed form.
|
||||||
foreach ($items as $item) {
|
foreach ($items as $item) {
|
||||||
echo '<table class="analysis">';
|
echo "<table class=\"analysis itemtype_{$item->typ}\">";
|
||||||
$itemobj = feedback_get_item_class($item->typ);
|
$itemobj = feedback_get_item_class($item->typ);
|
||||||
$printnr = ($feedback->autonumbering && $item->itemnr) ? ($item->itemnr . '.') : '';
|
$printnr = ($feedback->autonumbering && $item->itemnr) ? ($item->itemnr . '.') : '';
|
||||||
$itemobj->print_analysed($item, $printnr, $mygroupid);
|
$itemobj->print_analysed($item, $printnr, $mygroupid);
|
||||||
|
@ -150,7 +150,7 @@ class feedback_item_info extends feedback_item_base {
|
|||||||
echo '</th></tr>';
|
echo '</th></tr>';
|
||||||
$sizeofdata = count($data);
|
$sizeofdata = count($data);
|
||||||
for ($i = 0; $i < $sizeofdata; $i++) {
|
for ($i = 0; $i < $sizeofdata; $i++) {
|
||||||
echo '<tr><td colspan="2" valign="top" align="left">- ';
|
echo '<tr><td colspan="2" class="singlevalue">';
|
||||||
echo str_replace("\n", '<br />', $data[$i]->show);
|
echo str_replace("\n", '<br />', $data[$i]->show);
|
||||||
echo '</td></tr>';
|
echo '</td></tr>';
|
||||||
}
|
}
|
||||||
|
@ -230,10 +230,10 @@ class feedback_item_multichoice extends feedback_item_base {
|
|||||||
$str_quotient = ' ('. $quotient . ' %)';
|
$str_quotient = ' ('. $quotient . ' %)';
|
||||||
}
|
}
|
||||||
echo '<tr>';
|
echo '<tr>';
|
||||||
echo '<td align="left" valign="top">
|
echo '<td class="optionname">' .
|
||||||
- '.format_text(trim($val->answertext), FORMAT_HTML, array('noclean' => true, 'para' => false)).':
|
format_text(trim($val->answertext), FORMAT_HTML, array('noclean' => true, 'para' => false)).':
|
||||||
</td>
|
</td>
|
||||||
<td align="left" style="width:'.FEEDBACK_MAX_PIX_LENGTH.';">
|
<td class="optioncount" style="width:'.FEEDBACK_MAX_PIX_LENGTH.';">
|
||||||
<img class="feedback_bar_image" alt="'.$intvalue.'" src="'.$pix.'" width="'.$pixwidth.'" />'.
|
<img class="feedback_bar_image" alt="'.$intvalue.'" src="'.$pix.'" width="'.$pixwidth.'" />'.
|
||||||
'<img class="feedback_bar_image" alt="" src="'.$pixspacer.'" width="'.$pixwidthspacer.'" />
|
'<img class="feedback_bar_image" alt="" src="'.$pixspacer.'" width="'.$pixwidthspacer.'" />
|
||||||
'.$val->answercount.$str_quotient.'
|
'.$val->answercount.$str_quotient.'
|
||||||
|
@ -199,10 +199,10 @@ class feedback_item_multichoicerated extends feedback_item_base {
|
|||||||
$avg += $val->avg;
|
$avg += $val->avg;
|
||||||
$quotient = format_float($val->quotient * 100, 2);
|
$quotient = format_float($val->quotient * 100, 2);
|
||||||
echo '<tr>';
|
echo '<tr>';
|
||||||
echo '<td align="left" valign="top">';
|
echo '<td class="optionname">';
|
||||||
echo '- ('.$val->value.') '.
|
echo '<span class="weight">('.$val->value.') </span>'.
|
||||||
format_text(trim($val->answertext), FORMAT_HTML, array('noclean' => true, 'para' => false)).':</td>';
|
format_text(trim($val->answertext), FORMAT_HTML, array('noclean' => true, 'para' => false)).':</td>';
|
||||||
echo '<td align="left" style="width: '.FEEDBACK_MAX_PIX_LENGTH.'">';
|
echo '<td class="optionvalue" style="width: '.FEEDBACK_MAX_PIX_LENGTH.'">';
|
||||||
echo '<img class="feedback_bar_image" alt="'.$intvalue.'" src="'.$pix.'" width="'.$pixwidth.'" />';
|
echo '<img class="feedback_bar_image" alt="'.$intvalue.'" src="'.$pix.'" width="'.$pixwidth.'" />';
|
||||||
echo '<img class="feedback_bar_image" alt="" src="'.$pixspacer.'" width="'.$pixwidthspacer.'" /> ';
|
echo '<img class="feedback_bar_image" alt="" src="'.$pixspacer.'" width="'.$pixwidthspacer.'" /> ';
|
||||||
echo $val->answercount;
|
echo $val->answercount;
|
||||||
|
@ -151,8 +151,8 @@ class feedback_item_numeric extends feedback_item_base {
|
|||||||
echo '</th></tr>';
|
echo '</th></tr>';
|
||||||
|
|
||||||
foreach ($values->data as $value) {
|
foreach ($values->data as $value) {
|
||||||
echo '<tr><td colspan="2" valign="top" align="left">';
|
echo '<tr><td colspan="2" class="singlevalue">';
|
||||||
echo '- '.$this->format_float($value);
|
echo $this->format_float($value);
|
||||||
echo '</td></tr>';
|
echo '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -161,7 +161,7 @@ class feedback_item_numeric extends feedback_item_base {
|
|||||||
} else {
|
} else {
|
||||||
$avg = '-';
|
$avg = '-';
|
||||||
}
|
}
|
||||||
echo '<tr><td align="left" colspan="2"><b>';
|
echo '<tr><td colspan="2"><b>';
|
||||||
echo get_string('average', 'feedback').': '.$avg;
|
echo get_string('average', 'feedback').': '.$avg;
|
||||||
echo '</b></td></tr>';
|
echo '</b></td></tr>';
|
||||||
}
|
}
|
||||||
|
@ -141,9 +141,9 @@ class feedback_item_textarea extends feedback_item_base {
|
|||||||
echo format_text($item->name, FORMAT_HTML, array('noclean' => true, 'para' => false));
|
echo format_text($item->name, FORMAT_HTML, array('noclean' => true, 'para' => false));
|
||||||
echo '</th></tr>';
|
echo '</th></tr>';
|
||||||
foreach ($values as $value) {
|
foreach ($values as $value) {
|
||||||
echo '<tr>';
|
$class = strlen(trim($value->value)) ? '' : ' class="isempty"';
|
||||||
echo '<td colspan="2" valign="top" align="left">';
|
echo '<tr'.$class.'>';
|
||||||
echo '- ';
|
echo '<td colspan="2" class="singlevalue">';
|
||||||
echo str_replace("\n", '<br />', $value->value);
|
echo str_replace("\n", '<br />', $value->value);
|
||||||
echo '</td>';
|
echo '</td>';
|
||||||
echo '</tr>';
|
echo '</tr>';
|
||||||
|
@ -137,8 +137,9 @@ class feedback_item_textfield extends feedback_item_base {
|
|||||||
echo $this->get_display_name($item);
|
echo $this->get_display_name($item);
|
||||||
echo '</th></tr>';
|
echo '</th></tr>';
|
||||||
foreach ($values as $value) {
|
foreach ($values as $value) {
|
||||||
echo '<tr><td colspan="2" valign="top" align="left">';
|
$class = strlen(trim($value->value)) ? '' : ' class="isempty"';
|
||||||
echo '- '.str_replace("\n", '<br />', $value->value);
|
echo '<tr'.$class.'><td colspan="2" class="singlevalue">';
|
||||||
|
echo str_replace("\n", '<br />', $value->value);
|
||||||
echo '</td></tr>';
|
echo '</td></tr>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -140,15 +140,40 @@ body.dir-rtl.path-mod-feedback #region-main .mform.feedback_form .femptylabel .f
|
|||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
.path-mod-feedback table.analysis {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.path-mod-feedback .templateslist td.cell.action,
|
.path-mod-feedback .templateslist td.cell.action,
|
||||||
.path-mod-feedback .templateslist th.header.action {
|
.path-mod-feedback .templateslist th.header.action {
|
||||||
width: 10%;
|
width: 10%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Analysis page */
|
||||||
|
.path-mod-feedback table.analysis {
|
||||||
|
width: 100%;
|
||||||
|
border-top: 1px solid #aaaaaa;
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.path-mod-feedback table.analysis tr:first-child th {
|
||||||
|
padding-top:10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.path-mod-feedback table.analysis tr:hover {
|
||||||
|
background: #f5f5f5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.path-mod-feedback table.analysis td.singlevalue:before,
|
||||||
|
.path-mod-feedback table.analysis td.optionname:before {
|
||||||
|
content:'- ';
|
||||||
|
}
|
||||||
|
|
||||||
|
.path-mod-feedback table.analysis.itemtype_textarea td {
|
||||||
|
padding: 4px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.path-mod-feedback table.analysis tr.isempty {
|
||||||
|
display:none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Responses list */
|
||||||
.path-mod-feedback #showentrytable td.cell.completed_timemodified,
|
.path-mod-feedback #showentrytable td.cell.completed_timemodified,
|
||||||
.path-mod-feedback #showentryanontable td.cell.random_response {
|
.path-mod-feedback #showentryanontable td.cell.random_response {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user