Commit f582537a authored by Alexey Beloglazov's avatar Alexey Beloglazov Committed by Ev Maslovskiy
Browse files

Issue #3316125: Ability to change name of entities

parent 3cbda1cb
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Unreleased changes
- Get rid of "flatMap" in js code to provide better compatibility with old browsers.
- #3315901: Ability to download courses to use offline. Hide questions/quizzes if a user doesn't have necessary permissions.
- #3316125: Ability to change name of entities.
- Added "getPermissions" to Settings service.
- Added "data-test" attributes for "checklist items" and "loading indicator".
- Display "loading indicator" only if a user have permissions to tick/un-tick checklist items.
+3 −0
Original line number Diff line number Diff line
@@ -22,6 +22,9 @@ PWA means "Progressive web app". After installing [pwa](https://www.drupal.org/p

To enable offline courses just install and configure "pwa" module. Configurations by default work well with Anu LMS. If you want to customize any PWA property - go to `/admin/config/pwa/settings` page.

## Custom labels for entities
Anu LMS uses different bundles to build "learning system", for example "course", "lesson", etc. If these labels don't suit you - override them on `/admin/config/anu_lms/entity_labels`.

## Development

### Installation
+5 −0
Original line number Diff line number Diff line
anu_lms.labels:
  title: 'Translations for entity labels'
  base_route_name: anu_lms.entity_labels
  names:
    - anu_lms.entity_labels
+1 −0
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@ description: Deceptively simple learning management system (LMS) for individual
type: module
package: Anu LMS
core_version_requirement: ^9.3
configure: anu_lms.entity_labels
dependencies:
  - allowed_formats:allowed_formats
  # TODO: Switch to CKEditor 5. No point in using old version.
+19 −0
Original line number Diff line number Diff line
@@ -252,3 +252,22 @@ function anu_lms_update_8240() {
function anu_lms_update_9280() {
  \Drupal::service('module_installer')->install(['paragraphs_browser']);
}

/**
 * Set default definitions for anu_lms.
 */
function anu_lms_update_9282() {
  $config_factory = \Drupal::configFactory();
  $config = $config_factory->getEditable('anu_lms.entity_labels');

  $config->set('courses_page_labels', 'Courses page|Courses pages')->save(TRUE);
  $config->set('courses_page_label_plural', 'Courses pages')->save(TRUE);
  $config->set('course_labels', 'Course|Courses')->save(TRUE);
  $config->set('course_label_plural', 'Courses')->save(TRUE);
  $config->set('lesson_labels', 'Lesson|Lessons')->save(TRUE);
  $config->set('lesson_label_plural', 'Lessons')->save(TRUE);
  $config->set('assessment_labels', 'Quiz|Quizzes')->save(TRUE);
  $config->set('assessment_label_plural', 'Quizzes')->save(TRUE);
  $config->set('module_labels', 'Module|Modules')->save(TRUE);
  $config->set('module_label_plural', 'Modules')->save(TRUE);
}
Loading