mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 12:40:01 +01: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) {
|
||||
// Print the items in an analysed form.
|
||||
foreach ($items as $item) {
|
||||
echo '<table class="analysis">';
|
||||
echo "<table class=\"analysis itemtype_{$item->typ}\">";
|
||||
$itemobj = feedback_get_item_class($item->typ);
|
||||
$printnr = ($feedback->autonumbering && $item->itemnr) ? ($item->itemnr . '.') : '';
|
||||
$itemobj->print_analysed($item, $printnr, $mygroupid);
|
||||
|
@ -150,7 +150,7 @@ class feedback_item_info extends feedback_item_base {
|
||||
echo '</th></tr>';
|
||||
$sizeofdata = count($data);
|
||||
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 '</td></tr>';
|
||||
}
|
||||
|
@ -230,10 +230,10 @@ class feedback_item_multichoice extends feedback_item_base {
|
||||
$str_quotient = ' ('. $quotient . ' %)';
|
||||
}
|
||||
echo '<tr>';
|
||||
echo '<td align="left" valign="top">
|
||||
- '.format_text(trim($val->answertext), FORMAT_HTML, array('noclean' => true, 'para' => false)).':
|
||||
echo '<td class="optionname">' .
|
||||
format_text(trim($val->answertext), FORMAT_HTML, array('noclean' => true, 'para' => false)).':
|
||||
</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="" src="'.$pixspacer.'" width="'.$pixwidthspacer.'" />
|
||||
'.$val->answercount.$str_quotient.'
|
||||
|
@ -199,10 +199,10 @@ class feedback_item_multichoicerated extends feedback_item_base {
|
||||
$avg += $val->avg;
|
||||
$quotient = format_float($val->quotient * 100, 2);
|
||||
echo '<tr>';
|
||||
echo '<td align="left" valign="top">';
|
||||
echo '- ('.$val->value.') '.
|
||||
echo '<td class="optionname">';
|
||||
echo '<span class="weight">('.$val->value.') </span>'.
|
||||
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="" src="'.$pixspacer.'" width="'.$pixwidthspacer.'" /> ';
|
||||
echo $val->answercount;
|
||||
|
@ -151,8 +151,8 @@ class feedback_item_numeric extends feedback_item_base {
|
||||
echo '</th></tr>';
|
||||
|
||||
foreach ($values->data as $value) {
|
||||
echo '<tr><td colspan="2" valign="top" align="left">';
|
||||
echo '- '.$this->format_float($value);
|
||||
echo '<tr><td colspan="2" class="singlevalue">';
|
||||
echo $this->format_float($value);
|
||||
echo '</td></tr>';
|
||||
}
|
||||
|
||||
@ -161,7 +161,7 @@ class feedback_item_numeric extends feedback_item_base {
|
||||
} else {
|
||||
$avg = '-';
|
||||
}
|
||||
echo '<tr><td align="left" colspan="2"><b>';
|
||||
echo '<tr><td colspan="2"><b>';
|
||||
echo get_string('average', 'feedback').': '.$avg;
|
||||
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 '</th></tr>';
|
||||
foreach ($values as $value) {
|
||||
echo '<tr>';
|
||||
echo '<td colspan="2" valign="top" align="left">';
|
||||
echo '- ';
|
||||
$class = strlen(trim($value->value)) ? '' : ' class="isempty"';
|
||||
echo '<tr'.$class.'>';
|
||||
echo '<td colspan="2" class="singlevalue">';
|
||||
echo str_replace("\n", '<br />', $value->value);
|
||||
echo '</td>';
|
||||
echo '</tr>';
|
||||
|
@ -137,8 +137,9 @@ class feedback_item_textfield extends feedback_item_base {
|
||||
echo $this->get_display_name($item);
|
||||
echo '</th></tr>';
|
||||
foreach ($values as $value) {
|
||||
echo '<tr><td colspan="2" valign="top" align="left">';
|
||||
echo '- '.str_replace("\n", '<br />', $value->value);
|
||||
$class = strlen(trim($value->value)) ? '' : ' class="isempty"';
|
||||
echo '<tr'.$class.'><td colspan="2" class="singlevalue">';
|
||||
echo str_replace("\n", '<br />', $value->value);
|
||||
echo '</td></tr>';
|
||||
}
|
||||
}
|
||||
|
@ -140,15 +140,40 @@ body.dir-rtl.path-mod-feedback #region-main .mform.feedback_form .femptylabel .f
|
||||
float: right;
|
||||
}
|
||||
|
||||
.path-mod-feedback table.analysis {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.path-mod-feedback .templateslist td.cell.action,
|
||||
.path-mod-feedback .templateslist th.header.action {
|
||||
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 #showentryanontable td.cell.random_response {
|
||||
font-weight: bold;
|
||||
|
Loading…
x
Reference in New Issue
Block a user