Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified dev.db
Binary file not shown.
4 changes: 2 additions & 2 deletions openedx_learning/apps/core/learning_partitioning/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"""
from django.db import models

from ..learning_publishing.models import LearningObjectVersion
# from ..learning_publishing.models import LearningObjectVersion

from openedx_learning.lib.fields import hash_field, identifier_field, immutable_uuid_field

Expand Down Expand Up @@ -62,7 +62,7 @@ class Block(models.Model):

How do we decompose this? Separate tables for different aspects, like grades?
"""
learning_object_version = models.ForeignKey(LearningObjectVersion, on_delete=models.CASCADE)
# learning_object_version = models.ForeignKey(LearningObjectVersion, on_delete=models.CASCADE)


class Unit(models.Model):
Expand Down
49 changes: 37 additions & 12 deletions openedx_learning/apps/core/learning_publishing/admin.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,44 @@
from django.contrib import admin

from .models import (
LearningContext,
LearningContextVersion,
LearningContextBranch,
LearningAppVersionReport,
LearningAppContentError,
BlockType,
LearningContextBlock,
BlockContent,
BlockVersion,
)

# @admin.register(LearningContext)
# class LearningContextAdmin(admin.ModelAdmin):
# pass
@admin.register(LearningContext)
class LearningContextAdmin(admin.ModelAdmin):
pass

@admin.register(LearningContextVersion)
class LearningContextVersionAdmin(admin.ModelAdmin):
pass

@admin.register(BlockType)
class BlockTypeAdmin(admin.ModelAdmin):
pass

@admin.register(LearningContextBlock)
class LearningContextBlockAdmin(admin.ModelAdmin):
pass

@admin.register(BlockVersion)
class BlockVersionAdmin(admin.ModelAdmin):
readonly_fields = (
'title',
'start_version_num',
'end_version_num',
'content',
'block',
)


admin.site.register(LearningContext)
admin.site.register(LearningContextVersion)
admin.site.register(LearningContextBranch)
admin.site.register(LearningAppVersionReport)
admin.site.register(LearningAppContentError)
@admin.register(BlockContent)
class BlockContentAdmin(admin.ModelAdmin):
readonly_fields = (
'learning_context',
'hash_digest',
'data',
)
Loading