Upload users + htmleditor

Re: Upload users + htmleditor

by AL Rachels -
Number of replies: 0
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Hi All,

The htmleditor setting is a preference and is NOT kept in the mdl_user table of your Moodle database, which is why the CSV file does not support changing the htmleditor. Instead, the editor preference is kept in the mdl_user_preferences table of your Moodle database.

@Tim - Since you say you do not have access to the database, are you able to install plugins? If so, install the adminer plugin, and use it to get to the table.

If you can get adminer installed, you can use it to export JUST the mdl_user_preferences table of your Moodle database as an SQL file. Also use adminer to look for and get the id number for the '500' users you want to change. Edit the exported mdl_user_preferences sql file and add a row for each of  the 500 users with the preference set to atto. Import your altered file. When those users next edit something, the editor will be atto.

I have tested this and it works. Note: I used a copy of the original exported file, so I could put the table back like it WAS, if things went haywire! I used LibreOffice and copied and pasted as "text" to get the correct format. When adding the new entries to the end of the sql file, make sure that the original last row ends with a comma, along with each new row, and your new last row ends with a semi colon. Make sure each new line has a unique, one digit greater, id number. Import your new file with adminer and verify your results are correct.

Another note: When I was making my new rows, I did it in LO Calc so I could use the drag and copy function to auto increment my new row numbers and user id's. Just had to make sure the first row was set to the correct beginning numbers.

HTH

AL

Average of ratings: Useful (1)