Picture of Nicolas Kønig
First page under menu is not locked
by Nicolas Kønig - Friday, 7 January 2022, 4:01 PM
 

Hi I'm using sequential locking on a course with different sub menus.

 

Apparently the sequential locking is not locking the first page in each submenu. Do anyone know if that is intended?

 setSequentialLocking() {
    const children = this.getAvailableChildModels();
    const firstChild = children.shift();
    children.reduce((previousChild, child) => {
      const isLockedByPreviousChild = (!previousChild.get('_isComplete') && !previousChild.get('_isOptional'));
      return child.set('_isLocked', isLockedByPreviousChild);
    }, firstChild);
  }
 
When combining submenus and pages the first page under a sub menu will never get locked. 
I need it to be locked until a last page under a previous submenu is completed. Anyone has an idea of how to do that?
Picture of Barry Jenkin
Re: First page under menu is not locked
by Barry Jenkin - Monday, 10 January 2022, 1:53 AM
 

In the AT, for the unlocked page you can apply a Menu lock type of 'custom' and specify id of the pre-requisite page in Locked by field.

Picture of Nicolas Kønig
Re: First page under menu is not locked
by Nicolas Kønig - Monday, 10 January 2022, 9:20 AM
 

Hi Barry, thank you so much for your reply.

That is a good idea, but do you know if it is intended that when you use sequential locking on the course and on menus then the first page after a menu will not be locked? All other pages are locked untill the previous page is completed but some how the first page after a menu is not locked. It is a good idea to use custom locking, but I would prefer to use sequential locking, and I don't understand whether this is a bug or it is an intended feature that I just don't understand :)

Thanks again for taking the time!

Picture of Oliver Foster
Re: First page under menu is not locked
by Oliver Foster - Monday, 10 January 2022, 10:23 AM
 

It looks like a bug. Could you make a new issue on the adapt-contrib-core repo please?

https://github.com/adaptlearning/adapt-contrib-core/issues