Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
46 changes: 17 additions & 29 deletions dashboard.html
Original file line number Diff line number Diff line change
@@ -1,33 +1,21 @@
<!-- dashboard.html -->

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Dashboard</title>
<link rel="stylesheet" href="styles.css"> <!-- Include your CSS file -->
</head>
<body>
<header>
<h1>Welcome to Your Dashboard</h1>
<nav>
<ul>
<li><a href="/leaderboard">Leaderboard</a></li>
<li><a href="/course-content">Course Content</a></li>
<!-- Add more navigation links as needed -->
</ul>
</nav>
</header>
<main>
<section class="welcome-message">
<h2>Hello, <span id="user-fullname"></span>!</h2>
<p>Welcome to your personalized dashboard.</p>
</section>
</main>
<footer>
<p>&copy; 2024 Your LMS</p>
</footer>

<!-- Include your client-side JavaScript file -->
<script src="script.js"></script>
</body>
</head>
<body>
<h1>Welcome to Your Dashboard</h1>
<form id="course-selection-form">
<label for="courseId">Select Course:</label>
<select id="courseId" name="courseId">
<!-- Populate options dynamically using JavaScript -->
</select>
<button type="submit">Select Course</button>
</form>
<script src="scripts.js"></script>
</body>
</html>
42 changes: 42 additions & 0 deletions learning_management.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
-- Create users table
CREATE TABLE users (
id INT AUTO_INCREMENT PRIMARY KEY,
username VARCHAR(255) UNIQUE,
password VARCHAR(255),
email VARCHAR(255) UNIQUE,
full_name VARCHAR(255)
);
-- Create courses table
CREATE TABLE courses (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(255)
);

-- Insert sample data into courses table
INSERT INTO courses (name) VALUES
('Introduction to HTML'),
('CSS Fundamentals'),
('JavaScript Basics');

-- Create leaderboard table
CREATE TABLE leaderboard (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(255),
score INT
);

-- Insert sample data into leaderboard table
INSERT INTO leaderboard (name, score) VALUES
('John Doe', 100),
('Jane Smith', 90),
('Michael Brown', 85),
('Emily Jones', 80);

-- Create user_courses table
CREATE TABLE user_courses (
id INT AUTO_INCREMENT PRIMARY KEY,
user_id INT,
course_id INT,
FOREIGN KEY (user_id) REFERENCES users(id),
FOREIGN KEY (course_id) REFERENCES courses(id)
);
13 changes: 13 additions & 0 deletions my-courses.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>My Courses</title>
<script src="my-courses.js"></script>
</head>
<body>
<h1>My Courses</h1>
<ul id="course-list"></ul>
</body>
</html>
26 changes: 26 additions & 0 deletions my-courses.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// my-courses.js

document.addEventListener("DOMContentLoaded", () => {
fetch("/my-courses")
.then((response) => {
if (!response.ok) {
throw new Error("Network response was not ok");
}
return response.json();
})
.then((data) => {
displayCourses(data);
})
.catch((error) => {
console.error("Error fetching user courses:", error);
});
});

function displayCourses(courses) {
const courseList = document.getElementById("course-list");
courses.forEach((course) => {
const courseItem = document.createElement("li");
courseItem.textContent = course.name;
courseList.appendChild(courseItem);
});
}
16 changes: 16 additions & 0 deletions node_modules/.bin/ejs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions node_modules/.bin/ejs.cmd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 28 additions & 0 deletions node_modules/.bin/ejs.ps1

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions node_modules/.bin/jake

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions node_modules/.bin/jake.cmd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 28 additions & 0 deletions node_modules/.bin/jake.ps1

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions node_modules/.bin/mime

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions node_modules/.bin/mime.cmd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 28 additions & 0 deletions node_modules/.bin/mime.ps1

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading