Compare commits

...

1 Commits

Author SHA1 Message Date
Régis Behmo
24ee63ee0e fix: convert graded field to boolean 2023-09-21 12:20:19 +02:00
4 changed files with 5 additions and 2 deletions

View File

@ -0,0 +1 @@
- 💥[Improvement] Convert the `course_blocks.graded` field from String to Boolean. (by @regisb)

View File

@ -1,2 +1,2 @@
ALTER TABLE course_blocks
ADD COLUMN graded String DEFAULT 'false';
ADD COLUMN graded String DEFAULT 'false';

View File

@ -0,0 +1,2 @@
ALTER TABLE course_blocks
MODIFY COLUMN graded Boolean DEFAULT false;

View File

@ -42,7 +42,7 @@ def import_course(course_key):
print("======================", course_id, course.display_name)
values = [
sql_format(
"('{}', '{}', '{}', '{}', '{}', '{}', '{}')",
"('{}', '{}', '{}', '{}', '{}', '{}', {})",
course_id,
str(child.location),
child.location.block_id,