Preventing admins from editing questions during/after mentor application phase

In scholarx platform, admins can add questions for mentors after creating the program. User interfaces for add and edit questions are already created in the deployed version.

In the current version, admins can create/update questions in any program state. It may cause some confusions in the program.

So I’m assigned to the task “Preventing Admins from editing questions after mentor application phase”. So I’ll use this thread for updating my progress.

As I found, these are the tasks we have to do in order to complete this:

  1. Updating the backend to validate the state when updating/creating Questions
  2. Updating the frontend to make the questions uneditable in the later stages. And we have to show a message saying that the admins can’t update questions in current state.

Could you clarify these 2 statements before i start work:

  1. After completing this issue, Admins can’t create or update questions after CREATED state
  2. After completing this issue, Admins can only create or update questions when the program is in CREATED state

Issue:

cc: @jaye @Gravewalker @YohanAvishke

1 Like

Exactly

I think just removing the add text input and edit button is enough, do you think it’s necessary to show a message??

Thanks for the reply.

Ah right, then it’s okay

1 Like

I sent the WIP PR for the task.

What i have done:

  • Updated the Mentor questions UI to display the the Add Question form only in state CREATED state

@anjisvj @Gravewalker could please have a look and let me know the changes needed.

2 Likes

Updated the PR and it is ready for review.

Preview:

Sent the PR to validate the program state in backend.

1 Like