|
|
|
The problem mostly appears when using custom sized blocks and custom themes. To reproduce:
0. in admin, enable "showbloksonmodpages"
1. create a custom theme (or edit a standard one), and add the following lines to the theme's config.php
$THEME->block_l_min_width = 210;
$THEME->block_l_max_width = 210;
$THEME->block_r_min_width = 210;
$THEME->block_r_max_width = 210;
2. now show a course home page: blocks are resized to 210 pixel width, according to the above directives
3. add a web page resource and select "show blocks"
4. when Moodle shows the resource, the blocks are truncated at 180 pixel width
Possible solutions:
1. avoid hard coding the blocks pixel width, leaving it as CSS responsibility
2. modify line 191 of mod/resource/lib.php (code below) allowing the the code to keep into consideration the specified block width in theme's config.php
$blocks_preferred_width = bounded_number(180, blocks_preferred_width($pageblocks[BLOCK_POS_RIGHT]), 210);
|
|
Description
|
The problem mostly appears when using custom sized blocks and custom themes. To reproduce:
0. in admin, enable "showbloksonmodpages"
1. create a custom theme (or edit a standard one), and add the following lines to the theme's config.php
$THEME->block_l_min_width = 210;
$THEME->block_l_max_width = 210;
$THEME->block_r_min_width = 210;
$THEME->block_r_max_width = 210;
2. now show a course home page: blocks are resized to 210 pixel width, according to the above directives
3. add a web page resource and select "show blocks"
4. when Moodle shows the resource, the blocks are truncated at 180 pixel width
Possible solutions:
1. avoid hard coding the blocks pixel width, leaving it as CSS responsibility
2. modify line 191 of mod/resource/lib.php (code below) allowing the the code to keep into consideration the specified block width in theme's config.php
$blocks_preferred_width = bounded_number(180, blocks_preferred_width($pageblocks[BLOCK_POS_RIGHT]), 210);
|
Show » |
|