Merge pull request #4060 from edx/benmcmorran/edit-tracking
Tracks last edited date and user, and adds has_changes for blocks
This commit is contained in:
@@ -239,6 +239,6 @@ def save_course_update_items(location, course_updates, course_update_items, user
|
||||
course_updates.data = _get_html(course_update_items)
|
||||
|
||||
# update db record
|
||||
modulestore('direct').update_item(course_updates, user)
|
||||
modulestore('direct').update_item(course_updates, user.id)
|
||||
|
||||
return course_updates
|
||||
|
||||
@@ -135,7 +135,7 @@ class CourseUpdateTest(CourseTestCase):
|
||||
update_content = u"Hello world!"
|
||||
update_data = u"<ol><li><h2>" + update_date + "</h2>" + update_content + "</li></ol>"
|
||||
course_updates.data = update_data
|
||||
modulestore('direct').update_item(course_updates, self.user)
|
||||
modulestore('direct').update_item(course_updates, self.user.id)
|
||||
|
||||
# test getting all updates list
|
||||
course_update_url = self.create_update_url()
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
from xblock.fields import Scope
|
||||
|
||||
from contentstore.utils import get_modulestore
|
||||
from cms.lib.xblock.mixin import CmsBlockMixin
|
||||
|
||||
|
||||
class CourseMetadata(object):
|
||||
@@ -33,9 +32,6 @@ class CourseMetadata(object):
|
||||
result = {}
|
||||
|
||||
for field in descriptor.fields.values():
|
||||
if field.name in CmsBlockMixin.fields:
|
||||
continue
|
||||
|
||||
if field.scope != Scope.settings:
|
||||
continue
|
||||
|
||||
|
||||
@@ -33,7 +33,6 @@ from lms.envs.common import (
|
||||
from path import path
|
||||
|
||||
from lms.lib.xblock.mixin import LmsBlockMixin
|
||||
from cms.lib.xblock.mixin import CmsBlockMixin
|
||||
from dealer.git import git
|
||||
|
||||
############################ FEATURE CONFIGURATION #############################
|
||||
@@ -238,7 +237,7 @@ from xmodule.x_module import XModuleMixin
|
||||
|
||||
# This should be moved into an XBlock Runtime/Application object
|
||||
# once the responsibility of XBlock creation is moved out of modulestore - cpennington
|
||||
XBLOCK_MIXINS = (LmsBlockMixin, CmsBlockMixin, InheritanceMixin, XModuleMixin)
|
||||
XBLOCK_MIXINS = (LmsBlockMixin, InheritanceMixin, XModuleMixin)
|
||||
|
||||
# Allow any XBlock in Studio
|
||||
# You should also enable the ALLOW_ALL_ADVANCED_COMPONENTS feature flag, so that
|
||||
|
||||
@@ -19,11 +19,3 @@ class DateTuple(Field):
|
||||
return None
|
||||
|
||||
return list(value.timetuple())
|
||||
|
||||
|
||||
class CmsBlockMixin(XBlockMixin):
|
||||
"""
|
||||
Mixin with fields common to all blocks in Studio
|
||||
"""
|
||||
published_date = DateTuple(help="Date when the module was published", scope=Scope.settings)
|
||||
published_by = Integer(help="Id of the user who published this module", scope=Scope.settings)
|
||||
|
||||
Reference in New Issue
Block a user