Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Customize the LMS from admin dashboard #304

Merged
merged 15 commits into from
May 17, 2024
Merged

feat: Customize the LMS from admin dashboard #304

merged 15 commits into from
May 17, 2024

Conversation

Chifez
Copy link
Collaborator

@Chifez Chifez commented May 8, 2024

What does this PR do?

This PR enables the admin to personalize the LMS for a better learning experience for students

Fixes #280

bandicam.2024-05-08.16-32-39-177.mp4

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Chore (refactoring code, technical debt, workflow improvements)
  • Enhancement (small improvements)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change adds a new database migration
  • This change requires a documentation update

How should this be tested?

  • run on localhost

Checklist

Required

  • Filled out the "How to test" section in this PR
  • Self-reviewed my own code
  • Commented on my code in hard-to-understand bits
  • Ran pnpm build
  • Checked for warnings, there are none
  • Removed all console.logs
  • Merged the latest changes from main onto my branch with git pull origin main
  • My changes don't cause any responsiveness issues

Appreciated

  • If a UI change was made: Added a screen recording or screenshots to this PR
  • Updated the ClassroomIO Docs if changes were necessary

Copy link

vercel bot commented May 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
cio-cloud ❌ Failed (Inspect) May 17, 2024 0:27am
cio-com ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 17, 2024 0:27am
cio-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 17, 2024 0:27am

Copy link

github-actions bot commented May 8, 2024

Thank you for following the naming conventions for pull request titles! 🙏

apps/dashboard/src/lib/components/Apps/index.svelte Outdated Show resolved Hide resolved
apps/dashboard/src/lib/components/LMS/SideBar.svelte Outdated Show resolved Hide resolved
apps/dashboard/src/lib/components/Org/Settings/store.ts Outdated Show resolved Hide resolved
apps/dashboard/src/routes/courses/[id]/marks/+page.svelte Outdated Show resolved Hide resolved
apps/dashboard/src/lib/utils/redirect.js Outdated Show resolved Hide resolved
apps/dashboard/src/lib/utils/store/org.ts Outdated Show resolved Hide resolved
Copy link
Owner

@rotimi-best rotimi-best left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Chifez I fixed every comment I left in this PR cause I want to merge this one.

However please take a careful look at them

value={APPS_CONSTANTS.APPS.COMMENTS}
onClick={handleAppClick}
buttonClassName="relative"
disabled={$globalStore.isOrgSite && !$currentOrg.customization.apps.comments}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While testing I realized that there was no custom styling for how the disabled behavior of an icon button looked like.

In future PR, I would expect you to notice such thing and either ask or recommend something

<p class="dark:text-white ml-2">{item.name}</p>
</li>
</a>
{#if !item.show || (typeof item.show === 'function' && item.show())}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To avoid this custom if statement logic here, you can already filter out the sideLinks in the reactive block before it is even rendered.

Something like:

$: sideLinks = [
  // all links here
].filter((link) => (link.show ? link.show() : true));

Comment on lines 191 to 208
<style>
@media screen and (min-width: 769px) {
.desktop {
display: block;
}
.mobile {
display: none;
}
}
@media screen and (max-width: 768px) {
.desktop {
display: none;
}
.mobile {
display: flex;
}
}
</style>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no need for this cause you could simply use tailwind.

Instead of mobile you put a class in the element block md:hidden and instead of desktop you put a class hidden md:block

import { get } from 'svelte/store';

export function redirectToLesson(settings, courseId) {
let isOrg = get(globalStore);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be a let

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and isOrg doesn't match the value returned at all.

It should be something like globalStoreValue because get returns the value of any given store.

@@ -0,0 +1,11 @@
import { goto } from '$app/navigation';
import { globalStore } from './store/app';
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should always be a relative import

</script>

<svelte:head>
<title>Custom lms - ClassroomIO</title>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be Customize LMS

@Chifez
Copy link
Collaborator Author

Chifez commented May 17, 2024

@Chifez I fixed every comment I left in this PR cause I want to merge this one.

However please take a careful look at them

alright,will do

rotimi-best added a commit that referenced this pull request May 21, 2024
* chore: update verification email content

* chore: landing page improvements

* feat: grade exercise with AI (#296)

* working on the UI of the grading

* working on the grading function of the radio and checkboxes

* ai grading fully implemented with dummy functions for generating scores

* working on the openai response

* working on the openai response

* finished with the ai_grading

* finished with the ai_grading

* creating new migration file

* working on reviews

* updated the translations

* improvements

---------

Co-authored-by: Rotimi Best <best@classroomio.com>

* feat: selfhost tinymce

* fix: logo resolution error in manifest.json

* feat: move from gpt3.5 to gpt-4o

* feat: customize the LMS from dashboard (#304)

* Done with the customization of the LMS task

* generated custom_lms migration file

* updated the migration file

* copy improvements

* update wording

* made updates based on reviews,i hope i didnt miss anything

* updated the translations and migration files

* refactoring

* disabled improvements for apps

* more improvements

* more custom improvements

* pr refactoring

---------

Co-authored-by: Rotimi Best <best@classroomio.com>

* fix: CustomizeLMS not found

* fix: CustomizeLms wrong path

* setup

* docs: update short hero tagline

* debug: courses not showing on vercel

* more debugging

* i think this fixes it

* fix: phew, clean up debug cause it works

* fix: move RBS into coursecontainer on marks page

* chore: cleaner way to implement redirect if role permission denied

* docs: update tagline

* fix: delete /org/# route

* checkpoint

* add reusable header component

* fix: empty lesson title bug (#314)

* finished the lesson title bug

* made chnages based on review

* Update +page.svelte

---------

Co-authored-by: Rotimi Best <best@classroomio.com>

* feat: add sound cdn

* remove console.log

* feat: course types - self paced and live class (#309)

* working on the course type

* trying to mark it persist

* almost done here

* fixed sendig emtpy options bug

* created migration file

* created migration file

* made updates based on PR review

* merge

* update course type card

* add redirect logic with classroomio.com/new

* make new course modal only open/close with url

* feat: page active state (#315)

* finished the active link state

* updated the active link state based on review

* simplify code

---------

Co-authored-by: Rotimi Best <best@classroomio.com>

* add type to course card

---------

Co-authored-by: Rotimi Best <best@classroomio.com>

* general improvements to free tools

* fix timer and styling issues

---------

Co-authored-by: Rotimi Best <best@classroomio.com>
Co-authored-by: Em_Dev <Chifez1@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Customization settings from LMS
2 participants