Skip to content

Commit

Permalink
Merge pull request #8 from prateekprshr-nith/registration
Browse files Browse the repository at this point in the history
Registration
  • Loading branch information
prateekprshr-nith authored Oct 14, 2016
2 parents 0d80e1f + e21ee0a commit 991f82b
Show file tree
Hide file tree
Showing 17 changed files with 687 additions and 15 deletions.
22 changes: 13 additions & 9 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,30 +1,34 @@
APP_ENV=local
APP_DEBUG=true
APP_ENV=production
APP_DEBUG=false
APP_KEY=NPrHEJHh5hUYURbzBWSzmqL2O1hHptbo
APP_DIR=/path/to/app/directory

# Replace with your database connection credentials
DB_HOST=127.0.0.1
DB_DATABASE=yourdb
DB_USERNAME=yourusername
DB_PASSWORD=yourpassword
DB_USERNAME=yourdbusername
DB_PASSWORD=yourdbpassword

# Replace with the IP of admin machine
ADMIN_IP=127.0.0.1

# Replace with the initial path with actual directory
IMAGE_DIR=/path/to/your/beautifulCode/storage/app/images/

# You don't need to worry about these
CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=sync

# You don't need to worry about these
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_DRIVER=log
MAIL_HOST=mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
# Replace with your mail settings
MAIL_DRIVER=smtp
MAIL_HOST=yourMailHostIP
MAIL_PORT=587
MAIL_USERNAME=yourUserName
MAIL_PASSWORD=yourPassword
MAIL_ENCRYPTION=null
2 changes: 1 addition & 1 deletion app/Course.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@ public function department()
*/
public function allocatedElectives ()
{
return $this->hasMany('App\AllocatedElectives', 'courseCode', 'courseCode');
return $this->hasMany('App\AllocatedElective', 'courseCode', 'courseCode');
}
}
47 changes: 47 additions & 0 deletions app/Http/Controllers/Teacher/HomeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@

namespace App\Http\Controllers\Teacher;

use App;
use App\Course;
use App\Http\Requests;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Auth;

/**
* Class HomeController, this class contains
Expand All @@ -17,6 +20,7 @@
class HomeController extends Controller
{
protected $helpView = 'teacher.help';
protected $electiveSelectionView = 'teacher.electives';

/**
* Create a new controller instance.
Expand All @@ -38,4 +42,47 @@ public function index()
{
return view('teacher.home');
}

public function showElectiveSelectionView()
{
// Get electives
$electives = Course::where('dCode', Auth::guard('teacher')->user()->dCode)
->where(function($q) {
$q->where('openElective', true)->orWhere('departmentElective', true);
})->get();

return view($this->electiveSelectionView, ['electives' => $electives]);
}

public function getElectiveList ($courseCode)
{
// Get the list of allocated electives
$allocatedElectives = Course::find($courseCode)->allocatedElectives;

if($allocatedElectives->isEmpty())
{
$studentList = 'No student has opted for this subject !!!';
}
else
{
$studentList = '';
$count = 1;

// Generate the student list
foreach ($allocatedElectives as $allocatedElective)
{
$studentList = $studentList . "\n" . $count . ") " .
$allocatedElective->rollNo . ", " .
$allocatedElective->currentStudentState->student->name . ", " .
$allocatedElective->currentStudentState->student->department->dName;
}
}

$list = App::make('snappy.pdf.wrapper');
$list->loadHTML($studentList)
->setOption('margin-bottom', 10)
->setOption('margin-top', 10);

return $list->download($courseCode . 'List.pdf');
}
}
2 changes: 2 additions & 0 deletions app/Http/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@
// Teacher view routes
Route::get('home', 'Teacher\HomeController@index');
Route::get('help', 'Teacher\HomeController@showHelpView');
Route::get('electives', 'Teacher\HomeController@showElectiveSelectionView');
Route::get('electives/{courseCode}', 'Teacher\HomeController@getElectiveList');
Route::group(['prefix' => '/semesterRegistration'], function ()
{
// Routes for semester and course selection
Expand Down
19 changes: 19 additions & 0 deletions public/bootstrap/js/custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,23 @@ function getElectiveInfo(button)
}
});
}
}


/*
* This function sets the href field of a link
*/
function setLinkUrl(elementId, documentUrl, subUrl)
{
console.log('Sub Url = ' + subUrl);
if(subUrl === "")
{
console.log('IN null');
document.getElementById(elementId).href = "";
}
else
{
console.log('IN !null');
document.getElementById(elementId).href = documentUrl + subUrl;
}
}
Binary file added public/images/StudentRegFlow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
182 changes: 182 additions & 0 deletions resources/views/admin/help.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
@extends('layouts.app')

