Files
edx-platform/lms/djangoapps/dashboard/models.py
Amir Qayyum Khan 9124933925 Fixed issue where git logs aren't functioning
Use the course key as the primary key for storing coure import logs in
mongo, instead of the deprecated course key (this only applies to
courses imported via git_import.py).

No effort is made to migrate existing logs, since they are ephemeral.
2018-10-02 21:01:20 +05:00

22 lines
853 B
Python

"""Models for dashboard application"""
import mongoengine
from xmodule.modulestore.mongoengine_fields import CourseKeyField
class CourseImportLog(mongoengine.Document):
"""Mongoengine model for git log"""
course_id = CourseKeyField(max_length=128)
# NOTE: this location is not a Location object but a pathname
location = mongoengine.StringField(max_length=168)
import_log = mongoengine.StringField(max_length=20 * 65535)
git_log = mongoengine.StringField(max_length=65535)
repo_dir = mongoengine.StringField(max_length=128)
commit = mongoengine.StringField(max_length=40, null=True)
author = mongoengine.StringField(max_length=500, null=True)
date = mongoengine.DateTimeField()
created = mongoengine.DateTimeField()
meta = {'indexes': ['course_id', 'created'],
'allow_inheritance': False}