I’m working in a Django app that listens to the signal
SignalHandler.course_published. It’s working fine, but I need to get extra data about a course, like who created/authored the course.
I looked at all course tables of MySQL and I didn’t find this information. We have the
course_overviews_courseoverview table with many information, but nothing about the creator/author.
Someone knows where can I get this information?
When we create a course, the Open edX executes this function:
def create_course(self, org, course, run, user_id, **kwargs): # lint-amnesty, pylint: disable=arguments-differ """ Creates and returns the course. Args: org (str): the organization that owns the course course (str): the name of the course run (str): the name of the run user_id: id of the user creating the course fields (dict): Fields to set on the course at initialization kwargs: Any optional arguments understood by a subset of modulestores to customize instantiation Returns: a CourseBlock """ # first make sure an existing course doesn't already exist in the mapping course_key = self.make_course_key(org, course, run) log.info('Creating course run %s...', course_key) if course_key in self.mappings and self.mappings[course_key].has_course(course_key): log.error('Cannot create course run %s. It already exists!', course_key) raise DuplicateCourseError(course_key, course_key) # create the course store = self._verify_modulestore_support(None, 'create_course') course = store.create_course(org, course, run, user_id, **kwargs) log.info('Course run %s created successfully!', course_key) # add new course to the mapping self.mappings[course_key] = store return course
course = store.create_course(org, course, run, user_id, **kwargs)
Where this data is stored? How can I get this?