Hide due/release dates on course outline in Studio.

ECOM-2443
This commit is contained in:
Peter Fogg
2015-10-05 11:51:02 -04:00
parent dc7f09fc0e
commit 15d77fda3f
5 changed files with 73 additions and 14 deletions

View File

@@ -584,6 +584,10 @@ define(['jquery', 'backbone', 'underscore', 'gettext', 'js/views/baseview',
editors.push(VerificationAccessEditor);
}
}
/* globals course */
if (course.get('self_paced')) {
editors = _.without(editors, ReleaseDateEditor, DueDateEditor);
}
return new SettingsXBlockModal($.extend({
editors: editors,
model: xblockInfo

View File

@@ -89,6 +89,7 @@ define(["jquery", "underscore", "gettext", "js/views/baseview", "common/js/compo
}, true);
defaultNewChildName = childInfo.display_name;
}
/* globals course */
return {
xblockInfo: xblockInfo,
visibilityClass: XBlockViewUtils.getXBlockVisibilityClass(xblockInfo.get('visibility_state')),
@@ -104,7 +105,8 @@ define(["jquery", "underscore", "gettext", "js/views/baseview", "common/js/compo
isCollapsed: isCollapsed,
includesChildren: this.shouldRenderChildren(),
hasExplicitStaffLock: this.model.get('has_explicit_staff_lock'),
staffOnlyMessage: this.model.get('staff_only_message')
staffOnlyMessage: this.model.get('staff_only_message'),
course: course
};
},