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

"Exercises" tab in the course page: "Add an exercise" #162

Open
ayaankazerouni opened this issue Jul 8, 2020 · 2 comments
Open

"Exercises" tab in the course page: "Add an exercise" #162

ayaankazerouni opened this issue Jul 8, 2020 · 2 comments

Comments

@ayaankazerouni
Copy link
Member

Include a button to "add an exercise" in the exercises tab on the course page. It should take the user to the exercise form and have the "visible to" drop down pre-filled with the course's user_group.

@andrearosr
Copy link

Hello, is this issue up for grabs? I'd like to contribute!
Also, this other issue may be a duplicate? #131 (though there are other feature suggestions in the description, I think the main ask is to have an "Add an exercise" button

@ayaankazerouni
Copy link
Member Author

Hi @andrearosr,

Thanks for thinking of contributing!

this other issue may be a duplicate? #131

No, that's not a duplicate, but they are closely related—that issue is asking about giving users the ability to create new exercises (at the moment, only admins can). This issue is saying that whoever has the ability to create exercises, they should be able to do so from the course page.

So adding this button to the course show page entails a few things:

  • Actually showing the button if current_user.can? :create, Exercise(i.e., if the user as the permission to create exercises, according to abilities.rb)
  • Taking the user to the exercise form
  • The form has a dropdown menu which selects which exercise_collection the exercise should be placed in. Each exercise_collection is currently mapped to a user_group, which is in turn mapped to a course. Hence, the badly worded issue above says that the drop down menu should be "pre-filled with the course's user_group.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants