@@ -163,9 +163,6 @@ def student_view(self, context=None):
163163 """
164164 Renders student view for LMS.
165165 """
166- # to prevent a circular import issue
167- import lms .djangoapps .discussion .django_comment_client .utils as utils
168-
169166 fragment = Fragment ()
170167
171168 if not self .is_visible :
@@ -192,23 +189,21 @@ def student_view(self, context=None):
192189 ),
193190 )
194191
195- if utils .is_discussion_enabled (self .course_key ):
196- context = {
197- 'discussion_id' : self .discussion_id ,
198- 'display_name' : self .display_name if self .display_name else _ ("Discussion" ),
199- 'user' : self .django_user ,
200- 'course_id' : self .course_key ,
201- 'discussion_category' : self .discussion_category ,
202- 'discussion_target' : self .discussion_target ,
203- 'can_create_thread' : self .has_permission ("create_thread" ),
204- 'can_create_comment' : self .has_permission ("create_comment" ),
205- 'can_create_subcomment' : self .has_permission ("create_sub_comment" ),
206- 'login_msg' : login_msg ,
207- }
208- fragment .add_content (
209- self .runtime .service (self , 'mako' ).render_template ('discussion/_discussion_inline.html' , context )
210- )
211-
192+ context = {
193+ 'discussion_id' : self .discussion_id ,
194+ 'display_name' : self .display_name if self .display_name else _ ("Discussion" ),
195+ 'user' : self .django_user ,
196+ 'course_id' : self .course_key ,
197+ 'discussion_category' : self .discussion_category ,
198+ 'discussion_target' : self .discussion_target ,
199+ 'can_create_thread' : self .has_permission ("create_thread" ),
200+ 'can_create_comment' : self .has_permission ("create_comment" ),
201+ 'can_create_subcomment' : self .has_permission ("create_sub_comment" ),
202+ 'login_msg' : login_msg ,
203+ }
204+
205+ fragment .add_content (self .runtime .service (self , 'mako' ).render_template ('discussion/_discussion_inline.html' ,
206+ context ))
212207 fragment .initialize_js ('DiscussionInlineBlock' )
213208
214209 return fragment
0 commit comments