diff --git a/physionet-django/static/sample/create.json b/physionet-django/static/sample/create.json new file mode 100644 index 0000000000..4b195a0095 --- /dev/null +++ b/physionet-django/static/sample/create.json @@ -0,0 +1,23 @@ +{ + "op_trainings": { + "version": "float", + "contents": [ + { + "body": "string", + "order": "integer" + } + ], + "quizzes": [ + { + "question": "string", + "order": "string", + "choices": [ + { + "body": "string", + "is_correct": "boolean" + } + ] + } + ] + } +} \ No newline at end of file diff --git a/physionet-django/training/fixtures/demo-training.json b/physionet-django/training/fixtures/demo-training.json new file mode 100644 index 0000000000..a2dda6982b --- /dev/null +++ b/physionet-django/training/fixtures/demo-training.json @@ -0,0 +1,435 @@ +[ + { + "model": "training.onplatformtraining", + "pk": 1, + "fields": { + "training_type": 2, + "version": 1.0 + } + }, + { + "model": "training.module", + "pk": 1, + "fields": { + "name": "The Americas", + "description": "Learn about the Americas, including North and South America, Asia and Africa.", + "training": 1, + "order": 1 + } + }, + { + "model": "training.contentblock", + "pk": 1, + "fields": { + "module": 1, + "body": "
The Americas are comprised of two continents: North America and South America. These continents are connected by a narrow strip of land called the Isthmus of Panama. Together, North and South America span from the Arctic Circle in the north to Cape Horn in the south.
\n\nNorth America is home to three large countries: Canada, the United States, and Mexico. It also includes several smaller countries in Central America and the Caribbean. The continent is known for its diverse landscapes, ranging from frozen tundras in the north to tropical rainforests in the south.
\n\nSouth America is made up of twelve countries, including Brazil, Argentina, and Colombia. It is known for its stunning natural beauty, including the Amazon rainforest and the Andes mountain range. The continent also has a rich cultural heritage, with vibrant cities and ancient ruins.
", + "order": 1 + } + }, + { + "model": "training.contentblock", + "pk": 1, + "fields": { + "module": 1, + "body": "The Americas are comprised of two continents: North America and South America. These continents are connected by a narrow strip of land called the Isthmus of Panama. Together, North and South America span from the Arctic Circle in the north to Cape Horn in the south.
\n\nNorth America is home to three large countries: Canada, the United States, and Mexico. It also includes several smaller countries in Central America and the Caribbean. The continent is known for its diverse landscapes, ranging from frozen tundras in the north to tropical rainforests in the south.
\n\nSouth America is made up of twelve countries, including Brazil, Argentina, and Colombia. It is known for its stunning natural beauty, including the Amazon rainforest and the Andes mountain range. The continent also has a rich cultural heritage, with vibrant cities and ancient ruins.
", + "order": 2 + } + }, + { + "model": "training.quiz", + "pk": 1, + "fields": { + "module": 1, + "question": "Which two continents make up the Americas?(Answer : North America and South America)", + "order": 3 + } + }, + { + "model": "training.quizchoice", + "pk": 1, + "fields": { + "quiz": 1, + "body": "Europe and Asia", + "is_correct": false + } + }, + { + "model": "training.quizchoice", + "pk": 2, + "fields": { + "quiz": 1, + "body": "Africa and Australia", + "is_correct": false + } + }, + { + "model": "training.quizchoice", + "pk": 3, + "fields": { + "quiz": 1, + "body": "North America and South America", + "is_correct": true + } + }, + { + "model": "training.quizchoice", + "pk": 4, + "fields": { + "quiz": 1, + "body": "Antarctica and South America", + "is_correct": false + } + }, + { + "model": "training.quiz", + "pk": 2, + "fields": { + "module": 1, + "question": "What connects North America and South America?(Answer : The Isthmus of Panama)", + "order": 4 + } + }, + { + "model": "training.quizchoice", + "pk": 5, + "fields": { + "quiz": 2, + "body": "The Isthmus of Panama", + "is_correct": true + } + }, + { + "model": "training.quizchoice", + "pk": 6, + "fields": { + "quiz": 2, + "body": "The Strait of Gibraltar", + "is_correct": false + } + }, + { + "model": "training.quizchoice", + "pk": 7, + "fields": { + "quiz": 2, + "body": "The Suez Canal", + "is_correct": false + } + }, + { + "model": "training.quizchoice", + "pk": 8, + "fields": { + "quiz": 2, + "body": "The Bering Strait", + "is_correct": false + } + }, + { + "model": "training.quiz", + "pk": 3, + "fields": { + "module": 1, + "question": "Which is NOT a large country in North America?(Answer : Cuba)", + "order": 5 + } + }, + { + "model": "training.quizchoice", + "pk": 9, + "fields": { + "quiz": 3, + "body": "Canada", + "is_correct": false + } + }, + { + "model": "training.quizchoice", + "pk": 10, + "fields": { + "quiz": 3, + "body": "United States", + "is_correct": false + } + }, + { + "model": "training.quizchoice", + "pk": 11, + "fields": { + "quiz": 3, + "body": "Mexico", + "is_correct": false + } + }, + { + "model": "training.quizchoice", + "pk": 12, + "fields": { + "quiz": 3, + "body": "Cuba", + "is_correct": true + } + }, + { + "model": "training.contentblock", + "pk": 3, + "fields": { + "module": 1, + "body": "The Americas, also known as America, are lands of the Western Hemisphere composed of numerous entities and regions variably defined by geography, politics, and culture1. The Americas are recognized in the English-speaking world to include two separate continents: North America and South America1.
\n\nThe Americas have more than 1.014 billion inhabitants and boast an area of over 16.43 million square miles2. The Americas comprise 35 countries, including some of the world’s largest countries as well as several dependent territories2.
\n", + "order": 6 + } + }, + { + "model": "training.quiz", + "pk": 4, + "fields": { + "module": 1, + "question": "Which of the following is NOT a country in the Americas? (Answer : India)", + "order": 7 + } + }, + { + "model": "training.quizchoice", + "pk": 13, + "fields": { + "quiz": 4, + "body": "Canada", + "is_correct": false + } + }, + { + "model": "training.quizchoice", + "pk": 14, + "fields": { + "quiz": 4, + "body": "Mexico", + "is_correct": false + } + }, + { + "model": "training.quizchoice", + "pk": 15, + "fields": { + "quiz": 4, + "body": "Brazil", + "is_correct": false + } + }, + { + "model": "training.quizchoice", + "pk": 16, + "fields": { + "quiz": 4, + "body": "India", + "is_correct": true + } + }, + { + "model": "training.contentblock", + "pk": 4, + "fields": { + "module": 1, + "body": "The Americas are a group of countries in the Western Hemisphere. They are also known as America.
\n\nThere are two continents in the Americas: North America and South America. They are connected by the Isthmus of Panama.
", + "order": 8 + } + }, + { + "model": "training.contentblock", + "pk": 5, + "fields": { + "module": 1, + "body": "North America is home to three large countries: Canada, the United States, and Mexico. It also includes several smaller countries in Central America and the Caribbean. The continent is known for its diverse landscapes, ranging from frozen tundras in the north to tropical rainforests in the south.
", + "order": 9 + } + }, + { + "model": "training.contentblock", + "pk": 6, + "fields": { + "module": 1, + "body": "South America is made up of twelve countries, including Brazil, Argentina, and Colombia. It is known for its stunning natural beauty, including the Amazon rainforest and the Andes mountain range. The continent also has a rich cultural heritage, with vibrant cities and ancient ruins.
", + "order": 10 + } + }, + { + "model": "training.contentblock", + "pk": 7, + "fields": { + "module": 1, + "body": "As our course on World 101: Introduction to Continents and Countries comes to an end, I would like to take this opportunity to thank each and every one of you for your participation and engagement throughout the course.
\n\nIt has been a pleasure to share this journey with you and I hope that the knowledge and insights gained during our time together will serve you well in your future endeavors.
\n\nThank you for making this course a success. I wish you all the best in your future studies and pursuits.
\n", + "order": 11 + } + }, + { + "model": "training.module", + "pk": 2, + "fields": { + "training": 1, + "name": "Wondering about Europe?", + "description": "Europe is a continent located in the Northern Hemisphere. It is bordered by the Arctic Ocean to the north, the Atlantic Ocean to the west, and the Mediterranean Sea to the south. It is also connected to Asia by the Ural Mountains and the Caspian Sea.", + "order": 2 + } + }, + { + "model": "training.contentblock", + "pk": 8, + "fields": { + "module": 2, + "body": "Europe is a continent located in the Northern Hemisphere. It is bordered by the Arctic Ocean to the north, the Atlantic Ocean to the west, and the Mediterranean Sea to the south. It is also connected to Asia by the Ural Mountains and the Caspian Sea.
\n\nEurope is home to a diverse range of cultures, landscapes, and languages. It is also the second-smallest continent in the world, with a total area of 3.93 million square miles (10.2 million square kilometers).
\n", + "order": 1 + } + }, + { + "model": "training.contentblock", + "pk": 9, + "fields": { + "module": 2, + "body": "Europe is made up of 50 countries. The largest by area is Russia, while the smallest is Monaco. The continent is also home to many important cities, including London, Paris, and Istanbul.
\n", + "order": 2 + } + }, + { + "model": "training.contentblock", + "pk": 10, + "fields": { + "module": 2, + "body": "Europe is the second most populous continent in the world, with a population of 741 million. It is also home to many of the world’s most well-known historical sites, including Stonehenge, the Parthenon, and the Colosseum.
\n", + "order": 3 + } + }, + { + "model": "training.contentblock", + "pk": 11, + "fields": { + "module": 2, + "body": "Europe is also known for its diverse landscapes. It is home to the highest mountain in the world, Mount Everest, as well as the lowest point on land, the Dead Sea. It is also home to the world’s largest ice sheet, the Greenland ice sheet.
\n", + "order": 4 + } + }, + { + "model": "training.contentblock", + "pk": 12, + "fields": { + "module": 2, + "body": "The continent is also home to some of the world’s largest lakes, including Lake Superior and Lake Baikal. It is also home to the world’s largest river, the Amazon.
\n", + "order": 5 + } + }, + { + "model": "training.contentblock", + "pk": 13, + "fields": { + "module": 2, + "body": "Europe is also home to many of the world’s most well-known cities. London, Paris, and Rome are some of the most famous cities in the world. They are also home to many of the world’s most famous landmarks, including the Eiffel Tower, the Colosseum, and the Parthenon.
\n", + "order": 6 + } + }, + { + "model": "training.contentblock", + "pk": 14, + "fields": { + "module": 2, + "body": "Europe is also home to many of the world’s most famous museums. The Louvre in Paris is one of the most famous museums in the world. It is also home to many of the world’s most famous works of art, including the Mona Lisa and the Venus de Milo.
\n", + "order": 7 + } + }, + { + "model": "training.contentblock", + "pk": 15, + "fields": { + "module": 2, + "body": "Europe is also home to many of the world’s most famous landmarks. The Eiffel Tower in Paris is one of the most famous landmarks in the world. It is also home to many of the world’s most famous works of art, including the Mona Lisa and the Venus de Milo.
\n", + "order": 8 + } + }, + { + "model": "training.quiz", + "pk": 5, + "fields": { + "module": 2, + "question": "Which of the following countries is NOT located in Europe? (Answer: Nepal)", + "order": 9 + } + }, + { + "model": "training.quizchoice", + "pk": 17, + "fields": { + "quiz": 5, + "body": "France", + "is_correct": false + } + }, + { + "model": "training.quizchoice", + "pk": 18, + "fields": { + "quiz": 5, + "body": "Nepal", + "is_correct": true + } + }, + { + "model": "training.quizchoice", + "pk": 19, + "fields": { + "quiz": 5, + "body": "Spain", + "is_correct": false + } + }, + { + "model": "training.quizchoice", + "pk": 20, + "fields": { + "quiz": 5, + "body": "Germany", + "is_correct": false + } + }, + { + "model": "training.quiz", + "pk": 6, + "fields": { + "module": 2, + "question": "Which of the following countries is NOT located in Africa?(Answer: Nepal)", + "order": 10 + } + }, + { + "model": "training.quizchoice", + "pk": 21, + "fields": { + "quiz": 6, + "body": "Egypt", + "is_correct": false + } + }, + { + "model": "training.quizchoice", + "pk": 22, + "fields": { + "quiz": 6, + "body": "Nepal", + "is_correct": true + } + }, + { + "model": "training.quizchoice", + "pk": 23, + "fields": { + "quiz": 6, + "body": "Zimbabwe", + "is_correct": false + } + }, + { + "model": "training.quizchoice", + "pk": 24, + "fields": { + "quiz": 6, + "body": "Cameroon", + "is_correct": false + } + } +] diff --git a/physionet-django/training/fixtures/example-training-create.json b/physionet-django/training/fixtures/example-training-create.json new file mode 100644 index 0000000000..ed53dee0a7 --- /dev/null +++ b/physionet-django/training/fixtures/example-training-create.json @@ -0,0 +1,47 @@ +{ + "name": "On Platform Training 1", + "description": "Test content description", + "valid_duration": "1095 00:00:00", + "required_field": 2, + "home_page": "http://localhost:8000/training/", + "op_trainings": { + "version": "1.0", + "modules": [ + { + "name": "Module 1", + "description": "
Module description", + "order": 0, + "contents": [ + { + "body": "
Hello This is a test
Test content1
Test content description Updated", + "valid_duration": "1095 00:00:00", + "required_field": 2, + "home_page": "http://localhost:8000/training/", + "op_trainings": { + "version": "1.1", + "modules": [ + { + "name": "Module 1 Updated", + "description": "
Test content description Updated", + "order": 0, + "contents": [ + { + "body": "
Hello This is a test
Test content1 updated
Join us for an exciting journey around the globe as we explore the continents and countries that make up our world. In this training, you’ll learn about the geography, culture, and history of different regions and gain a deeper understanding of our interconnected world.
\n\nWhat You Will Learn:
\n\nPrerequisites:
\n\nDon’t miss this opportunity to expand your horizons and discover the fascinating world we live in. Our experienced instructors will guide you through this engaging training, providing insights and knowledge along the way. Sign up now to reserve your spot!
\n\nContact: For more information or to register for this training, please contact us at training@discoveringtheworld.com or call us at 555-1234.
\n", + "home_page": "/", + "valid_duration": "1095 00:00:00", + "required_field": 2, + "questions": [ + 1, + 2, + 3, + 4, + 5 + ] + } + }, { "model": "user.question", "pk": 1, diff --git a/physionet-django/user/fixtures/demo-user.json b/physionet-django/user/fixtures/demo-user.json index 1ad2655767..38991dfb3f 100644 --- a/physionet-django/user/fixtures/demo-user.json +++ b/physionet-django/user/fixtures/demo-user.json @@ -14471,6 +14471,11 @@ "can_review_training", "user", "trainingtype" + ], + [ + "change_onplatformtraining", + "training", + "onplatformtraining" ] ] }