Comments (11)
Django uses integers as primary keys by default. I prefer the use of a uuid4. Is this worth considering for these models? It prevents confusion and conflicts during import, export, and distributed storage.
from lore.
I'm not sure about the implications in Django but I like the idea and we need uuid-s - It's currently separate from the primary key https://goo.gl/gmpedb.
from lore.
In the past, I've subclassed Django's models.Model
to one that automatically uses UUIDs as the primary key, and automatically stores the date created (auto_now_add=True
) and the last modified date (auto_now=True
). Also, a "notes" field about any modifications made by admins, and foreign keys to the user who created and last modified them.
(Then used this model everywhere instead of models.Model
).
from lore.
That sounds good for inheriting from a common model with extra fields. A question about the database model, is uuid in the diagram supposed to be equivalent to the OLX "url_name" that is often, but not always, a uuid? If so, we need to make sure that we don't use that uuid as a PK since there will be duplicates among different courses, and xbundle, for example, will strip those out and replace them with "human readable" IDs. If it isn't, what is the difference between the loid and the uuid, shouldn't both of them uniquely identify an object?
from lore.
Some say it's tricky in Django: http://stackoverflow.com/a/3944247
from lore.
@carsongee, in the current diagram uuid is machine generated.
from lore.
Some details about the LearningObject schema :
name | comment |
---|---|
loid | Primary key ID , numeric |
cid | Course ID |
rid | Repository ID |
type | Learning object type (chapter, sequential, vertical, video, html etc.) |
uuid | UUID , uniquely identifying a learning object across LORE instances |
title | learning object title, extracted from xml |
description | user generated title/description |
contentxml | the XML content of the learning object |
pathxml | the xpath of this el in the xml doc (I think module_id here https://goo.gl/LE6Vmn |
mpath | the materialized path |
urlpath | the url to get to this learning object ("path" here https://goo.gl/LE6Vmn) |
parentid | the parent ID of this element |
copyright | string for now |
xa_nr_views | nr of student views for this element (will come from analytics service) |
xa_nr_attempts | nr of attempts (applies to items of type "problem" only) |
xa_avg_grade | average grade (applies to items of type "problem" only) |
xa_histogram_grade | histogram of grades (json type ?) |
from lore.
I'm changing some of the field names:
https://gist.github.com/trski/6ea8c8afb4f783c71b42
Just included some '_' for readability for the python variables and changed 'when' to 'date' so we know the field is a date type.
from lore.
👍
from lore.
I believe this was closed by #10. @Ferdi are you OK with that?
from lore.
I think it's good for now. We can always open new issues for improvements / fixes.
from lore.
Related Issues (20)
- Use webpack for javascript pipeline
- Replace use of the term "haystack" in code and comments
- Improper syntax specification in README.rst
- Hierarchical / multilevel vocabularies
- Preserve metadata during import/export to/from edx HOT 3
- Uniquely identify learning resources
- Identify duplicates / similar learning resources
- Lightweight preview
- manage source code, like LaTeX and .ai files
- Integrate with xanalytics system HOT 1
- keep a history of exports
- include a manifest file with exports
- Sort vocabularies in learning resource panel
- Integrate django-server-status HOT 1
- Allow user to export an importable course
- If user presses escape while in a confirmation dialog, the dialog appears twice and the screen gets progressively darker
- LORE Release HOT 1
- Trigger deployments using Heroku rather than TravisCI
- [Learning resource panel] If user choose a vocabulary name like ``(((()`` and exit panel without saving data it is not showing warning message.
- Add dockerignore HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lore.