mirror of
https://github.com/moodle/moodle.git
synced 2025-08-08 10:26:40 +02:00
Merge branch 'MDL-62859' of https://github.com/paulholden/moodle
This commit is contained in:
commit
59cd47c02f
29 changed files with 395 additions and 455 deletions
2
lib/amd/build/paged_content_factory.min.js
vendored
2
lib/amd/build/paged_content_factory.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -28,7 +28,7 @@ define(
|
|||
'core/paged_content',
|
||||
'core/paged_content_events',
|
||||
'core/pubsub',
|
||||
'core/ajax'
|
||||
'core_user/repository'
|
||||
],
|
||||
function(
|
||||
$,
|
||||
|
@ -37,7 +37,7 @@ function(
|
|||
PagedContent,
|
||||
PagedContentEvents,
|
||||
PubSub,
|
||||
Ajax
|
||||
UserRepository
|
||||
) {
|
||||
var TEMPLATES = {
|
||||
PAGED_CONTENT: 'core/paged_content'
|
||||
|
@ -520,25 +520,9 @@ function(
|
|||
* @return {callback}
|
||||
*/
|
||||
var generateLimitHandler = function(persistentLimitKey) {
|
||||
var callback = function(limit) {
|
||||
var args = {
|
||||
preferences: [
|
||||
{
|
||||
type: persistentLimitKey,
|
||||
value: limit
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
var request = {
|
||||
methodname: 'core_user_update_user_preferences',
|
||||
args: args
|
||||
};
|
||||
|
||||
Ajax.call([request]);
|
||||
return function(limit) {
|
||||
UserRepository.setUserPreference(persistentLimitKey, limit);
|
||||
};
|
||||
|
||||
return callback;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue