
| Key: |
MDL-17084
|
| Type: |
Sub-task
|
| Status: |
Resolved
|
| Resolution: |
Fixed
|
| Priority: |
Minor
|
| Assignee: |
Tim Hunt
|
| Reporter: |
Tim Hunt
|
| Votes: |
0
|
| Watchers: |
1
|
|
|
| Participants: |
Tim Hunt
|
| Security Level: |
None
|
| Resolved date: |
31/Oct/08
|
| Affected Branches: |
MOODLE_20_STABLE
|
| Fixed Branches: |
MOODLE_20_STABLE
|
|
Sometimes JavaScript will need to set user preferences, for example to remember whether the user likes certain things collapsed or expanded. To this end, I propose a new script:
.../lib/ajax/setuserpref.php?sesskey=XXXX&pref=[prefname]&value=[value]
To avoid security problems, this scrip will only process an update if you have previously called a PHP function
user_preference_allow_ajax_update($name, PARAM_XXX);
This sets $USER->ajax_updatable_user_prefs[$name] = PARAM_XXX;
and sesskey will only update user preferences where the appropriate key is set in the session, and it will clean the value as specified there before doing the update.
|
|
Description
|
Sometimes JavaScript will need to set user preferences, for example to remember whether the user likes certain things collapsed or expanded. To this end, I propose a new script:
.../lib/ajax/setuserpref.php?sesskey=XXXX&pref=[prefname]&value=[value]
To avoid security problems, this scrip will only process an update if you have previously called a PHP function
user_preference_allow_ajax_update($name, PARAM_XXX);
This sets $USER->ajax_updatable_user_prefs[$name] = PARAM_XXX;
and sesskey will only update user preferences where the appropriate key is set in the session, and it will clean the value as specified there before doing the update. |
Show » |
tjhunt committed 5 files to 'Moodle CVS' - 31/Oct/08 05:25 PM
ajax: MDL-17084 provide a way for JavaScript to update user preferences.
|
|
|
made changes - 31/Oct/08 05:25 PM
| Field |
Original Value |
New Value |
|
Resolution
|
|
Fixed
[ 1
]
|
|
Status
|
Open
[ 1
]
|
Resolved
[ 5
]
|
committed 3 files to 'Lang CVS' - 02/Nov/08 02:27 AM
MDL-17084 Translated new strings for error messages.
MDL-16341 Translated a new string for flickr plugin.
|
|
|
martignoni committed 1 file to 'Lang CVS' - 16/Nov/08 07:16 PM
|