Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

startController: add 'return to start location' feature #2541

Closed
moloko opened this issue Oct 4, 2019 · 2 comments · Fixed by #2616
Closed

startController: add 'return to start location' feature #2541

moloko opened this issue Oct 4, 2019 · 2 comments · Fixed by #2616
Assignees

Comments

@moloko
Copy link
Contributor

moloko commented Oct 4, 2019

Most of the courses that we build which include an 'intro page' (or pages) have some kind of 'back to intro' button contained in them.

It would be handy if the startController module offered some way of handling much of the logic for you, something like:

Adapt.startController.returnToStartLocation(alwaysForce:Boolean, dontSkipCompleted:Boolean);
@moloko moloko self-assigned this Oct 4, 2019
@moloko
Copy link
Contributor Author

moloko commented Oct 4, 2019

Just thinking: perhaps the arguments even necessary? I'm struggling to think of an example of when you might want alwaysForce and dontSkipComplete to be false? So maybe it should just be:

Adapt.startController.returnToStartLocation();

Thoughts welcome!

@oliverfoster
Copy link
Member

Agree

moloko added a commit that referenced this issue Feb 3, 2020
* added 'returnToStartLocation', resolves #2541

* tidy up code to remove need for if/else blocks
and some redundant variables, ternary statements
add jsdoc comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants