1 |
efrain |
1 |
Description of emoji data import into Moodle.
|
|
|
2 |
|
|
|
3 |
1. Download the latest release of emoji data from https://github.com/iamcal/emoji-data/tags
|
|
|
4 |
|
|
|
5 |
2. Copy emoji_pretty.json into lib/emoji-data/
|
|
|
6 |
|
|
|
7 |
3. Run the generate_emoji_data.php script to create the new data.js file
|
|
|
8 |
E.g. php lib/emoji-data/generate_emoji_data.php > lib/amd/src/emoji/data.js
|
|
|
9 |
|
|
|
10 |
Once this command has been executed, open the newly created lib/amd/src/emoji/data.js file and make sure that the
|
|
|
11 |
emoji data has been successfully generated.
|
|
|
12 |
==================================================================================================================
|
|
|
13 |
NOTE: If the following error messages are displayed instead of the emoji data in data.js you should:
|
|
|
14 |
* 'The following categories are missing: xyz, xyz, ...'
|
|
|
15 |
1. add these categories in $categorysortorder in generate_emoji_data.php
|
|
|
16 |
2. include these categories in the emoji picker template (lib/templates/emoji/picker.mustache).
|
|
|
17 |
3. add appropriate icon mappings for these categories in get_core_icon_map() in
|
|
|
18 |
lib/classes/output/icon_system_fontawesome.php.
|
|
|
19 |
4. add language strings for these categories in lang/en/moodle.php.
|
|
|
20 |
* 'The following categories are no longer used: xyz, xyz, ...'
|
|
|
21 |
1. remove these categories from $categorysortorder in generate_emoji_data.php
|
|
|
22 |
2. remove these categories from the emoji picker template (lib/templates/emoji/picker.mustache).
|
|
|
23 |
3. remove the icon mappings for these categories in get_core_icon_map() in
|
|
|
24 |
lib/classes/output/icon_system_fontawesome.php.
|
|
|
25 |
4. remove (deprecate) the language strings for these categories in lang/en/moodle.php.
|
|
|
26 |
|
|
|
27 |
Rerun 'php lib/emoji-data/generate_emoji_data.php > lib/amd/src/emoji/data.js'
|
|
|
28 |
==================================================================================================================
|
|
|
29 |
|
|
|
30 |
4. Build the new emoji data.js file
|
|
|
31 |
E.g. grunt amd --files=lib/amd/src/emoji/data.js
|
|
|
32 |
|
|
|
33 |
5. Delete the emoji_pretty.json file from step 3
|