Problem/Motivation

We need those to ensure data is correct and exceptions are thrown if someone / something is trying to save an entity with incorrect / missing data. Use entity preSave methods.

Remaining tasks

  1. Lesson and lesson status: don't allow saving without activities set.
  2. Course: don't allow saving without lessons set.

User interface changes

Course Lessons and Lesson Activities fields will be required.

Issue fork lms-3479063

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

graber created an issue. See original summary.

graber’s picture

Issue summary: View changes

arunsahijpal made their first commit to this issue’s fork.

arunsahijpal’s picture

How to reproduce this issue?

graber’s picture

The obvious way: for example save a Course with empty lessons.

catch’s picture

We should be able to use entity constraints for this.

graber’s picture

Assigned: Unassigned » graber

graber’s picture

Assigned: graber » Unassigned
Status: Active » Needs review

@catch, we can still implement some constraints - these will prevent edition of an entity. So far I prevented deletion and added some warnings on edition attempts. Pls check when you'll have some time.
I may add some automated tests later.

  • graber committed 2824a065 on 1.0.x
    Issue #3479063: Add data integrity checks
    
graber’s picture

Status: Needs review » Fixed
graber’s picture

Thanks for reviewing!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.