@require_global_staff
@require_POST
def enable_certificate_generation(request, course_id=None):
 course_key = CourseKey.from_string(course_id)
 is_enabled = (request.POST.get('certificates-enabled', 'false') == 'true')
 certs_api.set_cert_generation_enabled(course_key, is_enabled)
 return redirect(_instructor_dash_url(course_key, section='certificates'))

@ require_global_staff @ require_POST def enable_certificate_generation ( request , course_id = None ) : course_key = CourseKey . from_string ( course_id ) is_enabled = ( request . POST . get ( 'certificates-enabled' , 'false' ) == 'true' ) certs_api . set_cert_generation_enabled ( course_key , is_enabled ) return redirect ( _instructor_dash_url ( course_key , section = 'certificates' ) )
enable/disable self-generated certificates for a course .