Skip to content

ci-oc/basic-lms-laravel

Repository files navigation

Basic Learning Management System (BasicLMS)

The BasicLMS is a pure educational Learning Management System. It does not serve all purposes of an LMS. However, it provides a proof of concept of what could be implemeneted and integrated. Works on Unix-like operating systems.

We would like to extend our thanks to the following APIs and their developers.

When you sign in using the superuser account (see Database Configuration) , you will see a clickable note that forwards you to security questions web page.

Kb12gMs

After you click it, the following three security questions will appear:

L7nyoNv
💡
The answers are: dummy1, dummy2, and dummy3. They are editable through the panel.

Follow the beneath steps:

  1. Navigate to "User Management"

  2. Click "Roles"

  3. "Edit" any of the shown roles to modify/add their permissions

3XMsmfF

We recommend:

  1. All "Security Privileges" for the "superuser" role.

  2. All "High Educational Privileges" for the "instructor" role along with "edit-profile" from "Other Privileges".

  3. All "Low Education Privileges" for the "student" role along with "edit-profile" from "Other Privileges".

  4. "view-course", "view-announcement", and "edit-profile" for the "guest" role.

However, you can design your own role/permission combination.

NU9ynao

In your terminal,

  • Clone: git clone https://github.com/ci-oc/basic-lms-laravel.git

  • Navigate: cd basic-lms-laravel

  • Update your depencencies as they are specified in composer.json: composer update

  • Composer re-reads the composer.json file to build up the list of files to autoload: composer dump-autoload

  • Create a cache file for faster configuration loading: php artisan config:cache

  • Flush the application cache: php artisan config:clear

  • cat .env.example >> .env

  • vim .env

Then configure your database credentials in the following part:

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=DATABASE_NAME
DB_USERNAME=MYSQL_USERNAME # default is root
DB_PASSWORD=MYSQL_PASSWORD

Also make sure you have the following configuration in your .env file.

BROADCAST_DRIVER=log
CACHE_DRIVER=array
SESSION_DRIVER=file
QUEUE_DRIVER=database

In order to seed database with accounts. Please run the following command: - php artisan migrate --seed

If you want to disable seeding for specific table. Please open the following file. - vim PATH/TO/basic-lms-laravel/database/seeds/DatabaseSeeder.php

And then you can comment by # any of the following seeders.

💡
But note that you can only comment/uncomment instructors and/or students seeders, because superuser accounts are only created through seeding.

Example:

$this->call(PermissionTableSeeder::class);
$this->call(JudgeOptionsSeeder::class);
$this->call(RoleTableSeeder::class);
$this->call(SuperUserTableSeeder::class);
$this->call(SecurityURLSeeder::class);
# $this->call(InstructorsTableSeeder::class);
# $this->call(StudentsTableSeeder::class);
$this->call(CodingLanguagesSeeder::class);
php artisan key:generate

Please go to your DBMS and view users table. First two records are the superusers accounts, next 20 are instructors, the 20 after them are students.

  • Default password: "secret" (without quotes).

In order to host it on local area network, run the following command:

  • ifconfig | grep inet

then replace [IP] with your IP.

  • php artisan serve --host=[IP] --port=8000

To host it on local machine:

  • php artisan serve

And run the following command in order to run Online Judge Queue and Mails Queue (with priority to judge queue first)

  • php artisan queue:listen --queue=remark,emails

To activate plagiarism detection using MOSS run:

  • php artisan remark

If you discover a security vulnerability within BasicLMS, please post an issue. All security vulnerabilities will be addressd.

In case of receiving the following exception BadMethodCallException. Please run this two commands:

  • php artisan config:cache

  • php artisan config:clear