Git Product home page Git Product logo

cs3226assignments's Introduction

Ranklist - Lab 6

Hello, if you thought of something that need to done, but busy at the moment, create an issue! So that somebody who might find the problem doable/easy can get that job done instead! Remember to describe the problem and the definition of done as clearly as possible, just suggesting~

User accounts

[email protected] (admin)
[email protected] (admin)
[email protected] (admin)
[email protected] (admin)
[email protected] (admin)
[email protected] (admin)
[email protected] (student Husky)
[email protected] (student Chopper)

DEFAULT PASSWORDS: qwerty123

Database Structure

ScreenShot

Setup guide

XAMPP setup

Install XAMPP

https://www.apachefriends.org/index.html

Clone the project into C:\xampp\htdocs\rankteam1

git clone https://github.com/dev-seahouse/cs3226Assignments.git

Configure Virtual Host

Add the following code into C:\xampp\apache\conf\extra\httpd-vhosts.conf

<VirtualHost *:80>
    DocumentRoot "C:\xampp\htdocs\rankteam1\public"
    Errorlog "C:\xampp\htdocs\rankteam1\storage\logs\error.log"
    <Directory "C:\xampp\htdocs\rankteam1\public">
        Options Indexes FollowSymLinks 
        AllowOverride All 
        Require all granted         
    </Directory>
</VirtualHost>

Setup Laravel

Setup requirements to install composer

Remove the semi-colon for the following values in C:\xampp\php\php.ini

extension=php_openssl.dll
extension=php_curl.dll
extension=php_sockets.dll

double check that there is only one uncommented line of "extension=php_openssl.dll"

Install Composer

  1. Download and install Composer at https://getcomposer.org/download/
  2. When asked to select command-line PHP, browse to C:\xampp\php\php.exe

Install Laravel

In the root folder of the project C:\xampp\htdocs\rankteam1 open command prompt and run the following commands:

# composer global require "laravel/installer"
# composer install
# composer require "laravelcollective/html":"^5.3.0"

Generate .env file

In the root folder of the project C:\xampp\htdocs\rankteam1

# php artisan config:clear
# copy .env.example .env
# php artisan key:generate

Use the server's database for the project

Modify the following settings in C:\xampp\htdocs\rankteam1\.env

DB_CONNECTION=mysql
DB_HOST=128.199.205.219
DB_PORT=3306
DB_DATABASE=ranklist
DB_USERNAME=developer
DB_PASSWORD=developerP@ssw0rd1

Access the server's database through the web browser

Update the following variables in C:\xampp\phpMyAdmin\config.inc.php

$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'developer';
$cfg['Servers'][$i]['password'] = 'developerP@ssw0rd1';
$cfg['Servers'][$i]['host'] = '128.199.205.219';

You should be able to access http://localhost/phpmyadmin without having to enter the credentials

To access http://128.199.205.219/phpmyadmin/
User:          developer
Password:  developerP@ssw0rd1

Setup mailgun

In the root folder of the project C:\xampp\htdocs\rankteam1 open command prompt and run the following command:

# composer require guzzlehttp/guzzle

Modify the following settings in C:\xampp\htdocs\rankteam1\.env Verified Mailgun domain settings

MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailgun.org
MAIL_PORT=2525
[email protected]
MAIL_PASSWORD=89655d866e35092485fe34b412474103
MAIL_ENCRYPTION=null

Sandbox credentials: MAIL_USERNAME=[email protected] MAIL_PASSWORD=a0c542a3057fc62deff7e1e10016f18b

Install NodeJS

  1. Download and install Nodejs at https://nodejs.org/en/
  2. open command prompt and run the following commands:
# npm install

Launch local development server

If you are using windows, open command prompt and type the following command

# .\run

If you are using linux/Mac, open terminal and type the following command

# php artisan serve & npm run watch

Compile front end assets manually (css and javascript)

Open terminal and type the following command:

npm run production

cs3226assignments's People

Contributors

sunset1215 avatar a0134234 avatar dev-seahouse avatar shawnlimjq avatar

Watchers

 avatar Mun Aw avatar  avatar  avatar

cs3226assignments's Issues

Create new Achievement view to display many to many relations with Student

achievements table in database will give you the following:

title
max_points (number of stars)
description

use the information to do, for example: (this achievement's max points is 6)
****** Kattis apprentice: Be in top 25 (6%)/50 (5%)/100 (4%)/150 (3%)/200 (2%)/250 (1%) of Kattis ranklist by the end of Week13 (this achievement will NOT be updated weekly as this will keep changing every week).

create appropriate methods in models to retrieve the following data (in reasonable delay)

{
Flag => "SG",
Name=>"name",
Katitis=>"",
propic=>"",
MC=>"",
TC=>"",
SPE=>"",
HW=>"",
Bs=>"",
KS=>"",
Ac=>"",
DIL=>"",
Sum=>"",
}
something like this
select students.flag, students.name,components.score_sum, students.katits etc
from students join components on students.id = components.student_id
join scores on scores.component_id = components.id
group by students.id
order by components.score_sum desc

tidy up javascript

some pages gives errors on the console log because we called all functions on all pages.

e.g. detail page should not run methods meant for index page

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.