'Generate a new Loncapa Problem'

def new_lcp(self, state, text=None):

    if (text is None):
        text = self.data
    capa_system = LoncapaSystem(ajax_url=self.runtime.ajax_url, anonymous_student_id=self.runtime.anonymous_student_id, cache=self.runtime.cache, can_execute_unsafe_code=self.runtime.can_execute_unsafe_code, get_python_lib_zip=self.runtime.get_python_lib_zip, DEBUG=self.runtime.DEBUG, filestore=self.runtime.filestore, i18n=self.runtime.service(self, 'i18n'), node_path=self.runtime.node_path, render_template=self.runtime.render_template, seed=self.runtime.seed, STATIC_URL=self.runtime.STATIC_URL, xqueue=self.runtime.xqueue, matlab_api_key=self.matlab_api_key)
    return LoncapaProblem(problem_text=text, id=self.location.html_id(), state=state, seed=self.seed, capa_system=capa_system, capa_module=self)