@section('content')
<div class="container">
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="panel panel-default">
<div class="panel-heading">
<span class="glyphicon glyphicon-info-sign"></span>
<strong>Things to manage.</strong>
</div>

<h4> <strong>Manage Users:</strong> </h4>

<blockquote class="text-justify">

<h4><strong>1). Teachers: </strong></h4>

<blockquote class="text-justify">
<p> <strong>a). </strong>Click on <strong>Teachers</strong> tab,
here you will see all the teachers registered.</p>

<p><strong>b).</strong>You can delete a teacher's account by clicking on
<strong>Remove</strong> button in the corresponding row.</p>

<p><strong>c).</strong>You can add a teacher's account by filling appropriate details
in the form below the <strong>registered teachers</strong> table.</p>

</blockquote>

<h4><strong>2). Hostel Staff: </strong></h4>

<blockquote class="text-justify">
<p> <strong>a). </strong>Click on <strong>Hostel Staff</strong> tab,
here you will see all the hostel staff members registered.</p>

<p><strong>b).</strong>You can delete a hostel staff members's account by clicking on
<strong>Remove</strong> button in the corresponding row.</p>

<p><strong>c).</strong>You can add a hostel staff members's account by filling appropriate details
in the form below the <strong>registered hostel staff members</strong> table.</p>

</blockquote>

<h4><strong>3). Department Staff: </strong></h4>

<blockquote class="text-justify">
<p> <strong>a). </strong>Click on <strong> Department Staff</strong> tab,
here you will see all the department staff members registered.</p>

<p><strong>b).</strong>You can delete a department staff members's account by clicking on
<strong>Remove</strong> button in the corresponding row.</p>

<p><strong>c).</strong>You can add a department staff members's account by filling appropriate details
in the form below the <strong>registered department Staff members</strong> table.</p>

</blockquote>

<h4><strong>4). Account Staff: </strong></h4>

<blockquote class="text-justify">
<p> <strong>a). </strong>Click on <strong>Account Staff</strong> tab,
here you will see all the account staff members registered.</p>

<p><strong>b).</strong>You can delete a account staff members's account by clicking on
<strong>Remove</strong> button in the corresponding row.</p>

<p><strong>c).</strong>You can add a account staff members's account by filling appropriate details
in the form below the <strong>registered account staff members</strong> table.</p>

</blockquote>

<h4><strong>5). Library Staff: </strong></h4>

<blockquote class="text-justify">
<p> <strong>a). </strong>Click on <strong>Library Staff</strong> tab,
here you will see all the library staff members registered.</p>

<p><strong>b).</strong>You can delete a library staff members's account by clicking on
<strong>Remove</strong> button in the corresponding row.</p>

<p><strong>c).</strong>You can add a library staff members's account by filling appropriate details
in the form below the <strong>registered library staff members</strong> table.</p>

</blockquote>

<h4><strong>6). Chief Warden Staff: </strong></h4>

<blockquote class="text-justify">
<p> <strong>a). </strong>Click on <strong>Chief Warden Staff</strong> tab,
here you will see all the chief warden staff members registered.</p>

<p><strong>b).</strong>You can delete a chief warden staff members's account by clicking on
<strong>Remove</strong> button in the corresponding row.</p>

<p><strong>c).</strong>You can add a chief warden staff members's account by filling appropriate details
in the form below the <strong>registered chief warden staff members</strong> table.</p>

</blockquote>

