Skip to content
This repository has been archived by the owner on Dec 3, 2022. It is now read-only.

Commit

Permalink
Merge pull request #27 from tar-xzvff/invisible_problem_save_answer_b…
Browse files Browse the repository at this point in the history
…utton

回答を保存するボタンを非表示にするように変更
  • Loading branch information
tar-xzvff authored Jul 26, 2018
2 parents ca25a60 + c8d6e9c commit 38b9705
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 3 additions & 0 deletions base_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -584,3 +584,6 @@

# 最終回答を提出するボタンを制御するフラグ.
IS_SUBMIT_FINAL_ANSWER_ENABLE = False

# 回答を保存するボタンを制御するフラグ.
IS_SUBMIT_ANSWER_ENABLE = False
7 changes: 4 additions & 3 deletions course/flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -1702,9 +1702,10 @@ def add_buttons_to_form(form, fpctx, flow_session, permissions):
from crispy_forms.layout import Submit
show_save_button = getattr(form, "show_save_button", True)
if show_save_button:
form.helper.add_input(
Submit("save", _("Save answer"),
css_class="relate-save-button"))
if settings.IS_SUBMIT_ANSWER_ENABLE:
form.helper.add_input(
Submit("save", _("Save answer"),
css_class="relate-save-button"))

if will_receive_feedback(permissions):
if flow_permission.change_answer in permissions:
Expand Down

0 comments on commit 38b9705

Please sign in to comment.