Lesterhuis-Training-en-Consultancy / moodle-block-user_favorites

Moodle plugin - marking pages as favorites
GNU General Public License v3.0
1 stars 4 forks source link

Issue max items stored as user favourites #3

Closed luukverhoeven closed 4 years ago

luukverhoeven commented 5 years ago

Hi Luuk, We have found that the number of favourites that can be stored are limited because the mdl_user_preferences.value is set to type varchar(1333) in the Moodle database. Obviously we can change this to text, but I wanted to check if this is just an issue with our database (running on MariaDB). Do you have any advice on this? Thanks Ken

luukverhoeven commented 5 years ago

Converting the DB column "mdl_user_preferences .value" to text is the best solution for now.

luukverhoeven commented 5 years ago

I will improve the plugin by storing this information in a separate table and implement a privacy provider for it.

KenFarr commented 5 years ago

Thanks for adding this. Ken

KenFarr commented 5 years ago

We have found another problem in that of /lib/moodlelib.php throws a coding error as it contains a limit on the size of data stored in that field
$value = (string)$value; if (core_text::strlen($value) > 1333)

If this line is adjusted then the plugin works perfectly, but clearly a separate table is needed. Ken

 

luukverhoeven commented 5 years ago

Hi Ken,

There is a new release in the development branch. Can you validate if this is working as expected?

Changes:

This should solve this issue.