minnojs / minno-dashboard

Client-side of minno’s study management and authoring tool
1 stars 2 forks source link

Create new study from template #88

Closed baranan closed 7 years ago

baranan commented 7 years ago

In the 'Add new study' [which should be renamed to Create New Study] window, add a button 'Duplicate Existing Example Study'. That button will open a menu of studies.

That menu will be defined in a file similar to the one used for the "Create file" menu (https://github.com/ProjectImplicit/researchDashboard/blob/master/src/study/files/sidebar/wizardHash.js).

The list items in each sub-menu will in the format of name:study-path. For instance: 'Empty': '/implicit/user/yba/wizards/empty',

To implement this creation, use the "duplicate study" method. Still, make sure to allow duplicating only studies that the user is permitted to access (has a 'read' permission). I will make sure that the studies that I add to that file will be public. However, do not limit this to 'public' studies only. Limit the permission to duplicate to studies that the user is permitted to read. If the user is not permitted to duplicate, it will be great if you show the study name grayed-out, but it is also fine if instead you wait until they choose to duplicate the study, and then show them an error message if they are not allowed to duplicate. In general, this would probably not happen because the person editing the hash file (me, for now), will try to make sure it includes only public studies.