oasis4hedev / salsa

Web app for creating a syllabus in an accessible HTML document, publishing to the Canvas LMS, and more.
https://syllabustool.com
Other
6 stars 5 forks source link

Bugfix/select course fixes #568

Closed opsaaaaa closed 4 years ago

opsaaaaa commented 4 years ago

The context is that a request for a course has comes in from an LMS

When a document with the requested course belongs to an organization but my org_path points a separate organization in the same tree. Before: Then some of the links don't work. now: The links work and it gives you a warning that this course belongs to another organization in the tree, and by clicking 'create new' or 'use as template' you will steal the course from the existing document.

When no document matches the course and my requests org_path pointed to a sub organization. When I click create new SLASA Before: it creates the new document on the root organization And tries to redirect to the course but cant find the course on the sub organization (and see issue above) Now: It removes the course from the existing document and creates a new salsa with the course.

both the 'link course' and 'use as template' buttons have similar changes.

opsaaaaa commented 4 years ago

.1 Given that course does not exist When 'allow_existing_salsa_for_new_courses' is false. Then create a new course on that organization. When 'allow_existing_salsa_for_new_courses' is true. Then show the users document list in the course select. .2 Given the request has a document token When a course exists And does not matches the existing document Then show "use as template" or "create new salsa" .3 Given that course exists in another organization in the same tree When the user is an admin Then give them the relink options When the user is not an admin Then ask them to contact their admin. .4 Given the course exists in the same organization. Then show the editor for that document .5 Given the course exists in the same organization. And the document token matchs the courses document Then show the editor for that document