}
$bc->attributes = $attributes;
- echo $OUTPUT->block($bc);
+ echo $OUTPUT->block($bc, BLOCK_POS_LEFT); // POS LEFT may be wrong, but no way to get a better guess here.
}
/**
* @deprecated
*/
function print_side_block_start($heading='', $attributes = array()) {
- throw new coding_exception('print_side_block_start has been deprecated. Please cahnge your code to use $OUTPUT->block().');
+ throw new coding_exception('print_side_block_start has been deprecated. Please change your code to use $OUTPUT->block().');
}
/**
* @deprecated
*/
function print_side_block_end($attributes = array(), $title='') {
- throw new coding_exception('print_side_block_end has been deprecated. Please cahnge your code to use $OUTPUT->block().');
+ throw new coding_exception('print_side_block_end has been deprecated. Please change your code to use $OUTPUT->block().');
}
/**
* by a {@link block_contents} object.
*
* @param block_contents $bc HTML for the content
+ * @param string $region the region the block is appearing in.
* @return string the HTML to be output.
*/
- function block($bc) {
+ function block($bc, $region) {
$bc = clone($bc); // Avoid messing up the object passed in.
$bc->prepare();
$blockcontents = $this->page->blocks->get_content_for_region($region, $this);
$output = '';
foreach ($blockcontents as $bc) {
- $output .= $this->block($bc);
+ $output .= $this->block($bc, $region);
}
return $output;
}