Basic Learning Management System (BasicLMS)
BasicLMS is a web application that mainly consists of the following modules:
1. About 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.
2. APIs
We would like to extend our thanks to the following APIs and their developers.
-
-
Forked and optimized andrewnaguib/grader-library
-
4. Administration Panel
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.
After you click it, the following three security questions will appear:
|
The answers are: dummy1, dummy2, and dummy3. They are editable through the panel. |
4.4. Assigning Permissions to Roles
Follow the beneath steps:
-
Navigate to "User Management"
-
Click "Roles"
-
"Edit" any of the shown roles to modify/add their permissions
We recommend:
-
All "Security Privileges" for the "superuser" role.
-
All "High Educational Privileges" for the "instructor" role along with "edit-profile" from "Other Privileges".
-
All "Low Education Privileges" for the "student" role along with "edit-profile" from "Other Privileges".
-
"view-course", "view-announcement", and "edit-profile" for the "guest" role.
However, you can design your own role/permission combination.
13. Installation
13.1. Requirements
-
C/C++ Dependencies and Compilers
-
Perl Dependencies
-
Composer: Check Composer Official Website
13.2. Guide
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
13.2.1. Database Configuration
-
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
13.2.1.1. Database Seeding
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);
13.3. Generate Application Key
php artisan key:generate
13.4. Accounts
13.4.1. Default credentials
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).
13.5. Sandbox
-
Please refer to this README
13.6. Run
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
14. Security Vulnerabilities
If you discover a security vulnerability within BasicLMS, please post an issue. All security vulnerabilities will be addressd.
15. Known Issues
In case of receiving the following exception BadMethodCallException
. Please run this two commands:
-
php artisan config:cache
-
php artisan config:clear