MDL-63817 block_timeline: Consistent activities limit default

This commit is contained in:
David Monllao
2018-11-19 10:57:13 +01:00
parent 94db315b50
commit c47fea4e75
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -69,7 +69,7 @@ class main implements renderable, templatable {
public function __construct($order, $filter, $limit) {
$this->order = $order ? $order : BLOCK_TIMELINE_SORT_BY_DATES;
$this->filter = $filter ? $filter : BLOCK_TIMELINE_FILTER_BY_7_DAYS;
$this->limit = $limit ? $limit : BLOCK_TIMELINE_LIMIT_DEFAULT;
$this->limit = $limit ? $limit : BLOCK_TIMELINE_ACTIVITIES_LIMIT_DEFAULT;
}
/**
+2 -2
View File
@@ -38,7 +38,7 @@ define('BLOCK_TIMELINE_FILTER_BY_7_DAYS', 'next7days');
define('BLOCK_TIMELINE_FILTER_BY_30_DAYS', 'next30days');
define('BLOCK_TIMELINE_FILTER_BY_3_MONTHS', 'next3months');
define('BLOCK_TIMELINE_FILTER_BY_6_MONTHS', 'next6months');
define('BLOCK_TIMELINE_LIMIT_DEFAULT', 2);
define('BLOCK_TIMELINE_ACTIVITIES_LIMIT_DEFAULT', 5);
/**
* Returns the name of the user preferences as well as the details this plugin uses.
@@ -69,7 +69,7 @@ function block_timeline_user_preferences() {
$preferences['block_timeline_user_limit_preference'] = array(
'null' => NULL_NOT_ALLOWED,
'default' => BLOCK_TIMELINE_LIMIT_DEFAULT,
'default' => BLOCK_TIMELINE_ACTIVITIES_LIMIT_DEFAULT,
'type' => PARAM_INT
);