Skip to content

Commit

Permalink
Removed new structured editor flag (oppia#6780)
Browse files Browse the repository at this point in the history
  • Loading branch information
aks681 authored and nithusha21 committed May 23, 2019
1 parent 8c3b240 commit 2b29b50
Show file tree
Hide file tree
Showing 25 changed files with 1,041 additions and 1,351 deletions.
2 changes: 0 additions & 2 deletions assets/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -520,8 +520,6 @@ var constants = {

"DEFAULT_SKILL_DIFFICULTY": 0.3,

"ENABLE_NEW_STRUCTURE_EDITORS": true,

"ENABLE_PREREQUISITE_SKILLS": false,

"ENABLE_NEW_STRUCTURE_PLAYERS": false,
Expand Down
4 changes: 0 additions & 4 deletions core/controllers/feedback.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

"""Controllers for the feedback thread page."""

from constants import constants
from core.controllers import acl_decorators
from core.controllers import base
from core.domain import feedback_services
Expand Down Expand Up @@ -67,9 +66,6 @@ class ThreadListHandlerForTopicsHandler(base.BaseHandler):

@acl_decorators.can_edit_topic
def get(self, topic_id):
if not constants.ENABLE_NEW_STRUCTURE_EDITORS:
raise self.PageNotFoundException

self.values.update({
'suggestion_thread_dicts': (
[t.to_dict() for t in feedback_services.get_all_threads(
Expand Down
19 changes: 0 additions & 19 deletions core/controllers/question_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ class QuestionCreationHandler(base.BaseHandler):
@acl_decorators.can_manage_question_skill_status
def post(self, skill_id):
"""Handles POST requests."""
if not constants.ENABLE_NEW_STRUCTURE_EDITORS:
raise self.PageNotFoundException

skill_domain.Skill.require_valid_skill_id(skill_id)
skill = skill_services.get_skill_by_id(skill_id, strict=False)
if skill is None:
Expand Down Expand Up @@ -73,9 +70,6 @@ class QuestionSkillLinkHandler(base.BaseHandler):
@acl_decorators.can_manage_question_skill_status
def post(self, question_id, skill_id):
"""Links a question to a skill."""
if not constants.ENABLE_NEW_STRUCTURE_EDITORS:
raise self.PageNotFoundException

skill_domain.Skill.require_valid_skill_id(skill_id)
skill = skill_services.get_skill_by_id(skill_id, strict=False)
if skill is None:
Expand All @@ -91,9 +85,6 @@ def post(self, question_id, skill_id):
@acl_decorators.can_manage_question_skill_status
def delete(self, question_id, skill_id):
"""Unlinks a question from a skill."""
if not constants.ENABLE_NEW_STRUCTURE_EDITORS:
raise self.PageNotFoundException

question_services.delete_question_skill_link(
question_id, skill_id)
self.render_json(self.values)
Expand All @@ -107,10 +98,6 @@ class EditableQuestionDataHandler(base.BaseHandler):
@acl_decorators.can_view_question_editor
def get(self, question_id):
"""Gets the data for the question overview page."""

if not constants.ENABLE_NEW_STRUCTURE_EDITORS:
raise self.PageNotFoundException

question = question_services.get_question_by_id(
question_id, strict=False)

Expand All @@ -132,9 +119,6 @@ def get(self, question_id):
@acl_decorators.can_edit_question
def put(self, question_id):
"""Updates properties of the given question."""
if not constants.ENABLE_NEW_STRUCTURE_EDITORS:
raise self.PageNotFoundException

commit_message = self.payload.get('commit_message')

if not commit_message:
Expand Down Expand Up @@ -165,9 +149,6 @@ def put(self, question_id):
@acl_decorators.can_delete_question
def delete(self, question_id):
"""Handles Delete requests."""
if not constants.ENABLE_NEW_STRUCTURE_EDITORS:
raise self.PageNotFoundException

question = question_services.get_question_by_id(
question_id, strict=False)
if question is None:
Expand Down
Loading

0 comments on commit 2b29b50

Please sign in to comment.