From 0d51ed4be73e3b2ca4f1fc92ce736e914d92db4a Mon Sep 17 00:00:00 2001 From: thatblindgeye Date: Sun, 22 Jan 2023 16:40:47 -0500 Subject: [PATCH 1/4] Update foundations path structure --- .../foundations/courses/beyond_foundations.rb | 40 +++++ .../foundations/courses/getting_started.rb | 63 +++++++ .../courses/html_css_foundations.rb | 66 +++++++ .../courses/javascript_foundations.rb | 40 +++++ db/fixtures/paths/foundations/seed.rb | 165 +----------------- 5 files changed, 216 insertions(+), 158 deletions(-) create mode 100644 db/fixtures/paths/foundations/courses/beyond_foundations.rb create mode 100644 db/fixtures/paths/foundations/courses/getting_started.rb create mode 100644 db/fixtures/paths/foundations/courses/html_css_foundations.rb create mode 100644 db/fixtures/paths/foundations/courses/javascript_foundations.rb diff --git a/db/fixtures/paths/foundations/courses/beyond_foundations.rb b/db/fixtures/paths/foundations/courses/beyond_foundations.rb new file mode 100644 index 0000000000..c6f3ad0bb7 --- /dev/null +++ b/db/fixtures/paths/foundations/courses/beyond_foundations.rb @@ -0,0 +1,40 @@ +######################## +# Course - Beyond Foundations +######################## +course = @path.add_course do |course| + course.title = 'Beyond Foundations' + course.description = "With the foundational knowledge you've learned, you're almost ready to take on the rest of the curriculum. All that's left is to get a quick introduction to the backend and then a little help in choosing your future with TOP." + course.identifier_uuid = '7307ca83-e4cf-4789-b957-d4bdcfe3e200' + course.show_on_homepage = true + course.badge_uri = '' +end + +# +++++++++++++ +# SECTION - The Backend +# +++++++++++++ +course.add_section do |section| + section.title = 'The Backend' + section.description = "Here you'll learn about the back end, where we'll demystify what goes on behind the scenes on a web server." + section.identifier_uuid = '1bda637d-2590-4e0e-b988-a74605d09a8a' + + section.add_lessons( + foundation_lessons.fetch('Introduction to the Back End'), + foundation_lessons.fetch('Introduction to Frameworks'), + ) +end + +# +++++++++++++++++++++++ +# SECTION - Conclusion +# +++++++++++++++++++++++ +course.add_section do |section| + section.title = 'Conclusion' + section.description = "Now that you've had a healthy taste of the basics of web development, it's time to choose what specialty path you would like to take." + section.identifier_uuid = '22cbdd2f-785b-40c9-9c54-d21755974df7' + + section.add_lessons( + foundation_lessons.fetch('Choose Your Path Forward'), + ) +end + +# clean up any removed seeds from the database +course.delete_removed_seeds diff --git a/db/fixtures/paths/foundations/courses/getting_started.rb b/db/fixtures/paths/foundations/courses/getting_started.rb new file mode 100644 index 0000000000..073fc41672 --- /dev/null +++ b/db/fixtures/paths/foundations/courses/getting_started.rb @@ -0,0 +1,63 @@ +######################## +# Course - Getting Started +######################## +course = @path.add_course do |course| + course.title = 'Getting Started' + course.description = "Whether you're experienced in programming or totally new to it, this is where everyone should start with The Odin Project. You'll learn about the mindset and conduct one needs to be a successful professional, some required installations for doing this curriculum, and some of the workflow habits you'll use throughout the curriculum and beyond." + course.identifier_uuid = '6eb953fc-de6f-4b00-ac1f-dfd0b438814e' + course.show_on_homepage = true + course.badge_uri = '' +end + +# +++++++++++++ +# SECTION - Introduction +# +++++++++++++ +course.add_section do |section| + section.title = 'Introduction' + section.description = "In this introduction to The Odin Project you'll learn how you can be most successful when going through the curriculum, from improving your mindset when it comes to learning to seeking help from other users." + section.identifier_uuid = '472bf0bc-2667-4206-84ea-43498b1d67f9' + + section.add_lessons( + foundation_lessons.fetch('How this Course Will Work'), + foundation_lessons.fetch('Introduction to Web Development'), + foundation_lessons.fetch('Motivation and Mindset'), + foundation_lessons.fetch('Asking For Help'), + foundation_lessons.fetch('Join the Odin Community'), + ) +end + +# +++++++++++++++++++++++ +# SECTION - Prerequisites +# +++++++++++++++++++++++ +course.add_section do |section| + section.title = 'Prerequisites' + section.description = "In this section you'll first acquire some baseline knowledge related to computers and the web. Then you'll configure some of the necessary installations for the entire curriculum." + section.identifier_uuid = 'a6ff8570-b301-4275-8cb4-1847a8f8ae25' + + section.add_lessons( + foundation_lessons.fetch('Computer Basics'), + foundation_lessons.fetch('How Does the Web Work?'), + foundation_lessons.fetch('Installation Overview'), + foundation_lessons.fetch('Installations'), + foundation_lessons.fetch('Text Editors'), + foundation_lessons.fetch('Command Line Basics'), + foundation_lessons.fetch('Setting Up Git'), + ) +end + +# ++++++++++++++++++++++++++++++++++++++++++++++ +# SECTION - Git Basics +# ++++++++++++++++++++++++++++++++++++++++++++++ +course.add_section do |section| + section.title = 'Git Basics' + section.description = "It's time to Git good! You'll learn the basics of Git and how you can upload your projects to GitHub. This will set you up to share your work with other users and future employers, as well as collaborate with others on projects." + section.identifier_uuid = '7fbf3991-88d4-4564-9982-dce53328f037' + + section.add_lessons( + git_lessons.fetch('Introduction to Git'), + git_lessons.fetch('Git Basics'), + ) +end + +# clean up any removed seeds from the database +course.delete_removed_seeds diff --git a/db/fixtures/paths/foundations/courses/html_css_foundations.rb b/db/fixtures/paths/foundations/courses/html_css_foundations.rb new file mode 100644 index 0000000000..0aa0f67839 --- /dev/null +++ b/db/fixtures/paths/foundations/courses/html_css_foundations.rb @@ -0,0 +1,66 @@ +######################## +# Course - HTML and CSS Foundations +######################## +course = @path.add_course do |course| + course.title = 'HTML and CSS Foundations' + course.description = "Before you can create anything like the websites and apps you use every day, you'll first need to know the basics of creating a simple web page. You'll learn how to build the structure of a page with HTML, add visual styling with CSS, and create a simple layout with Flexbox." + course.identifier_uuid = 'ca6f2080-bd67-4707-988c-1e6f17e391f7' + course.show_on_homepage = true + course.badge_uri = 'badge-html-css.svg' +end + +# +++++++++++++ +# SECTION - HTML Foundations +# +++++++++++++ +course.add_section do |section| + section.title = 'HTML Foundations' + section.description = "HTML is a fundamental building block of everything on the web. You'll learn just what HTML is and some common and useful basics." + section.identifier_uuid = '8b6abb7a-095f-4c1d-b81f-e348aaaf2894' + + section.add_lessons( + foundation_lessons.fetch('Introduction to HTML and CSS'), + foundation_lessons.fetch('Elements and Tags'), + foundation_lessons.fetch('HTML Boilerplate'), + foundation_lessons.fetch('Working with Text'), + foundation_lessons.fetch('Lists'), + foundation_lessons.fetch('Links and Images'), + git_lessons.fetch('Commit Messages'), + foundation_lessons.fetch('Recipes'), + ) +end + +# +++++++++++++++++++++++ +# SECTION - CSS Foundations +# +++++++++++++++++++++++ +course.add_section do |section| + section.title = 'CSS Foundations' + section.description = "CSS is what will help to make your HTML look the way you want. Once you complete this section, you'll be creating projects with style." + section.identifier_uuid = 'd2476929-d71b-4b25-969b-8f7da6a40c94' + + section.add_lessons( + foundation_lessons.fetch('CSS Foundations'), + foundation_lessons.fetch('Inspecting HTML and CSS'), + foundation_lessons.fetch('The Box Model'), + foundation_lessons.fetch('Block and Inline'), + ) +end + +# ++++++++++++++++++++++++++++++++++++++++++++++ +# SECTION - Flexbox +# ++++++++++++++++++++++++++++++++++++++++++++++ +course.add_section do |section| + section.title = 'Flexbox' + section.description = "Now that you've learned some styling basics, it's time to learn how to put things exactly where you want them on your web projects using flexbox, one of the most common layout methods in CSS." + section.identifier_uuid = '1cac0d64-f276-4999-8ff1-85d37797c312' + + section.add_lessons( + foundation_lessons.fetch('Introduction'), + foundation_lessons.fetch('Growing and Shrinking'), + foundation_lessons.fetch('Axes'), + foundation_lessons.fetch('Alignment'), + foundation_lessons.fetch('Landing Page'), + ) +end + +# clean up any removed seeds from the database +course.delete_removed_seeds diff --git a/db/fixtures/paths/foundations/courses/javascript_foundations.rb b/db/fixtures/paths/foundations/courses/javascript_foundations.rb new file mode 100644 index 0000000000..5672ccb446 --- /dev/null +++ b/db/fixtures/paths/foundations/courses/javascript_foundations.rb @@ -0,0 +1,40 @@ +######################## +# Course - JavaScript Foundations +######################## +course = @path.add_course do |course| + course.title = 'JavaScript Foundations' + course.description = "Now it's time to implement some actual functionality. You'll learn the basics to writing JavaScript code, how to debug and plan out your code, and how to dynamically update a page." + course.identifier_uuid = 'ace112b1-0407-454e-9d23-da2099554a42' + course.show_on_homepage = true + course.badge_uri = 'badge-javascript.svg' +end + +# +++++++++++++ +# SECTION - JavaScript Basics +# +++++++++++++ +course.add_section do |section| + section.title = 'JavaScript Basics' + section.description = "Here we finally dig into JavaScript and learn how to make the web dynamic." + section.identifier_uuid = '331227f7-c939-4988-b8b9-e140d2ded362' + + section.add_lessons( + foundation_lessons.fetch('Fundamentals Part 1'), + foundation_lessons.fetch('Fundamentals Part 2'), + foundation_lessons.fetch('JavaScript Developer Tools'), + foundation_lessons.fetch('Fundamentals Part 3'), + foundation_lessons.fetch('Problem Solving'), + foundation_lessons.fetch('Understanding Errors'), + foundation_lessons.fetch('Rock Paper Scissors'), + foundation_lessons.fetch('Clean Code'), + foundation_lessons.fetch('Installing Node.js'), + foundation_lessons.fetch('Fundamentals Part 4'), + foundation_lessons.fetch('DOM Manipulation and Events'), + foundation_lessons.fetch('Revisiting Rock Paper Scissors'), + foundation_lessons.fetch('Etch-a-Sketch'), + foundation_lessons.fetch('Fundamentals Part 5'), + foundation_lessons.fetch('Calculator'), + ) +end + +# clean up any removed seeds from the database +course.delete_removed_seeds diff --git a/db/fixtures/paths/foundations/seed.rb b/db/fixtures/paths/foundations/seed.rb index de86fbd41c..8cd4d8a36a 100644 --- a/db/fixtures/paths/foundations/seed.rb +++ b/db/fixtures/paths/foundations/seed.rb @@ -1,7 +1,7 @@ # ************************ # Path - Foundations # ************************ -path = Seeds::PathBuilder.build do |path| +@path = Seeds::PathBuilder.build do |path| path.title = 'Foundations' path.short_title = 'Foundations Path' path.description = "This is where it all begins! A hands-on introduction to all of the essential tools you'll need to build real, working websites. You'll learn what web developers actually do and the foundations you'll need for later courses." @@ -11,161 +11,10 @@ path.default_path = true end -####################### -# Course - Foundations -####################### +load './db/fixtures/paths/foundations/courses/getting_started.rb' +load './db/fixtures/paths/foundations/courses/html_css_foundations.rb' +load './db/fixtures/paths/foundations/courses/javascript_foundations.rb' +load './db/fixtures/paths/foundations/courses/beyond_foundations.rb' -course = path.add_course do |course| - course.title = 'Foundations' - course.description = "This is where it all begins! A hands-on introduction to all of the essential tools you'll need to build real, working websites. You'll learn what web developers actually do – the foundations you'll need for later courses." - course.identifier_uuid = '783e9b72-a447-4f49-a9b3-b62826d68e04' - course.badge_uri = 'badge-foundations.svg' -end - -# +++++++++++++++++++++++++++++++ -# SECTION - Introduction -# +++++++++++++++++++++++++++++++ -course.add_section do |section| - section.title = 'Introduction' - section.description = 'This section will introduce you to the world of web development and The Odin Project.' - section.identifier_uuid = '472bf0bc-2667-4206-84ea-43498b1d67f9' - - section.add_lessons( - foundation_lessons.fetch('How This Course Will Work'), - foundation_lessons.fetch('Introduction to Web Development'), - foundation_lessons.fetch('Motivation and Mindset'), - foundation_lessons.fetch('Asking For Help'), - foundation_lessons.fetch('Join the Odin Community'), - ) -end - -# +++++++++++++++++++++++++++++++ -# SECTION - Prerequisites -# +++++++++++++++++++++++++++++++ -course.add_section do |section| - section.title = 'Prerequisites' - section.description = 'In this section you\'ll acquire the baseline knowledge before getting into programming. Additionally, you\'ll configure your development environment and install some software necessary for web development.' - section.identifier_uuid = 'a6ff8570-b301-4275-8cb4-1847a8f8ae25' - - section.add_lessons( - foundation_lessons.fetch('Computer Basics'), - foundation_lessons.fetch('How Does the Web Work?'), - foundation_lessons.fetch('Installation Overview'), - foundation_lessons.fetch('Installations'), - foundation_lessons.fetch('Text Editors'), - foundation_lessons.fetch('Command Line Basics'), - foundation_lessons.fetch('Setting up Git'), - ) -end - -# +++++++++++++++++++++++++++++++ -# SECTION - Git Basics -# +++++++++++++++++++++++++++++++ -course.add_section do |section| - section.title = 'Git Basics' - section.description = 'In this section you will learn the basics of Git and how you can upload your future projects to GitHub so you can share your work and collaborate with others on projects easily.' - section.identifier_uuid = '7fbf3991-88d4-4564-9982-dce53328f037' - - section.add_lessons( - git_lessons.fetch('Introduction to Git'), - git_lessons.fetch('Git Basics'), - ) -end - -# +++++++++++++++++++++++++++++++ -# SECTION - HTML -# +++++++++++++++++++++++++++++++ -course.add_section do |section| - section.title = 'HTML Foundations' - section.description = 'Learn the foundations of HTML, a fundamental building block of everything on the web.' - section.identifier_uuid = '8b6abb7a-095f-4c1d-b81f-e348aaaf2894' - - section.add_lessons( - foundation_lessons.fetch('Introduction to HTML and CSS'), - foundation_lessons.fetch('Elements and Tags'), - foundation_lessons.fetch('HTML Boilerplate'), - foundation_lessons.fetch('Working with Text'), - foundation_lessons.fetch('Lists'), - foundation_lessons.fetch('Links and Images'), - git_lessons.fetch('Commit Messages'), - foundation_lessons.fetch('Recipes'), - ) -end - -# +++++++++++++++++++++++++++++++ -# SECTION - CSS Basics -# +++++++++++++++++++++++++++++++ -course.add_section do |section| - section.title = 'CSS Foundations' - section.description = 'Learn how to make your HTML look the way you want by adding styles with CSS.' - section.identifier_uuid = 'd2476929-d71b-4b25-969b-8f7da6a40c94' - - section.add_lessons( - foundation_lessons.fetch('Intro to CSS'), - foundation_lessons.fetch('The Cascade'), - foundation_lessons.fetch('Inspecting HTML and CSS'), - foundation_lessons.fetch('The Box Model'), - foundation_lessons.fetch('Block and Inline'), - ) -end - -# +++++++++++++++++++++++++++++++ -# SECTION - HTML -# +++++++++++++++++++++++++++++++ -course.add_section do |section| - section.title = 'Flexbox' - section.description = 'Learn how to put things exactly where you want them on your web projects using flexbox.' - section.identifier_uuid = '1cac0d64-f276-4999-8ff1-85d37797c312' - - section.add_lessons( - foundation_lessons.fetch('Introduction'), - foundation_lessons.fetch('Growing and Shrinking'), - foundation_lessons.fetch('Axes'), - foundation_lessons.fetch('Alignment'), - foundation_lessons.fetch('Landing Page'), - ) -end - -# +++++++++++++++++++++++++++++++ -# SECTION - JavaScript Basics -# +++++++++++++++++++++++++++++++ -course.add_section do |section| - section.title = 'JavaScript Basics' - section.description = 'Here we finally dig into JavaScript and learn how to make the web dynamic.' - section.identifier_uuid = '331227f7-c939-4988-b8b9-e140d2ded362' - - section.add_lessons( - foundation_lessons.fetch('Fundamentals Part 1'), - foundation_lessons.fetch('Fundamentals Part 2'), - foundation_lessons.fetch('JavaScript Developer Tools'), - foundation_lessons.fetch('Fundamentals Part 3'), - foundation_lessons.fetch('Problem Solving'), - foundation_lessons.fetch('Understanding Errors'), - foundation_lessons.fetch('Rock Paper Scissors'), - foundation_lessons.fetch('Clean Code'), - foundation_lessons.fetch('Installing Node.js'), - foundation_lessons.fetch('Fundamentals Part 4'), - foundation_lessons.fetch('DOM Manipulation and Events'), - foundation_lessons.fetch('Revisiting Rock Paper Scissors'), - foundation_lessons.fetch('Etch-a-Sketch'), - foundation_lessons.fetch('Fundamentals Part 5'), - foundation_lessons.fetch('Calculator'), - ) -end - -# +++++++++++++++++++++++++++++++ -# SECTION - Conclusion -# +++++++++++++++++++++++++++++++ -course.add_section do |section| - section.title = 'Conclusion' - section.description = "Now that you've had a healthy taste of the basics of web development, it's time to choose what specialty path you would like to take." - section.identifier_uuid = '22cbdd2f-785b-40c9-9c54-d21755974df7' - - section.add_lessons( - foundation_lessons.fetch('Choose Your Path Forward'), - ) -end - -# clean up any removed seeds from the database -course.delete_removed_seeds -path.delete_removed_courses +# clean up any removed courses +@path.delete_removed_courses From 7b4506f2c7bfe83f0f1b9891f5478a88b2837d5e Mon Sep 17 00:00:00 2001 From: thatblindgeye Date: Sun, 22 Jan 2023 16:48:44 -0500 Subject: [PATCH 2/4] Fix rubocop offense for double quotes --- db/fixtures/paths/foundations/courses/javascript_foundations.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/fixtures/paths/foundations/courses/javascript_foundations.rb b/db/fixtures/paths/foundations/courses/javascript_foundations.rb index 5672ccb446..4ff93112aa 100644 --- a/db/fixtures/paths/foundations/courses/javascript_foundations.rb +++ b/db/fixtures/paths/foundations/courses/javascript_foundations.rb @@ -14,7 +14,7 @@ # +++++++++++++ course.add_section do |section| section.title = 'JavaScript Basics' - section.description = "Here we finally dig into JavaScript and learn how to make the web dynamic." + section.description = 'Here we finally dig into JavaScript and learn how to make the web dynamic.' section.identifier_uuid = '331227f7-c939-4988-b8b9-e140d2ded362' section.add_lessons( From adb7a6b37d8bb48c8318b349d20ab6c8726c2397 Mon Sep 17 00:00:00 2001 From: thatblindgeye Date: Sun, 16 Jul 2023 14:24:58 -0400 Subject: [PATCH 3/4] Update lessons fetched and course badges --- .../foundations/courses/beyond_foundations.rb | 16 +--------------- .../paths/foundations/courses/getting_started.rb | 2 +- .../foundations/courses/html_css_foundations.rb | 3 ++- 3 files changed, 4 insertions(+), 17 deletions(-) diff --git a/db/fixtures/paths/foundations/courses/beyond_foundations.rb b/db/fixtures/paths/foundations/courses/beyond_foundations.rb index c6f3ad0bb7..f170e877a5 100644 --- a/db/fixtures/paths/foundations/courses/beyond_foundations.rb +++ b/db/fixtures/paths/foundations/courses/beyond_foundations.rb @@ -6,21 +6,7 @@ course.description = "With the foundational knowledge you've learned, you're almost ready to take on the rest of the curriculum. All that's left is to get a quick introduction to the backend and then a little help in choosing your future with TOP." course.identifier_uuid = '7307ca83-e4cf-4789-b957-d4bdcfe3e200' course.show_on_homepage = true - course.badge_uri = '' -end - -# +++++++++++++ -# SECTION - The Backend -# +++++++++++++ -course.add_section do |section| - section.title = 'The Backend' - section.description = "Here you'll learn about the back end, where we'll demystify what goes on behind the scenes on a web server." - section.identifier_uuid = '1bda637d-2590-4e0e-b988-a74605d09a8a' - - section.add_lessons( - foundation_lessons.fetch('Introduction to the Back End'), - foundation_lessons.fetch('Introduction to Frameworks'), - ) + course.badge_uri = 'badge-foundations.svg' end # +++++++++++++++++++++++ diff --git a/db/fixtures/paths/foundations/courses/getting_started.rb b/db/fixtures/paths/foundations/courses/getting_started.rb index 073fc41672..ea3f7dc5f6 100644 --- a/db/fixtures/paths/foundations/courses/getting_started.rb +++ b/db/fixtures/paths/foundations/courses/getting_started.rb @@ -6,7 +6,7 @@ course.description = "Whether you're experienced in programming or totally new to it, this is where everyone should start with The Odin Project. You'll learn about the mindset and conduct one needs to be a successful professional, some required installations for doing this curriculum, and some of the workflow habits you'll use throughout the curriculum and beyond." course.identifier_uuid = '6eb953fc-de6f-4b00-ac1f-dfd0b438814e' course.show_on_homepage = true - course.badge_uri = '' + course.badge_uri = 'badge-foundations.svg' end # +++++++++++++ diff --git a/db/fixtures/paths/foundations/courses/html_css_foundations.rb b/db/fixtures/paths/foundations/courses/html_css_foundations.rb index 0aa0f67839..b916104056 100644 --- a/db/fixtures/paths/foundations/courses/html_css_foundations.rb +++ b/db/fixtures/paths/foundations/courses/html_css_foundations.rb @@ -38,7 +38,8 @@ section.identifier_uuid = 'd2476929-d71b-4b25-969b-8f7da6a40c94' section.add_lessons( - foundation_lessons.fetch('CSS Foundations'), + foundation_lessons.fetch('Intro to CSS'), + foundation_lessons.fetch('The Cascade'), foundation_lessons.fetch('Inspecting HTML and CSS'), foundation_lessons.fetch('The Box Model'), foundation_lessons.fetch('Block and Inline'), From 7faa11d6229db87aa71e1aa683470fe736e998e2 Mon Sep 17 00:00:00 2001 From: thatblindgeye Date: Sun, 16 Jul 2023 14:42:06 -0400 Subject: [PATCH 4/4] Update lesson title casing --- db/fixtures/paths/foundations/courses/getting_started.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/fixtures/paths/foundations/courses/getting_started.rb b/db/fixtures/paths/foundations/courses/getting_started.rb index ea3f7dc5f6..a12e79cb5b 100644 --- a/db/fixtures/paths/foundations/courses/getting_started.rb +++ b/db/fixtures/paths/foundations/courses/getting_started.rb @@ -18,7 +18,7 @@ section.identifier_uuid = '472bf0bc-2667-4206-84ea-43498b1d67f9' section.add_lessons( - foundation_lessons.fetch('How this Course Will Work'), + foundation_lessons.fetch('How This Course Will Work'), foundation_lessons.fetch('Introduction to Web Development'), foundation_lessons.fetch('Motivation and Mindset'), foundation_lessons.fetch('Asking For Help'), @@ -41,7 +41,7 @@ foundation_lessons.fetch('Installations'), foundation_lessons.fetch('Text Editors'), foundation_lessons.fetch('Command Line Basics'), - foundation_lessons.fetch('Setting Up Git'), + foundation_lessons.fetch('Setting up Git'), ) end