mirror of
https://github.com/moodle/moodle.git
synced 2025-01-31 20:53:53 +01:00
improved variable initialisation
This commit is contained in:
parent
91011b1831
commit
91c49d9233
@ -270,7 +270,7 @@
|
||||
echo $OUTPUT->heading(format_text($feedback->name));
|
||||
|
||||
if( (intval($feedback->publish_stats) == 1) AND
|
||||
( has_capability('mod/feedback:viewanalysepage', $context)) AND
|
||||
( has_capability('mod/feedback:viewanalysepage', $context)) AND
|
||||
!( has_capability('mod/feedback:viewreports', $context)) ) {
|
||||
echo $OUTPUT->box_start('mdl-align');
|
||||
echo '<a href="'.$analysisurl->out().'">'.get_string('completed_feedbacks', 'feedback').'</a>';
|
||||
@ -336,11 +336,11 @@
|
||||
}
|
||||
echo $OUTPUT->box_start('feedback_items');
|
||||
|
||||
unset($startitem);
|
||||
$startitem = null;
|
||||
$itemnr = $DB->count_records_select('feedback_item', 'feedback = ? AND hasvalue = 1 AND position < ?', array($feedback->id, $startposition));
|
||||
$lastbreakposition = 0;
|
||||
$align = right_to_left() ? 'right' : 'left';
|
||||
|
||||
|
||||
foreach($feedbackitems as $feedbackitem){
|
||||
if(!isset($startitem)) {
|
||||
//avoid showing double pagebreaks
|
||||
@ -349,7 +349,7 @@
|
||||
}
|
||||
$startitem = $feedbackitem;
|
||||
}
|
||||
|
||||
|
||||
if($feedbackitem->dependitem > 0) {
|
||||
//chech if the conditions are ok
|
||||
if(!isset($feedbackcompletedtmp->id) OR !feedback_compare_item_value($feedbackcompletedtmp->id, $feedbackitem->dependitem, $feedbackitem->dependvalue, true)) {
|
||||
@ -358,13 +358,13 @@
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if($feedbackitem->dependitem > 0) {
|
||||
$dependstyle = ' feedback_complete_depend';
|
||||
}else {
|
||||
$dependstyle = '';
|
||||
}
|
||||
|
||||
|
||||
echo $OUTPUT->box_start('feedback_item_box_'.$align.$dependstyle);
|
||||
$value = '';
|
||||
//get the value
|
||||
|
Loading…
x
Reference in New Issue
Block a user