<h4><strong>7). Students: </strong></h4>

<blockquote class="text-justify">
<p> <strong>a). </strong>Click on <strong>Students</strong> tab,
here you will see all the students registered.</p>

<p><strong>b).</strong>You can delete a students's account by clicking on
<strong>Remove</strong> button in the corresponding row.</p>

<p><strong>c).</strong>If the student faces some problem with email verification
you can verify his/her's account by clicking on <strong>Verify</strong> button.</p>

</blockquote>

</blockquote>

<h4> <strong>Manage Departments, Sections and Hostels:</strong> </h4>

<blockquote class="text-justify">

<h4><strong>1). Department: </strong></h4>

<blockquote class="text-justify">
<p> <strong>a). </strong>Click on <strong>Department</strong> tab,
here you will see all the departments present in the database.</p>

<p><strong>b).</strong>You can delete a department by clicking on
<strong>Remove</strong> button in the corresponding row.</p>

<p><strong>c).</strong>You can add a departments by filling appropriate details
in the form below the <strong>departments</strong> table.</p>

</blockquote>

<h4><strong>2). Sections: </strong></h4>

<blockquote class="text-justify">
<p> <strong>a). </strong>Click on <strong>Sections</strong> tab,
here you will see all the sections present in the database.</p>

<p><strong>b).</strong>You can delete a section by clicking on
<strong>Remove</strong> button in the corresponding row.</p>

<p><strong>c).</strong>You can add a section by filling appropriate details
in the form below the <strong>sections</strong> table. Enter secton id and select the department
to which that section belongs.</p>

</blockquote>

<h4><strong>3). Hostels: </strong></h4>

<blockquote class="text-justify">
<p> <strong>a). </strong>Click on <strong>Hostels</strong> tab,
here you will see all the hostels present in the database.</p>

<p><strong>b).</strong>You can delete a hostel by clicking on
<strong>Remove</strong> button in the corresponding row.</p>

<p><strong>c).</strong>You can add a hostel by filling appropriate details
in the form below the <strong>hostels</strong> table.</p>

</blockquote>

</blockquote>

<h4> <strong>Manage Registration process:</strong> </h4>

<blockquote class="text-justify">
<h4><strong>Steps:</strong></h4>

<p> <strong>a). </strong>See the status of each user. If its <strong>Deactivated</strong>
click on <strong>Activate</strong> to activate the process for the users.</p>

<p> <strong>b). </strong>Once all the students are registered click <strong>Deactivate</strong>
to deactivate the registration process.</p>

</blockquote>
</div>
</div>
</div>
</div>
@endsection
39 changes: 39 additions & 0 deletions resources/views/adminStaff/help.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
@extends('layouts.app')

@section('content')
<div class="container">
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="panel panel-default">
<div class="panel-heading">
<span class="glyphicon glyphicon-info-sign"></span>
<strong> Steps to be followed.</strong>
</div>

<h4> <strong>Steps:</strong> </h4>

<blockquote class="text-justify">

<p> <strong>a). </strong>Click on <strong>Registration requests</strong> on top of your screen,
here you will see the student's requests.</p>

<p> <strong>b). </strong>Any new request will appear in <strong>New request</strong> tab.
You can view student's details and if the student doesn't have any fine pending you can approve the request
by clicking on <strong>Approve</strong>. If there is any fine pending, you can keep the request
on hold by clicking <strong>hold</strong> and add a remark describing the problem.</p>

<p> <strong>c). </strong>If request was accepted it will be available under <strong>Approved Request</strong>
tab. If it was kept on hold, it will be available under <strong>Pending request</strong> tab.</p>

<p> <strong>d). </strong>If a request was on hold and student resolved the problem, then click
on <strong>pending requests</strong> and approve his/her's request by clicking on <strong>approve</strong>.</p>

<p> <strong>e). </strong>Once the student's request is approved, it can be viewed in
<strong>approved requests</strong> tab.</p>

</blockquote>
</div>
</div>
</div>
</div>
@endsection
Loading

0 comments on commit 991f82b

Please sign in to comment.