Skip to content

Warn when deleting a document that is used by a learning path #4454

Open
@ywarnier

Description

@ywarnier

Currently (1.11.16), it is possible to delete a document from the documents tool even if the document is actively used in a learning path.

Add a visual warning and a confirmation button when trying to delete a document and finding it is in use in the c_lp_item.path table for the same course. The warning should be something like:

$DocumentDeletionWarningUsedInLP = "The document (or one of the documents) you are trying to delete is currently used (at least) in learning path %s. Deleting it will create an inconsistency to your learners by showing a 'Page not found' message instead of the document wherever it was used in the learning path. Instead, you could edit the document or use the 'Replace document' icon to replace it with a white page or an explanation about why it has been removed. Are you sure you want to delete it?"

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions