-
Notifications
You must be signed in to change notification settings - Fork 17
[FC- 0049] feat: Features to enable import/export courses #172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
bradenmacdonald
merged 10 commits into
openedx:main
from
open-craft:chris/FAL-3604-import-export-courses
Mar 28, 2024
Merged
Changes from 6 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
0b99842
feat: Features to enable import/export courses
ChrisChV e8dbe2a
style: Nits for lint
ChrisChV 176dfb2
style: Nits and comments
ChrisChV 6622e40
test: Tests for new features
ChrisChV a8d0d05
chore: bump version
ChrisChV 980ed3d
chore: Rename migration
ChrisChV d966b13
refactor: Update language taxonomy export_id
ChrisChV c85cfc8
feat: Add conditions to avoid create Tags with ';'
ChrisChV 6ae7604
style: Nits and typos
ChrisChV 3837d62
refactor: Add RESERVED_TAG_CHARS
ChrisChV File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| """ | ||
| Open edX Learning ("Learning Core"). | ||
| """ | ||
| __version__ = "0.7.0" | ||
| __version__ = "0.8.0" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
openedx_tagging/core/tagging/migrations/0016_object_tag_export_id.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| # Generated by Django 3.2.22 on 2024-03-22 19:47 | ||
|
|
||
| import django.db.models.deletion | ||
| from django.db import migrations, models | ||
|
|
||
| import openedx_learning.lib.fields | ||
|
|
||
|
|
||
| def migrate_export_id(apps, schema_editor): | ||
| ObjectTag = apps.get_model("oel_tagging", "ObjectTag") | ||
| for object_tag in ObjectTag.objects.all(): | ||
| if object_tag.taxonomy: | ||
| object_tag.export_id = object_tag.taxonomy.export_id | ||
| object_tag.save(update_fields=["_export_id"]) | ||
|
|
||
|
|
||
| def reverse(apps, schema_editor): | ||
| pass | ||
|
|
||
|
|
||
| class Migration(migrations.Migration): | ||
|
|
||
| dependencies = [ | ||
| ('oel_tagging', '0015_taxonomy_export_id'), | ||
| ] | ||
|
|
||
| operations = [ | ||
| migrations.RenameField( | ||
| model_name='objecttag', | ||
| old_name='_name', | ||
| new_name='_export_id', | ||
| ), | ||
| migrations.RunPython(migrate_export_id, reverse), | ||
| migrations.AlterField( | ||
| model_name='objecttag', | ||
| name='taxonomy', | ||
| field=models.ForeignKey(blank=True, default=None, help_text="Taxonomy that this object tag belongs to. Used for validating the tag and provides the tag's 'name' if set.", null=True, on_delete=django.db.models.deletion.SET_NULL, to='oel_tagging.taxonomy'), | ||
| ), | ||
| migrations.AlterField( | ||
| model_name='objecttag', | ||
| name='_export_id', | ||
| field=openedx_learning.lib.fields.MultiCollationCharField(db_collations={'mysql': 'utf8mb4_unicode_ci', 'sqlite': 'NOCASE'}, help_text='User-facing label used for this tag, stored in case taxonomy is (or becomes) null. If the taxonomy field is set, then taxonomy.export_id takes precedence over this field.', max_length=255), | ||
| ), | ||
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.