diff --git a/app/controllers/configurations_controller.rb b/app/controllers/configurations_controller.rb --- a/app/controllers/configurations_controller.rb +++ b/app/controllers/configurations_controller.rb @@ -24,6 +24,16 @@ end end + def set_exam_right + value = params[:value] || 'false' + GraderConfiguration.where(key: "right.bypass_agreement").update(value: value); + GraderConfiguration.where(key: "right.multiple_ip_login").update(value: value); + GraderConfiguration.where(key: "right.user_hall_of_fame").update(value: value); + GraderConfiguration.where(key: "right.user_view_submission ").update(value: value); + GraderConfiguration.where(key: "right.view_testcase ").update(value: value); + redirect_to :action => 'index' + end + private def configuration_params params.require(:grader_configuration).permit(:key,:value_type,:value,:description)