Skip to content

Commit

Permalink
🗃️(core) add is_gradable boolean field to CourseRun model
Browse files Browse the repository at this point in the history
This boolean field allow a course leader to mark its session as gradable.
Gradable course runs can be used to generate a certificate.
  • Loading branch information
jbpenrath committed Apr 1, 2022
1 parent e1bf2f8 commit c3f3d63
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/backend/joanie/core/migrations/0002_courserun_is_gradable.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 4.0.3 on 2022-03-18 16:56

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("core", "0001_initial"),
]

operations = [
migrations.AddField(
model_name="courserun",
name="is_gradable",
field=models.BooleanField(default=False, verbose_name="is gradable"),
),
]
1 change: 1 addition & 0 deletions src/backend/joanie/core/models/courses.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ class CourseRun(parler_models.TranslatableModel):
choices=lazy(lambda: ALL_LANGUAGES, tuple)(),
help_text=_("The list of languages in which the course content is available."),
)
is_gradable = models.BooleanField(_("is gradable"), default=False)

class Meta:
db_table = "joanie_course_run"
Expand Down

0 comments on commit c3f3d63

Please sign in to comment.