Install Ubuntu 24.04 on Windows Subsystem for Linux (WSL)
wsl --install Ubuntu-24.04
Install and Configure Zsh with Oh My Zsh on Ubuntu 24.04
# Update package lists
sudo apt update
# Install zsh
Install Ubuntu 24.04 on Windows Subsystem for Linux (WSL)
wsl --install Ubuntu-24.04
Install and Configure Zsh with Oh My Zsh on Ubuntu 24.04
# Update package lists
sudo apt update
# Install zsh
class Lms::Course < ActiveRecord::Base | |
validates :title, :description, presence: true | |
# Lessons & Snippets | |
has_many :course_lessons | |
has_many :lessons, through: :course_lessons | |
has_many :snippets, through: :lessons | |
# Author, Level, Imagery, Audiences, Categories, Resources, Paths, and Programs | |
belongs_to :author, class_name: "User", foreign_key: "author_id" |
class Api::V1::Lms::PathsController < ApplicationController | |
before_filter :authenticate_user! | |
before_filter :find_path, only: [:show, :update, :destroy] | |
before_filter :authorize_action | |
respond_to :json | |
def index | |
@paths = ::Lms::Path.all | |
end |
class Lms::Path < ActiveRecord::Base | |
validates :name, :description, presence: true | |
validates :name, uniqueness: true | |
# Associations | |
has_and_belongs_to_many :courses | |
belongs_to :imagery | |
def get_progress(user) | |
return 0 if courses.length == 0 |
'use strict' | |
angular.module('app.lms').controller 'PathEditAdminCtrl', ['$state', 'path', 'Path', 'Course', 'Modal', | |
($state, path, Path, Course, Modal) -> | |
vm = this | |
vm.path = path | |
vm.errors = [] | |
vm.newCourse = {id: null, label: null} | |
vm.editName = false |