Project Completed - 100%

parent 85872d7b
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
/public/storage /public/storage
/storage/*.key /storage/*.key
/vendor /vendor
public
.env .env
.env.backup .env.backup
.phpunit.result.cache .phpunit.result.cache
...@@ -11,3 +10,4 @@ Homestead.json ...@@ -11,3 +10,4 @@ Homestead.json
Homestead.yaml Homestead.yaml
npm-debug.log npm-debug.log
yarn-error.log yarn-error.log
/public
\ No newline at end of file
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Document extends Model
{
//
}
...@@ -4,82 +4,80 @@ namespace App\Http\Controllers; ...@@ -4,82 +4,80 @@ namespace App\Http\Controllers;
use App\Classes; use App\Classes;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use App\Teacher;
class ClassesController extends Controller class ClassesController extends Controller
{ {
/** public function createNewClass(Request $classDetails) {
* Display a listing of the resource. $class_table = new Classes;
*
* @return \Illuminate\Http\Response
*/
public function index()
{
//
}
/** if (Session()->get('teacherStatus')['role'] == 'Admin' || Session()->get('teacherStatus')['role'] == 'admin') {
* Show the form for creating a new resource. if ($classDetails->className != null && $classDetails->teacherId) {
* $class_table->name = $classDetails->className;
* @return \Illuminate\Http\Response $class_table->teacher_id = $classDetails->teacherId;
*/ $class_table->save();
public function create()
{
//
}
/** Session()->flash('classStatus', "Class Added Successfully!.");
* Store a newly created resource in storage. return redirect('/admin_board');
* } else {
* @param \Illuminate\Http\Request $request Session()->flash('classStatus', "Please Fill All Feilds");
* @return \Illuminate\Http\Response return redirect('/admin_board');
*/ }
public function store(Request $request) } else {
{ return redirect('/login');
//
} }
}
public function getAllClasses() {
$data = DB::table('classes')->select('classes.id','classes.name','classes.teacher_id','teachers.username')
->join('teachers', 'classes.teacher_id', '=', 'teachers.id')->get();
/** $all_subjects = json_decode($data, true);
* Display the specified resource. if (Session()->get('teacherStatus')['role'] == 'Admin' || Session()->get('teacherStatus')['role'] == 'admin') {
* return view('all_classes')->with('classes', $all_subjects);
* @param \App\Classes $classes } else {
* @return \Illuminate\Http\Response return redirect('/login');
*/ }
public function show(Classes $classes)
{
//
} }
/** public function showUpdateClassForm($id) {
* Show the form for editing the specified resource. $data = DB::table('classes')->select('classes.id','classes.name','classes.teacher_id','teachers.username')
* ->join('teachers', 'classes.teacher_id', '=', 'teachers.id')
* @param \App\Classes $classes ->where('classes.id', '=', $id)
* @return \Illuminate\Http\Response ->get();
*/ $all_teachers = Teacher::select('*')->get();
public function edit(Classes $classes) //dd($data);
{ $selected_classDetails = json_decode($data, true);
// //dd($selected_classDetails);
if (Session()->get('teacherStatus')['role'] == 'Admin' || Session()->get('teacherStatus')['role'] == 'admin') {
return view('update_classes')->with(['selected_classDetails'=>$selected_classDetails, 'all_teachers'=>$all_teachers]);
} else {
return redirect('/login');
} }
}
public function updateSelectedClassDetails(Request $requestClassDetails) {
if (Session()->get('teacherStatus')['role'] == 'Admin' || Session()->get('teacherStatus')['role'] == 'admin') {
Classes::where('id', $requestClassDetails->classId)->update([
'name'=>$requestClassDetails->className,
'teacher_id'=>$requestClassDetails->teacherId
]);
/** Session()->flash('classStatus', "Class Details Update Successfully.");
* Update the specified resource in storage. return redirect('/admin_board');
* } else {
* @param \Illuminate\Http\Request $request return redirect('/login');
* @param \App\Classes $classes }
* @return \Illuminate\Http\Response
*/
public function update(Request $request, Classes $classes)
{
//
} }
/** public function deleteSelectedClassDetails($id) {
* Remove the specified resource from storage. if (Session()->get('teacherStatus')['role'] == 'Admin' || Session()->get('teacherStatus')['role'] == 'admin') {
* Classes::where('id', $id)->delete();
* @param \App\Classes $classes
* @return \Illuminate\Http\Response return redirect('/all_classes');
*/ } else {
public function destroy(Classes $classes) return redirect('/login');
{ }
//
} }
} }
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use App\Classes;
use App\Subject;
use App\Lesson;
use App\Document;
class DocumentController extends Controller
{
public function showAddDocumentPage() {
$available_classes = Classes::select('*')->get();
$data = DB::table('documents')->select('documents.id','documents.document_title','documents.document_name','lessons.lesson_name')
->join('lessons', 'lessons.id', '=', 'documents.lesson_id')
->get();
// dd($available_classes);
$available_documents = json_decode($data, true);
if (Session()->get('teacherStatus')) {
return view('lecture_documents')->with(['classes'=>$available_classes, 'documents'=>$available_documents]);
} else {
return redirect('/login');
}
}
public function findSubjectsForDocumentAdd(Request $request) {
if (Session()->get('teacherStatus')['role'] == 'Admin' || Session()->get('teacherStatus')['role'] == 'admin') {
$data = Subject::select('*')->where('class_id', $request->id)->get();
return response()->json($data);
} else {
return redirect('/login');
}
}
public function findLessonsForDocumentAdd(Request $request) {
if (Session()->get('teacherStatus')['role'] == 'Admin' || Session()->get('teacherStatus')['role'] == 'admin') {
$data = Lesson::select('*')->where('subject_id', $request->id)->get();
return response()->json($data);
} else {
return redirect('/login');
}
}
public function uploadSelectedDocuments(Request $request) {
// dd($request);
$document_table = new Document();
if (Session()->get('teacherStatus')['role'] == 'Admin' || Session()->get('teacherStatus')['role'] == 'admin') {
if ($request->documentTitle && $request->classGrade && $request->classGrade && $request->lessonName && $request->fileName) {
$document_table->document_title = $request->documentTitle;
$document_table->class_id = $request->classGrade;
$document_table->lesson_id = $request->lessonName;
$file = $request->fileName;
$get_file_name = date('YmdHi').$file->getClientOriginalName();
$file-> move(public_path('public/documents'), $get_file_name);
$document_table->document_name = $get_file_name;
$document_table->save();
Session()->flash('status', 'Document Added Successfully.');
return redirect('/add-documents');
} else {
Session()->flash('status', 'Please Fill All Feilds.');
return redirect('/add-documents');
}
} else {
return redirect('/login');
}
}
public function deleteSelectedDocument($id) {
if (Session()->get('teacherStatus')['role'] == 'Admin' || Session()->get('teacherStatus')['role'] == 'admin') {
Document::where('id',$id)->delete();
return redirect('/add-documents');
} else {
return redirect('/login');
}
}
}
...@@ -12,9 +12,9 @@ use App\Comment; ...@@ -12,9 +12,9 @@ use App\Comment;
class GenerateSummeryController extends Controller class GenerateSummeryController extends Controller
{ {
function generateSummery(Request $lessonDetails) { function generateSummery(Request $lessonDetails) {
// return redirect()->back(); //return redirect()->back();
set_time_limit(0); set_time_limit(0);
$token = '02jT906QhCc3y2EiJWB48MGV4JAt5U1et15PUfl1cdIqLwuXFU_sq1YhpfQU0Ts58YOZ3dMRz2uL65jo-U6wxOa7RfXoo'; $token = '02euWC6nQET9fHiW9x0514E27jz_qOrB__oPdocxYJzoHqx3cXn6UkAPQKUkfAK9ATFf9sm1o7UWhGk01oIAqvZUI590k';
$file = base_path() . "/" . $lessonDetails->lessonLink; $file = base_path() . "/" . $lessonDetails->lessonLink;
// create client // create client
...@@ -60,7 +60,7 @@ class GenerateSummeryController extends Controller ...@@ -60,7 +60,7 @@ class GenerateSummeryController extends Controller
} }
$plain_text = ''; $plain_text = '';
$token = '02jT906QhCc3y2EiJWB48MGV4JAt5U1et15PUfl1cdIqLwuXFU_sq1YhpfQU0Ts58YOZ3dMRz2uL65jo-U6wxOa7RfXoo'; $token = '02euWC6nQET9fHiW9x0514E27jz_qOrB__oPdocxYJzoHqx3cXn6UkAPQKUkfAK9ATFf9sm1o7UWhGk01oIAqvZUI590k';
// create client // create client
$client = new Client([ $client = new Client([
...@@ -79,67 +79,14 @@ class GenerateSummeryController extends Controller ...@@ -79,67 +79,14 @@ class GenerateSummeryController extends Controller
// decode response JSON and print // decode response JSON and print
$hugeArray = json_decode($response, true); $hugeArray = json_decode($response, true);
foreach ($hugeArray["monologues"][0]["elements"] as $key) { //dd(count($hugeArray["monologues"]));
for ($index = 0; $index < count($hugeArray["monologues"]); ++$index) {
foreach ($hugeArray["monologues"][$index]["elements"] as $key) {
$plain_text = $plain_text . $key["value"]; $plain_text = $plain_text . $key["value"];
} }
}
$response = $client->get('https://api.meaningcloud.com/summarization-1.0', [ Session()->flash("decoded_summery", $plain_text);
'multipart' => [
[
'name' => 'key',
'contents' => 'dfdcde27a7a2cdcf21ca08e9c492c3f4'
],
[
'name' => 'txt',
'contents' => $plain_text
],
[
'name' => 'sentences',
'contents' => 20
]
]
]);
$status = $response->getStatusCode();
$body = json_decode($response->getBody()->getContents(), true);
Session()->flash("decoded_summery", $body['summary']);
// dd($body['summary']);
//return redirect('lesson/', $lessonDetails->lessonId);
// $curl = curl_init();
// curl_setopt_array($curl, [
// CURLOPT_URL => "https://paraphrase-genius.p.rapidapi.com/dev/paraphrase/",
// CURLOPT_RETURNTRANSFER => true,
// CURLOPT_FOLLOWLOCATION => true,
// CURLOPT_ENCODING => "",
// CURLOPT_MAXREDIRS => 10,
// CURLOPT_TIMEOUT => 30,
// CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
// CURLOPT_CUSTOMREQUEST => "POST",
// CURLOPT_POSTFIELDS => "{\r
// \"text\": \"RapidAPI is a backend development platform that let's app & web developers create the backend for their apps using existing functional blocks. The company was founded in Tel Aviv by Iddo Gino and Mickey Haslavsky on January 2015. It has since received investments from angel investors including Dov Moran (founded of M-Systems), Marius Nacht (co-founder of Checkpoint) amongst others. RapidAPI has also received investment from the 500 Startups accelerator, partaking in its 16th batch in San Francisco.\",\r
// \"result_type\": \"multiple\"\r
// }",
// CURLOPT_HTTPHEADER => [
// "X-RapidAPI-Host: paraphrase-genius.p.rapidapi.com",
// "X-RapidAPI-Key: 8745f7a6bamsha8a51bdef3714a5p14ba86jsnd890c3f1087c",
// "content-type: application/json"
// ],
// ]);
// $response = curl_exec($curl);
// $err = curl_error($curl);
// curl_close($curl);
// if ($err) {
// dd($err);
// } else {
// dd($response);
// }
// //Session()->flash("decoded_summery", $body['summary']);
return redirect()->back(); return redirect()->back();
} else { } else {
......
...@@ -8,9 +8,39 @@ use Illuminate\Support\Facades\DB; ...@@ -8,9 +8,39 @@ use Illuminate\Support\Facades\DB;
use App\Subject; use App\Subject;
use App\Classes; use App\Classes;
use App\Comment; use App\Comment;
use App\Document;
use App\VideoModel;
use Redirect;
class LessonController extends Controller class LessonController extends Controller
{ {
function calculateLessonVideoViewCount($id) {
$vedioModel = new VideoModel();
if (Session()->has('member')) {
$userId = Session()->get('member')['id'];
} else if (Session()->has('teacherStatus')) {
$userId = Session()->get('teacherStatus')['id'];
} else {
$userId = null;
}
$checkExist = VideoModel::select('*')->where(['userId'=>$userId, 'lessonId'=>$id])->first();
if (empty($checkExist)) {
$vedioModel->userId = $userId;
$vedioModel->lessonId = $id;
$vedioModel->save();
}
return Redirect::back()->with('message','Operation Successful !');
}
function getLessonVideoViewCount($id) {
}
function showAddlessonForm(){ function showAddlessonForm(){
$available_classes = Classes::select('*')->get(); $available_classes = Classes::select('*')->get();
$available_subjects = Subject::select('*')->distinct()->get(); $available_subjects = Subject::select('*')->distinct()->get();
...@@ -29,6 +59,7 @@ class LessonController extends Controller ...@@ -29,6 +59,7 @@ class LessonController extends Controller
if($lessonDetails){ if($lessonDetails){
//dd($lessonDetails); //dd($lessonDetails);
//dd( $lessonDetails->subjectName); //dd( $lessonDetails->subjectName);
if ( $lessonDetails->subjectName != null && $lessonDetails->lessonName && $lessonDetails->lessonThumbnail) {
$lesson_table->subject_id = $lessonDetails->subjectName; $lesson_table->subject_id = $lessonDetails->subjectName;
$lesson_table->lesson_name = $lessonDetails->lessonName; $lesson_table->lesson_name = $lessonDetails->lessonName;
...@@ -53,9 +84,18 @@ class LessonController extends Controller ...@@ -53,9 +84,18 @@ class LessonController extends Controller
$lesson_table->platform_link = "https://www.youtube.com/embed/".$link_arr[1]; $lesson_table->platform_link = "https://www.youtube.com/embed/".$link_arr[1];
} }
Subject::where('id',$lessonDetails->subjectName)
->update([
'teacher_id'=>Session()->get('teacherStatus')['id']
]);
$lesson_table->save(); $lesson_table->save();
Session()->flash('status', 'Lesson Added Successfully!.'); Session()->flash('status', 'Lesson Added Successfully!.');
return redirect('/add_lesson'); return redirect('/add_lesson');
} else {
Session()->flash('status', 'Please Fill All Feilds');
return redirect('/add_lesson');
}
}else{ }else{
Session()->flash('status', 'Please Fill All Fields.'); Session()->flash('status', 'Please Fill All Fields.');
return redirect('/add_lesson'); return redirect('/add_lesson');
...@@ -79,15 +119,26 @@ class LessonController extends Controller ...@@ -79,15 +119,26 @@ class LessonController extends Controller
} }
function viewSingleLesson($lesson_id){ function viewSingleLesson($lesson_id){
if (Session()->has('member')) {
$userId = Session()->get('member')['id'];
} else if (Session()->has('teacherStatus')) {
$userId = Session()->get('teacherStatus')['id'];
} else {
$userId = null;
}
$viewCount = VideoModel::select('*')->where(['lessonId'=>$lesson_id])->count();
$get_all_comments = Comment::select('*')->where('lesson_id', $lesson_id)->get(); $get_all_comments = Comment::select('*')->where('lesson_id', $lesson_id)->get();
$data = DB::table('lessons')->select('lessons.id as lesson_id','lessons.lesson_name','lessons.lesson_thumbnail','lessons.lesson_vedio_link','lessons.platform_link','subjects.id as subject_id','subjects.name','teachers.id as techer_id','teachers.username') $data = DB::table('lessons')->select('lessons.id as lesson_id','lessons.lesson_name','lessons.lesson_thumbnail','lessons.lesson_vedio_link','lessons.platform_link','subjects.id as subject_id','subjects.name','teachers.id as techer_id','teachers.username')
->join('subjects', 'subjects.id','=','lessons.subject_id') ->join('subjects', 'subjects.id','=','lessons.subject_id')
->join('teachers', 'teachers.id','=','subjects.teacher_id') ->join('teachers', 'teachers.id','=','subjects.teacher_id')
->where('lessons.id', $lesson_id)->get(); ->where('lessons.id', $lesson_id)->get();
$getDocuments = Document::select('*')->where('lesson_id', $lesson_id)->get();
$lesson_details = json_decode($data, true); $lesson_details = json_decode($data, true);
if(Session()->has('member') || Session()->has('teacherStatus')){ if(Session()->has('member') || Session()->has('teacherStatus')){
return view('lesson_single')->with(['lesson_details'=>$lesson_details, 'all_comments'=>$get_all_comments, 'decoded_summery'=>'']); return view('lesson_single')->with(['lesson_details'=>$lesson_details, 'all_comments'=>$get_all_comments, 'decoded_summery'=>'', 'lessonDocuments'=>$getDocuments, 'userId'=>$userId, 'viewCount'=>$viewCount]);
}else{ }else{
Session()->flash('status', 'Access Denied.'); Session()->flash('status', 'Access Denied.');
return redirect('/login'); return redirect('/login');
...@@ -136,6 +187,7 @@ class LessonController extends Controller ...@@ -136,6 +187,7 @@ class LessonController extends Controller
->get(); ->get();
$lessons = json_decode(json_encode($all_lessons), true); $lessons = json_decode(json_encode($all_lessons), true);
//dd($all_lessons);
return view('all_lessons')->with(['all_lessons'=>$lessons]); return view('all_lessons')->with(['all_lessons'=>$lessons]);
} }
...@@ -150,13 +202,15 @@ class LessonController extends Controller ...@@ -150,13 +202,15 @@ class LessonController extends Controller
//dd($data); //dd($data);
$selectedLesson = json_decode(json_encode($data), true); $selectedLesson = json_decode(json_encode($data), true);
//dd($selectedLesson);
return view('update_lesson')->with(['selected_lesson'=>$selectedLesson, 'all_classes'=>$all_classes]); return view('update_lesson')->with(['selected_lesson'=>$selectedLesson, 'all_classes'=>$all_classes]);
} }
function saveUpdatedLessonDetails(Request $updatedLessonDetails) { function saveUpdatedLessonDetails(Request $updatedLessonDetails) {
if(Session()->has('teacherStatus')){ if(Session()->has('teacherStatus')){
//dd($updatedLessonDetails);
if (($updatedLessonDetails->lessonThumbnail == null)) { if (($updatedLessonDetails->lessonThumbnail == null)) {
$link_arr = explode("=", $updatedLessonDetails->platform_link); $link_arr = explode("=", $updatedLessonDetails->platform_link);
// $lesson_table->platform_link = "https://www.youtube.com/embed/".$link_arr[1]; // $lesson_table->platform_link = "https://www.youtube.com/embed/".$link_arr[1];
...@@ -177,7 +231,7 @@ class LessonController extends Controller ...@@ -177,7 +231,7 @@ class LessonController extends Controller
'subject_id'=>$updatedLessonDetails->subjectName, 'subject_id'=>$updatedLessonDetails->subjectName,
'lesson_name'=>$updatedLessonDetails->lessonName, 'lesson_name'=>$updatedLessonDetails->lessonName,
'lesson_thumbnail'=>$updatedLessonDetails->currentImage, 'lesson_thumbnail'=>$updatedLessonDetails->currentImage,
'lesson_vedio_link'=> $updatedLessonDetails->lesson_vedio_link, 'lesson_vedio_link'=> ($updatedLessonDetails->lesson_vedio_link == null ? $updatedLessonDetails->checkStatusV : $updatedLessonDetails->lesson_vedio_link),
'platform_link'=>$updatedLessonDetails->checkStatusL 'platform_link'=>$updatedLessonDetails->checkStatusL
]); ]);
} }
......
...@@ -20,7 +20,8 @@ class StudentController extends Controller ...@@ -20,7 +20,8 @@ class StudentController extends Controller
return redirect('/admin_board'); return redirect('/admin_board');
} }
else{ else{
if ($studentDetails->pswd != null && $studentDetails->username != null && $studentDetails->email) { if ($studentDetails->pswd != null && $studentDetails->username != null && $studentDetails->email && $studentDetails->con_pswd != null) {
if ($studentDetails->pswd == $studentDetails->con_pswd) {
$hashedPassword = Hash::make($studentDetails->pswd); $hashedPassword = Hash::make($studentDetails->pswd);
$student_table->username = $studentDetails->username; $student_table->username = $studentDetails->username;
...@@ -32,7 +33,12 @@ class StudentController extends Controller ...@@ -32,7 +33,12 @@ class StudentController extends Controller
return redirect('/admin_board'); return redirect('/admin_board');
} else { } else {
Session()->flash('status', 'Please Fill All Feiulds Before Registration'); Session()->flash('status', 'Password Doesn\'t Match,');
return redirect('/admin_board');
}
} else {
Session()->flash('status', 'Please Fill All Feilds Before Registration');
return redirect('/admin_board'); return redirect('/admin_board');
} }
...@@ -64,7 +70,7 @@ class StudentController extends Controller ...@@ -64,7 +70,7 @@ class StudentController extends Controller
return redirect('/login'); return redirect('/login');
}else{ }else{
Session()->put('member', $fetched_student_result); Session()->put('member', $fetched_student_result);
return redirect('/lessons'); return redirect('/main');
} }
}else if($fetched_teacher_result){ }else if($fetched_teacher_result){
if(!Hash::check($member_details->pswd, $fetched_teacher_result->password)){ if(!Hash::check($member_details->pswd, $fetched_teacher_result->password)){
...@@ -72,10 +78,10 @@ class StudentController extends Controller ...@@ -72,10 +78,10 @@ class StudentController extends Controller
return redirect('/login'); return redirect('/login');
}else if($fetched_teacher_result->role == 'Admin'){ }else if($fetched_teacher_result->role == 'Admin'){
Session()->put('teacherStatus', $fetched_teacher_result); Session()->put('teacherStatus', $fetched_teacher_result);
return redirect('/admin_board'); return redirect('/main');
}else{ }else{
Session()->put('teacherStatus', $fetched_teacher_result); Session()->put('teacherStatus', $fetched_teacher_result);
return redirect('/add_subject'); return redirect('/main');
} }
}else{ }else{
Session()->flash('status', 'Invalid Username or Password'); Session()->flash('status', 'Invalid Username or Password');
......
...@@ -10,9 +10,11 @@ use Session; ...@@ -10,9 +10,11 @@ use Session;
class TeacherController extends Controller class TeacherController extends Controller
{ {
function showAdminDashboard(){ function showAdminDashboard(){
$all_teachers = Teacher::select('*')->get();
if(Session()->has('teacherStatus')){ if(Session()->has('teacherStatus')){
if(Session()->get('teacherStatus')["role"] == 'admin' || Session()->get('teacherStatus')["role"] == 'Admin'){ if(Session()->get('teacherStatus')["role"] == 'admin' || Session()->get('teacherStatus')["role"] == 'Admin'){
return view('dashboard'); return view('dashboard')->with(['all_teachers'=>$all_teachers]);
}else{ }else{
return redirect('/add_subject'); return redirect('/add_subject');
} }
...@@ -33,7 +35,8 @@ class TeacherController extends Controller ...@@ -33,7 +35,8 @@ class TeacherController extends Controller
return redirect('/admin_board'); return redirect('/admin_board');
} }
else { else {
if ($teacherDetails->username != null && $teacherDetails->email != null && $teacherDetails->pswd && $teacherDetails->teacherRole) { if ($teacherDetails->username != null && $teacherDetails->email != null && $teacherDetails->pswd && $teacherDetails->teacherRole && $teacherDetails->con_pswd != null) {
if ($teacherDetails->pswd == $teacherDetails->con_pswd) {
$teacher_table->username = $teacherDetails->username; $teacher_table->username = $teacherDetails->username;
$teacher_table->email = $teacherDetails->email; $teacher_table->email = $teacherDetails->email;
...@@ -43,11 +46,16 @@ class TeacherController extends Controller ...@@ -43,11 +46,16 @@ class TeacherController extends Controller
$teacher_table->save(); $teacher_table->save();
Session()->flash('teacher', 'Teacher Registration Successfull. Please Login'); Session()->flash('teacher', 'Teacher Registration Successfull. Please Login');
return view('dashboard'); return redirect('/admin_board');
} else {
Session()->flash('teacher', 'Password Not Match.');
return redirect('/admin_board');
}
} else { } else {
Session()->flash('teacher', 'Please Fill All Feilds'); Session()->flash('teacher', 'Please Fill All Feilds');
return view('dashboard'); return redirect('/admin_board');
} }
} }
} }
...@@ -82,13 +90,15 @@ class TeacherController extends Controller ...@@ -82,13 +90,15 @@ class TeacherController extends Controller
Teacher::where('id', $updatedDetails->teacherId)->update([ Teacher::where('id', $updatedDetails->teacherId)->update([
'username'=>$updatedDetails->username, 'username'=>$updatedDetails->username,
'email'=>$updatedDetails->email, 'email'=>$updatedDetails->email,
'password'=>Hash::make($updatedDetails->pswd) 'password'=>Hash::make($updatedDetails->pswd),
'role'=>$updatedDetails->teacherRole
]); ]);
} else { } else {
Teacher::where('id', $updatedDetails->teacherId)->update([ Teacher::where('id', $updatedDetails->teacherId)->update([
'username'=>$updatedDetails->username, 'username'=>$updatedDetails->username,
'email'=>$updatedDetails->email, 'email'=>$updatedDetails->email,
'password'=>$updatedDetails->curPassword 'password'=>$updatedDetails->curPassword,
'role'=>$updatedDetails->teacherRole
]); ]);
} }
......
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class VideoModel extends Model
{
//
}
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateDocumentsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('documents', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('document_title');
$table->string('class_id');
$table->string('lesson_id');
$table->string('document_name');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('documents');
}
}
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateVideoModelsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('video_models', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('userId');
$table->string('lessonId');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('video_models');
}
}
<div class="p-4"> <div class="p-4">
<h1><a href="index.html" class="logo">Eduvance</a></h1> <h1>
<a href="/main" class="logo">
<div class="row">
<div class="col-12">
<p>Eduvance</p>
</div>
<div class="col-12">
<p class="text-center">VMS</p>
</div>
</div>
</a>
</h1>
<ul class="list-unstyled components mb-5"> <ul class="list-unstyled components mb-5">
<li> <li>
<a href="/"><span class="fa fa-home mr-3"></span> Home Page</a> <a href="/main"><span class="fa fa-home mr-3"></span> Home Page</a>
</li> </li>
@if(Session()->get('teacherStatus')['role'] == 'admin') @if(Session()->get('teacherStatus')['role'] == 'admin' || Session()->get('teacherStatus')['role'] == 'Admin')
<li class="active"> <li class="{{ (request()->is('admin_board')) ? 'active' : '' }}">
<a href="/admin_board"><span class="fa fa-user mr-3"></span> Registration</a> <a href="/admin_board"><span class="fa fa-user mr-3"></span> Registration</a>
</li> </li>
@endif @endif
<li> <li class="{{ (request()->is('add_subject')) ? 'active' : '' }}">
<a href="/add_subject"><span class="fa fa-book mr-3"></span> Subjects</a> <a href="/add_subject"><span class="fa fa-book mr-3"></span> Subjects</a>
</li> </li>
<li> <li class="{{ (request()->is('add_lesson')) ? 'active' : '' }}">
<a href="/add_lesson"><span class="fa fa-book mr-3"></span> Lessons</a> <a href="/add_lesson"><span class="fa fa-book mr-3"></span> Lessons</a>
</li> </li>
@if(Session()->get('teacherStatus')['role'] == 'admin') @if(Session()->get('teacherStatus')['role'] == 'admin' || Session()->get('teacherStatus')['role'] == 'Admin')
<li> <li class="{{ (request()->is('add-contact')) ? 'active' : '' }}">
<a href="/add-contact"><span class="fa fa-phone-square mr-3"></span> Contact Details</a> <a href="/add-contact"><span class="fa fa-phone-square mr-3"></span> Contact Details</a>
</li> </li>
@endif @endif
<li class="{{ (request()->is('add-documents')) ? 'active' : '' }}">
<a href="/add-documents"><span class="fa fa-book mr-3"></span> Documents</a>
</li>
<li> <li>
<a href="/logout"><span class="fa fa-sign-out mr-3"></span> Sign Out</a> <a href="/logout"><span class="fa fa-sign-out mr-3"></span> Sign Out</a>
</li> </li>
......
<!doctype html>
<html lang="en">
<head>
<title>All Classes</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link href="https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700,800,900" rel="stylesheet">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="{{asset('admin/css/style.css')}}">
</head>
<style>
::placeholder{
color: black !important;
}
input[type="text"]{
border: 1px solid black;
}
input[type="email"]{
border: 1px solid black;
}
input[type="password"]{
border: 1px solid black;
}
.fl-l{
float: left !important;
color: black;
}
</style>
<body>
<div class="wrapper d-flex align-items-stretch">
<nav id="sidebar" class="active">
<div class="custom-menu">
<button type="button" id="sidebarCollapse" class="btn btn-primary">
<i class="fa fa-bars"></i>
<span class="sr-only">Toggle Menu</span>
</button>
</div>
{{View::make('admin_header')}}
<!-- Page Content -->
<div id="content" class="p-4 p-md-5 pt-5">
<h2 class="mb-4">All Classes</h2>
<div class="row">
<div class="col">
<div class="card">
<div class="card-body">
<table class="table">
<tr>
<th>#</th>
<th>Class Name</th>
<th>Assigned Teacher</th>
<th>Actions</th>
</tr>
@foreach($classes as $class)
<tr>
<td>{{ $class['id'] }}</td>
<td>{{ $class['name'] }}</td>
<td>{{ $class['username'] }}</td>
<td>
<a href="/show-update-class/{{ $class['id'] }}" class="btn btn-primary btn-sm">Update</a>
{{-- <!-- <a href="/delete_subject/{{$subject['id']}}" class="btn btn-danger btn-sm">Delete</a> --> --}}
<a href = "/delete-class/{{ $class['id'] }}" class="btn btn-sm btn-danger">Delete</a>
</td>
</tr>
@endforeach
</table>
<a href="/admin_board"> <- Back to Registration Tab</a>
</div>
</div>
</div>
</div>
</div>
<script src="{{asset('admin/js/jquery.min.js')}}"></script>
<script src="{{asset('admin/js/popper.js')}}"></script>
<script src="{{asset('admin/js/bootstrap.min.js')}}"></script>
<script src="{{asset('admin/js/main.js')}}"></script>
</body>
</html>
\ No newline at end of file
...@@ -190,40 +190,39 @@ ...@@ -190,40 +190,39 @@
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col-lg-3"> <div class="col-lg-3">
<p class="mb-4"><img src="images/logo.png" alt="Image" class="img-fluid"></p> <p class="mb-4"><img src="images/profile.jpeg" alt="Image" class="img-fluid"></p>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Beatae nemo minima qui dolor, iusto iure.</p> <!-- <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Beatae nemo minima qui dolor, iusto iure.</p>
<p><a href="#">Learn More</a></p> <p><a href="#">Learn More</a></p> -->
</div> </div>
<div class="col-lg-3"> <div class="col-lg-3">
<h3 class="footer-heading"><span>Our Campus</span></h3> <h3 class="footer-heading"><span>Our School</span></h3>
<ul class="list-unstyled"> <ul class="list-unstyled">
<li><a href="#">Acedemic</a></li> <li><a href="#">Story</a></li>
<li><a href="#">Vision</a></li>
<li><a href="#">Mission</a></li>
<li><a href="#">News</a></li> <li><a href="#">News</a></li>
<li><a href="#">Our Interns</a></li> <li><a href="#">Gallery</a></li>
<li><a href="#">Our Leadership</a></li>
<li><a href="#">Careers</a></li>
<li><a href="#">Human Resources</a></li>
</ul> </ul>
</div> </div>
<div class="col-lg-3"> <div class="col-lg-3">
<h3 class="footer-heading"><span>Our Courses</span></h3> <h3 class="footer-heading"><span>Our Courses</span></h3>
<ul class="list-unstyled"> <ul class="list-unstyled">
<li><a href="#">Math</a></li> <li><a href="#">Classes</a></li>
<li><a href="#">Science &amp; Engineering</a></li> <!-- <li><a href="#">Science &amp; Engineering</a></li>
<li><a href="#">Arts &amp; Humanities</a></li> <li><a href="#">Arts &amp; Humanities</a></li>
<li><a href="#">Economics &amp; Finance</a></li> <li><a href="#">Economics &amp; Finance</a></li>
<li><a href="#">Business Administration</a></li> <li><a href="#">Business Administration</a></li> -->
<li><a href="#">Computer Science</a></li> <li><a href="#">Lessons</a></li>
</ul> </ul>
</div> </div>
<div class="col-lg-3"> <div class="col-lg-3">
<h3 class="footer-heading"><span>Contact</span></h3> <h3 class="footer-heading"><span>Contact Us</span></h3>
<ul class="list-unstyled"> <ul class="list-unstyled">
<li><a href="#">Help Center</a></li> <li><a href="#">Contact Us</a></li>
<li><a href="#">Support Community</a></li> <li><a href="#">Email</a></li>
<li><a href="#">Press</a></li> <li><a href="#">Facebook</a></li>
<li><a href="#">Share Your Story</a></li> <li><a href="#">Youtube</a></li>
<li><a href="#">Our Supporters</a></li>
</ul> </ul>
</div> </div>
</div> </div>
......
<!doctype html> <!doctype html>
<html lang="en"> <html lang="en">
<head>
<head>
<title>Registration</title> <title>Registration</title>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
...@@ -9,30 +10,30 @@ ...@@ -9,30 +10,30 @@
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="{{asset('admin/css/style.css')}}"> <link rel="stylesheet" href="{{asset('admin/css/style.css')}}">
</head> </head>
<style> <style>
::placeholder{ ::placeholder {
color: black !important; color: black !important;
} }
input[type="text"]{ input[type="text"] {
border: 1px solid black; border: 1px solid black;
} }
input[type="email"]{ input[type="email"] {
border: 1px solid black; border: 1px solid black;
} }
input[type="password"]{ input[type="password"] {
border: 1px solid black; border: 1px solid black;
} }
.select{ .select {
border: 1px solid black; border: 1px solid black;
} }
</style>
</style> <body>
<body>
<div class="wrapper d-flex align-items-stretch"> <div class="wrapper d-flex align-items-stretch">
<nav id="sidebar" class="active"> <nav id="sidebar" class="active">
...@@ -136,6 +137,47 @@ ...@@ -136,6 +137,47 @@
</div> </div>
</div> </div>
</div> </div>
<div class="col-6 mt-3">
<div class="card" style="height: 370px">
<div class="card-body">
<!-- Default form subscription -->
<form class="text-center border border-light p-5" action="/add_class" method="post">
@csrf
@if(Session()->get('classStatus') != '')
<div class="col-md-12 alert alert-success" role="alert">
{{Session()->get('classStatus')}}
</div>
@endif
<p class="h4 mb-4">Register New Class</p>
<!-- <p>Join our mailing list. We write rarely, but only the best content.</p> -->
<!-- <p>
<a href="" target="_blank">See the last newsletter</a>
</p> -->
<!-- Name -->
<div class="mb-3">
<input type="text" placeholder="Class Name" name="className" class="form-control">
</div>
<div class="mb-3">
<select name="teacherId" id="" class="form-control select">
<option value="">--- Select Teacher ---</option>
@foreach ($all_teachers as $teacher)
<option value="{{ $teacher['id'] }}">{{ $teacher['username'] }}</option>
@endforeach
</select>
</div>
<!-- Sign in button -->
<button class="btn btn-info btn-block" type="submit">Create Class</button>
</form>
<!-- Default form subscription -->
<a href="/all_classes">Show All Registered Classes -></a>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -144,5 +186,6 @@ ...@@ -144,5 +186,6 @@
<script src="{{asset('admin/js/popper.js')}}"></script> <script src="{{asset('admin/js/popper.js')}}"></script>
<script src="{{asset('admin/js/bootstrap.min.js')}}"></script> <script src="{{asset('admin/js/bootstrap.min.js')}}"></script>
<script src="{{asset('admin/js/main.js')}}"></script> <script src="{{asset('admin/js/main.js')}}"></script>
</body> </body>
</html> </html>
\ No newline at end of file
<head>
<title>Eduvance &mdash; Video Management System</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link href="https://fonts.googleapis.com/css?family=Muli:300,400,700,900" rel="stylesheet">
<link rel="stylesheet" href="{{ asset('fonts/icomoon/style.css') }}">
<link rel="stylesheet" href="{{ asset('css/bootstrap.min.css') }}">
<link rel="stylesheet" href="{{ asset('css/jquery-ui.css') }}">
<link rel="stylesheet" href="{{ asset('css/owl.carousel.min.css') }}">
<link rel="stylesheet" href="css/owl.theme.default.min.css">
<link rel="stylesheet" href="css/owl.theme.default.min.css">
<link rel="stylesheet" href="{{ asset('css/jquery.fancybox.min.css') }}">
<link rel="stylesheet" href="{{ asset('css/bootstrap-datepicker.css') }}">
<link rel="stylesheet" href="{{ asset('fonts/flaticon/font/flaticon.css') }}">
<link rel="stylesheet" href="{{ asset('css/aos.css') }}">
<link href="css/jquery.mb.YTPlayer.min.css" media="all" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="{{ asset('css/style.css') }}">
<link rel="stylesheet" href="{{asset('lesson_card/lesson_card.css')}}">
</head>
<div class="site-mobile-menu site-navbar-target"> <div class="site-mobile-menu site-navbar-target">
<div class="site-mobile-menu-header"> <div class="site-mobile-menu-header">
<div class="site-mobile-menu-close mt-3"> <div class="site-mobile-menu-close mt-3">
...@@ -12,9 +40,7 @@ ...@@ -12,9 +40,7 @@
<div class="container"> <div class="container">
<div class="row align-items-center"> <div class="row align-items-center">
<div class="col-lg-9 d-none d-lg-block"> <div class="col-lg-9 d-none d-lg-block">
<a href="#" class="small mr-3"><span class="icon-question-circle-o mr-2"></span> Have a questions?</a> <a href="/" class="btn btn-primary btn-lg" style="background-color: dodgerblue">Main System</a>
<a href="#" class="small mr-3"><span class="icon-phone2 mr-2"></span> 10 20 123 456</a>
<a href="#" class="small mr-3"><span class="icon-envelope-o mr-2"></span> info@mydomain.com</a>
</div> </div>
<div class="col-lg-3 text-right"> <div class="col-lg-3 text-right">
@if(Session()->has('member')) @if(Session()->has('member'))
...@@ -49,9 +75,17 @@ ...@@ -49,9 +75,17 @@
<div class="container"> <div class="container">
<div class="d-flex align-items-center"> <div class="d-flex align-items-center">
<div class="site-logo"> <div class="site-logo">
<a href="/" class="d-block"> <a href="/main" class="d-block">
<!-- <img src="images/logo.png" alt="Image" class="img-fluid"> --> <div class="row">
<p>Eduvance - Video Management System</p> <div class="col">
<img src="{{ asset('images/logo_new.png') }}" style="width: 150px; height: 140px;" alt="Image" class="img-fluid">
</div>
<div class="row" style="margin-top: 55px">
<div class="col">
<p>Video Management System</p>
</div>
</div>
</div>
</a> </a>
</div> </div>
<div class="ml-auto"> <div class="ml-auto">
...@@ -69,7 +103,9 @@ ...@@ -69,7 +103,9 @@
</ul> </ul>
</li> --> </li> -->
<li> <li>
@if (Session()->get('teacherStatus'))
<a href="/admin_board" class="nav-link text-left">Dashboard</a> <a href="/admin_board" class="nav-link text-left">Dashboard</a>
@endif
<a href="/lessons" class="nav-link text-left">Lessons</a> <a href="/lessons" class="nav-link text-left">Lessons</a>
</li> </li>
<li> <li>
...@@ -81,9 +117,9 @@ ...@@ -81,9 +117,9 @@
</div> </div>
<div class="ml-auto"> <div class="ml-auto">
<div class="social-wrap"> <div class="social-wrap">
<a href="#"><span class="icon-facebook"></span></a> <a href="https://www.facebook.com/profile.php?id=100086794281981"><span class="icon-facebook"></span></a>
<a href="#"><span class="icon-twitter"></span></a> <a href="https://www.youtube.com/channel/UCxfkDZSDPo7UdeGHXMFNyLw"><span class="icon-youtube"></span></a>
<a href="#"><span class="icon-linkedin"></span></a> <a href="mailto:eduvanceschoolms@gmail.com"><span class="icon-google"></span></a>
<a href="#" class="d-inline-block d-lg-none site-menu-toggle js-menu-toggle text-black"><span <a href="#" class="d-inline-block d-lg-none site-menu-toggle js-menu-toggle text-black"><span
class="icon-menu h3"></span></a> class="icon-menu h3"></span></a>
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
<div class="container"> <div class="container">
<div class="row align-items-center"> <div class="row align-items-center">
<div class="col-lg-12 mx-auto text-center" data-aos="fade-up"> <div class="col-lg-12 mx-auto text-center" data-aos="fade-up">
<h1>- Eduvance -</h1> <h1>- EDUVANCE -</h1>
<h1>Video Management System</h1> <h1>Video Management System</h1>
</div> </div>
</div> </div>
...@@ -510,41 +510,41 @@ ...@@ -510,41 +510,41 @@
<div class="footer"> <div class="footer">
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<!-- <div class="col-lg-3"> <div class="col-lg-3">
<p class="mb-4"><img src="images/logo.png" alt="Image" class="img-fluid"></p> <p class="mb-4"><img src="images/profile.jpeg" alt="Image" class="img-fluid"></p>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Beatae nemo minima qui dolor, iusto iure.</p> <!-- <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Beatae nemo minima qui dolor, iusto iure.</p>
<p><a href="#">Learn More</a></p> <p><a href="#">Learn More</a></p> -->
</div> --> </div>
<div class="col-lg-3"> <div class="col-lg-3">
<h3 class="footer-heading"><span>Our School</span></h3> <h3 class="footer-heading"><span>Our School</span></h3>
<ul class="list-unstyled"> <ul class="list-unstyled">
<li><a href="#">Academic</a></li> <li><a href="#">Story</a></li>
<li><a href="#">Vision</a></li>
<li><a href="#">Mission</a></li>
<li><a href="#">News</a></li> <li><a href="#">News</a></li>
<li><a href="#">Our Interns</a></li> <li><a href="#">Gallery</a></li>
<li><a href="#">Our Leadership</a></li>
<li><a href="#">Careers</a></li>
<li><a href="#">Human Resources</a></li>
</ul> </ul>
</div> </div>
<div class="col-lg-3"> <div class="col-lg-3">
<h3 class="footer-heading"><span>Our Courses</span></h3> <h3 class="footer-heading"><span>Our Courses</span></h3>
<ul class="list-unstyled"> <ul class="list-unstyled">
<li><a href="#">Math</a></li> <li><a href="#">Classes</a></li>
<li><a href="#">Science &amp; Engineering</a></li> <!-- <li><a href="#">Science &amp; Engineering</a></li>
<li><a href="#">Arts &amp; Humanities</a></li> <li><a href="#">Arts &amp; Humanities</a></li>
<li><a href="#">Economics &amp; Finance</a></li> <li><a href="#">Economics &amp; Finance</a></li>
<li><a href="#">Business Administration</a></li> <li><a href="#">Business Administration</a></li> -->
<li><a href="#">Computer Science</a></li> <li><a href="#">Lessons</a></li>
</ul> </ul>
</div> </div>
<div class="col-lg-3"> <div class="col-lg-3">
<h3 class="footer-heading"><span>Contact Us</span></h3> <h3 class="footer-heading"><span>Contact Us</span></h3>
<ul class="list-unstyled"> <ul class="list-unstyled">
<li><a href="#">Help Center</a></li> <li><a href="#">Contact Us</a></li>
<li><a href="#">Support Community</a></li> <li><a href="#">Email</a></li>
<li><a href="#">Press</a></li> <li><a href="#">Facebook</a></li>
<li><a href="#">Share Your Story</a></li> <li><a href="#">Youtube</a></li>
<li><a href="#">Our Supporters</a></li>
</ul> </ul>
</div> </div>
</div> </div>
......
<!doctype html>
<html lang="en">
<head>
<title>Add Documents</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link href="https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700,800,900" rel="stylesheet">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="{{asset('admin/css/style.css')}}">
</head>
<style>
::placeholder {
color: black !important;
}
input[type="text"] {
border: 1px solid black;
}
input[type="email"] {
border: 1px solid black;
}
input[type="password"] {
border: 1px solid black;
}
input[type="file"] {
border: 1px solid black;
}
.select {
border: 1px solid black;
}
.fl-l {
float: left !important;
color: black;
}
</style>
<body>
<div class="wrapper d-flex align-items-stretch">
<nav id="sidebar" class="active">
<div class="custom-menu">
<button type="button" id="sidebarCollapse" class="btn btn-primary">
<i class="fa fa-bars"></i>
<span class="sr-only">Toggle Menu</span>
</button>
</div>
{{View::make('admin_header')}}
<!-- Page Content -->
<div id="content" class="p-4 p-md-5 pt-5">
<h2 class="mb-4">Add Documents For Lessons</h2>
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-body">
<form action="/upload-documents" class="form-group" method="post" enctype="multipart/form-data">
@csrf
@if(Session()->get('status') != '')
<div class="col-md-12 alert alert-success" role="alert">
{{Session()->get('status')}}
</div>
@endif
<div class="row">
<div class="col-6">
<label for="documentTitle">Type Document Title :</label>
<input type="text" class="form-control" placeholder="Eg. Lesson 1" name="documentTitle">
</div>
<div class="col-6">
<label for="selectedLesson">Select Class Here :</label>
<select name="classGrade" id="grade" class="form-control grade select">
<option value="0">-- Select Class Here --</option>
@foreach ($classes as $class)
<option value="{{ $class['id'] }}">{{ $class['name'] }}</option>
@endforeach
</select>
</div>
</div>
<div class="row mt-3">
<div class="col-6">
<label for="selectedLesson">Select Subject Here :</label>
<select name="classSubject" id="subject" class="form-control subject select">
<option value="0">-- Select Subject Here --</option>
</select>
</div>
<div class="col-6">
<label for="selectedLesson">Select Lesson Here :</label>
<select name="lessonName" id="lesson" class="form-control select lesson">
<option value="0" selected>---Select Lesson---</option>
</select>
</div>
</div>
<div class="row mt-3">
<div class="col-12">
<label for="uploadDocument">Upload Document Here :</label>
<div class="row">
<div class="col-8">
<input type="file" class="form-control" name="fileName">
</div>
<div class="col-2">
<input type="submit" class="btn btn-primary" value="Add Document">
</div>
<div class="col-2">
<input type="reset" class="btn btn-primary" value="Reset Feilds">
</div>
</div>
</div>
</div>
</form>
</div>
</div>
<div class="row mt-3">
<div class="col-12">
<table class="table">
<tbody>
<tr>
<th>Title</th>
<th>Lesson Title</th>
<th>Doc Type</th>
<th class="text-center">Actions</th>
</tr>
@foreach ($documents as $document)
<tr>
<td>{{ $document['document_title'] }}</td>
<td>{{ $document['lesson_name'] }}</td>
@if($document['document_name'])
<?php
$path_parts = pathinfo( $document['document_name'], PATHINFO_EXTENSION);
?>
<td>{{ $path_parts }}</td>
@endif
<td class="text-center">
<a href="/delete-document/{{ $document['id'] }}" class="btn btn-danger btn-sm">Delete Document</a>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</nav>
</div>
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<script>
$(document).ready(function(){
$(document).on('change', '.grade',function(){
var elname = document.getElementById("subject");
var elnameLesson = document.getElementById("lesson");
for (i=0; i<elname.length; i++) {
if (elname.options[i]) {
console.log(elname.remove(i));
console.log(elnameLesson.remove(i));
elname.remove(i);
elnameLesson.remove(i);
}
console.log(elname.remove(i));
console.log(elnameLesson.remove(i));
}
var class_id = $(this).val();
var div = $(this).parent();
var op = " ";
$.ajax({
type:'GET',
url: "{{ URL::to('findSubjectsForDocumentAdd') }}",
data:{'id': class_id},
dataType:'json',
success:function(data){
// for(var i=0; i<data.length; i++){
// console.log(data[i]);
// }
// console.log("ok");
// op += '<option value="0" selected disabled>--Select Subject</option>';
var option = document.createElement("option");
option.text = "--- select Subject ---";
elname.appendChild(option);
for(var i=0; i<data.length; i++){
// op += '<option value="e">'+"k"+'</option>';
var option = document.createElement("option");
option.value = data[i].id;
option.text = data[i].name;
option.id = "option";
elname.appendChild(option);
}
// div.find('.subjectname').html(" ");
// div.find('.subjectname').append(op);
},
error:function(err){
console.log(err);
}
});
});
});
$(document).ready(function(){
$(document).on('change','.subject',function(){
var elname = document.getElementById("lesson");
for (i=0; i<elname.length; i++) {
if (elname.options[i]) {
console.log(elname.remove(i));
elname.remove(i);
}
}
var sub_id = $(this).val();
var div = $(this).parent();
var op = " ";
$.ajax({
type:'GET',
url: "{{ URL::to('findLessonsForDocumentAdd') }}",
data:{'id': sub_id},
dataType:'json',
success:function(data){
// for(var i=0; i<data.length; i++){
// console.log(data[i]);
// }
// console.log("ok");
// op += '<option value="0" selected disabled>--Select Subject</option>';
for(var i=0; i<data.length; i++){
// op += '<option value="e">'+"k"+'</option>';
var option = document.createElement("option");
option.value = data[i].id;
option.text = data[i].lesson_name;
option.id = "option";
elname.appendChild(option);
}
// div.find('.subjectname').html(" ");
// div.find('.subjectname').append(op);
},
error:function(err){
console.log(err);
}
});
});
});
</script>
<!-- <script src="{{asset('admin/js/jquery.min.js')}}"></script> -->
<script src="{{asset('admin/js/popper.js')}}"></script>
<script src="{{asset('admin/js/bootstrap.min.js')}}"></script>
<script src="{{asset('admin/js/main.js')}}"></script>
</body>
</html>
\ No newline at end of file
...@@ -18,8 +18,32 @@ ...@@ -18,8 +18,32 @@
$update_url = $sep[0] . "//" . $sep[1] . $sec[0] . ".ss" . $sec[1] . "." . $sec[2] . "/" . $sep[3]; $update_url = $sep[0] . "//" . $sep[1] . $sec[0] . ".ss" . $sec[1] . "." . $sec[2] . "/" . $sep[3];
//dd($lesson_details[0]['platform_link'] . " " . $new_url); //dd($lesson_details[0]['platform_link'] . " " . $new_url);
}
$myApiKey = 'AIzaSyAJZunz449szg75gJe_aNxFU3Wyo-Le7tg';
$googleApi =
'https://www.googleapis.com/youtube/v3/videos?id='
. $sep_slash[1] . '&key=' . $myApiKey . '&part=statistics';
/* Create new resource */
$ch = curl_init();
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
/* Set the URL and options */
curl_setopt($ch, CURLOPT_URL, $googleApi);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_VERBOSE, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
/* Grab the URL */
$curlResource = curl_exec($ch);
/* Close the resource */
curl_close($ch);
$youtubeData = json_decode($curlResource);
$view_count = $youtubeData->items[0]->statistics->viewCount;
}
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
...@@ -156,9 +180,9 @@ ...@@ -156,9 +180,9 @@
<div class="custom-breadcrumns border-bottom"> <div class="custom-breadcrumns border-bottom">
<div class="container"> <div class="container">
<a href="/">Home</a> <a href="index.html">Home</a>
<span class="mx-3 icon-keyboard_arrow_right"></span> <span class="mx-3 icon-keyboard_arrow_right"></span>
<a href="courses.html">Courses</a> <span class="current">Lessons</span>
</div> </div>
</div> </div>
...@@ -174,13 +198,43 @@ ...@@ -174,13 +198,43 @@
allowfullscreen></iframe> --> allowfullscreen></iframe> -->
@if($lesson_details[0]['lesson_vedio_link'] != "N") @if($lesson_details[0]['lesson_vedio_link'] != "N")
<video width="580" height="370" controls> <video width="580" height="370" id="video" controls>
<source src="{{asset('public/vedios/'.$lesson_details[0]['lesson_vedio_link'])}}" type="video/mp4"> <source src="{{asset('public/vedios/'.$lesson_details[0]['lesson_vedio_link'])}}" type="video/mp4" id="video-for-play-count">
</video> </video>
<div class="card" style="width: 580px;">
<div class="card-body">
<div class="row">
<div class="col-7">
<svg style="float: right; margin-top: 8px" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye-fill" viewBox="0 0 16 16">
<path d="M10.5 8a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0z"/>
<path d="M0 8s3-5.5 8-5.5S16 8 16 8s-3 5.5-8 5.5S0 8 0 8zm8 3.5a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7z"/>
</svg>
</div>
<div class="col-5">
View Count :- {{ $viewCount }}
</div>
</div>
</div>
</div>
@else @else
<iframe width="580" height="370" <iframe width="580" height="370"
src="{{ $lesson_details[0]['platform_link'] }}"> src="{{ $lesson_details[0]['platform_link'] }}">
</iframe> </iframe>
<div class="card" style="width: 580px;">
<div class="card-body">
<div class="row">
<div class="col-7">
<svg style="float: right; margin-top: 8px" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye-fill" viewBox="0 0 16 16">
<path d="M10.5 8a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0z"/>
<path d="M0 8s3-5.5 8-5.5S16 8 16 8s-3 5.5-8 5.5S0 8 0 8zm8 3.5a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7z"/>
</svg>
</div>
<div class="col-5">
View Count :- {{ $view_count }}
</div>
</div>
</div>
</div>
@endif @endif
</p> </p>
</div> </div>
...@@ -226,8 +280,34 @@ ...@@ -226,8 +280,34 @@
<div class="col-12"> <div class="col-12">
<div class="card"> <div class="card">
<div class="card-body"> <div class="card-body">
<h4 class="card-title">Lesson Materials</h4> <h4 class="card-title">Lesson Documents</h4>
<h6 class="card-subtitle">You can get All teh Lecture Materials Here</h6> <h6 class="card-subtitle">You can get all lesson documents from here.</h6>
<div class="row mt-3">
@foreach ($lessonDocuments as $document)
<?php
$path_parts = pathinfo( $document['document_name'], PATHINFO_EXTENSION);
?>
<div class="col-3 text-center">
<div class="card">
<div class="card-body">
@if ($path_parts == "docx")
<img src="{{asset('doctypes/doc.png')}}" alt="" style="width: 200px; height: 200px;">
<div class="mt-3">
{{ $document['document_title'] }}
<a href="{{asset('public/documents/'.$document['document_name']) }}" class="btn btn-success btn-sm" style="color: white">Download Document</a>
</div>
@elseif ($path_parts == "pdf")
<img src="{{asset('doctypes/pdf.png')}}" alt="" style="width: 200px; height: 200px;">
<div class="mt-3">
{{ $document['document_title'] }}
<a href="{{asset('public/documents/'.$document['document_name']) }}" class="btn btn-success btn-sm" style="color: white">Download Document</a>
</div>
@endif
</div>
</div>
</div>
@endforeach
</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -235,19 +315,19 @@ ...@@ -235,19 +315,19 @@
<div class="col-12 mt-3"> <div class="col-12 mt-3">
<div class="card"> <div class="card">
<div class="card-body"> <div class="card-body">
<h4 class="card-title">Lesson Summery</h4> <h4 class="card-title">Lesson Text</h4>
<h6 class="card-subtitle">You can generate Lesson Summery here</h6> <h6 class="card-subtitle">You can get the whole lesson words converted into text from here.</h6>
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<form action="/generate" class="form-group" method="post"> <form action="/generate" class="form-group" method="post">
@csrf @csrf
<input type="hidden" name="lessonId" value="{{ $lesson_details[0]['lesson_id'] }}"> <input type="hidden" name="lessonId" value="{{ $lesson_details[0]['lesson_id'] }}">
<input type="hidden" name="lessonLink" value="public/public/vedios/{{$lesson_details[0]['lesson_vedio_link']}}"> <input type="hidden" name="lessonLink" value="public/public/vedios/{{$lesson_details[0]['lesson_vedio_link']}}">
<input type="submit" class="btn btn-primary mt-3" value="Generate Lesson Summery"> <input type="submit" class="btn btn-primary mt-3" value="Generate Lesson Text">
</form> </form>
@if(Session()->get('decoded_summery')) @if(Session()->get('decoded_summery'))
<div> <div>
<textarea style="width: 100%" name="" id="" cols="30" rows="10" onclick="this.select()">{{ Session()->get('decoded_summery') }}</textarea> <textarea style="width: 100%" name="" id="loading" cols="30" rows="10" onclick="this.select()">{{ Session()->get('decoded_summery') }}</textarea>
</div> </div>
@endif @endif
...@@ -275,16 +355,13 @@ ...@@ -275,16 +355,13 @@
<div class="comment-widgets m-b-20"> <div class="comment-widgets m-b-20">
<div class="d-flex flex-row comment-row"> <div class="d-flex flex-row comment-row">
<div class="p-2"><span class="round"><img src="https://i.imgur.com/uIgDDDd.jpg" alt="user" <div class="p-2"><span class="round"><img src="https://www.freeiconspng.com/thumbs/profile-icon-png/profile-icon-9.png" alt="user"
width="50"></span></div> width="50"></span></div>
<div class="comment-text w-100"> <div class="comment-text w-100" style="margin-top: -10px">
<span class="date">{{ $each_comment['created_at']->toDateString() }}</span>
<h5>{{ $each_comment['display_name'] }}</h5> <h5>{{ $each_comment['display_name'] }}</h5>
<div class="comment-footer"> <div class="comment-footer" style="margin-top: -10px;">
<span class="date">{{ $each_comment['created_at'] }}</span> <span>{{ $each_comment['email_address'] }}</span>
<a href="#" data-abc="true"><i class="fa fa-pencil"></i></a>
<a href="#" data-abc="true"><i class="fa fa-rotate-right"></i></a>
<a href="#" data-abc="true"><i class="fa fa-heart"></i></a>
</span>
</div> </div>
<p class="m-b-5 m-t-10">{{ $each_comment['message'] }}</p> <p class="m-b-5 m-t-10">{{ $each_comment['message'] }}</p>
</div> </div>
...@@ -324,9 +401,6 @@ ...@@ -324,9 +401,6 @@
</div> </div>
</div> </div>
</div> </div>
<!-- feedback form ending -->
</div> </div>
</div> </div>
...@@ -358,41 +432,40 @@ ...@@ -358,41 +432,40 @@
<div class="footer"> <div class="footer">
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<!-- <div class="col-lg-3">
<p class="mb-4"><img src="images/logo.png" alt="Image" class="img-fluid"></p>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Beatae nemo minima qui dolor, iusto iure.</p>
<p><a href="#">Learn More</a></p>
</div> -->
<div class="col-lg-3"> <div class="col-lg-3">
<h3 class="footer-heading"><span>Our Campus</span></h3> <p class="mb-4"><img src="images/profile.jpeg" alt="Image" class="img-fluid"></p>
<!-- <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Beatae nemo minima qui dolor, iusto iure.</p>
<p><a href="#">Learn More</a></p> -->
</div>
<div class="col-lg-3">
<h3 class="footer-heading"><span>Our School</span></h3>
<ul class="list-unstyled"> <ul class="list-unstyled">
<li><a href="#">Acedemic</a></li> <li><a href="#">Story</a></li>
<li><a href="#">Vision</a></li>
<li><a href="#">Mission</a></li>
<li><a href="#">News</a></li> <li><a href="#">News</a></li>
<li><a href="#">Our Interns</a></li> <li><a href="#">Gallery</a></li>
<li><a href="#">Our Leadership</a></li>
<li><a href="#">Careers</a></li>
<li><a href="#">Human Resources</a></li>
</ul> </ul>
</div> </div>
<div class="col-lg-3"> <div class="col-lg-3">
<h3 class="footer-heading"><span>Our Courses</span></h3> <h3 class="footer-heading"><span>Our Courses</span></h3>
<ul class="list-unstyled"> <ul class="list-unstyled">
<li><a href="#">Math</a></li> <li><a href="#">Classes</a></li>
<li><a href="#">Science &amp; Engineering</a></li> <!-- <li><a href="#">Science &amp; Engineering</a></li>
<li><a href="#">Arts &amp; Humanities</a></li> <li><a href="#">Arts &amp; Humanities</a></li>
<li><a href="#">Economics &amp; Finance</a></li> <li><a href="#">Economics &amp; Finance</a></li>
<li><a href="#">Business Administration</a></li> <li><a href="#">Business Administration</a></li> -->
<li><a href="#">Computer Science</a></li> <li><a href="#">Lessons</a></li>
</ul> </ul>
</div> </div>
<div class="col-lg-3"> <div class="col-lg-3">
<h3 class="footer-heading"><span>Contact</span></h3> <h3 class="footer-heading"><span>Contact Us</span></h3>
<ul class="list-unstyled"> <ul class="list-unstyled">
<li><a href="#">Help Center</a></li> <li><a href="#">Contact Us</a></li>
<li><a href="#">Support Community</a></li> <li><a href="#">Email</a></li>
<li><a href="#">Press</a></li> <li><a href="#">Facebook</a></li>
<li><a href="#">Share Your Story</a></li> <li><a href="#">Youtube</a></li>
<li><a href="#">Our Supporters</a></li>
</ul> </ul>
</div> </div>
</div> </div>
...@@ -413,7 +486,7 @@ ...@@ -413,7 +486,7 @@
</div> </div>
</div> </div>
</div> </div>
<input type="hidden" id="userId" value="{{ $userId }}">
</div> </div>
<!-- .site-wrap --> <!-- .site-wrap -->
...@@ -424,7 +497,26 @@ ...@@ -424,7 +497,26 @@
<circle class="path" cx="24" cy="24" r="22" fill="none" stroke-width="4" stroke-miterlimit="10" <circle class="path" cx="24" cy="24" r="22" fill="none" stroke-width="4" stroke-miterlimit="10"
stroke="#51be78" /> stroke="#51be78" />
</svg></div> </svg></div>
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<script>
document.getElementById('video').addEventListener('ended',onCalculateViewCount,false);
function onCalculateViewCount(e) {
var d = window.location.pathname;
var g = d.split("/")
var lessonId = g[2];
var userId = document.getElementById("userId").value;
let url = "{{ route('test', ':id') }}";
url = url.replace(':id', lessonId);
document.location.href=url;
}
</script>
<script>
function setLoading() {
document.getElementById("loading").value = "Loading...";
}
</script>
<script src="{{asset('js/jquery-3.3.1.min.js')}}"></script> <script src="{{asset('js/jquery-3.3.1.min.js')}}"></script>
<script src="{{asset('js/jquery-migrate-3.0.1.min.js')}}"></script> <script src="{{asset('js/jquery-migrate-3.0.1.min.js')}}"></script>
<script src="{{asset('js/jquery-ui.js')}}"></script> <script src="{{asset('js/jquery-ui.js')}}"></script>
......
...@@ -173,41 +173,40 @@ ...@@ -173,41 +173,40 @@
<div class="footer"> <div class="footer">
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<!-- <div class="col-lg-3">
<p class="mb-4"><img src="images/logo.png" alt="Image" class="img-fluid"></p>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Beatae nemo minima qui dolor, iusto iure.</p>
<p><a href="#">Learn More</a></p>
</div> -->
<div class="col-lg-3"> <div class="col-lg-3">
<h3 class="footer-heading"><span>Our Campus</span></h3> <p class="mb-4"><img src="images/profile.jpeg" alt="Image" class="img-fluid"></p>
<!-- <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Beatae nemo minima qui dolor, iusto iure.</p>
<p><a href="#">Learn More</a></p> -->
</div>
<div class="col-lg-3">
<h3 class="footer-heading"><span>Our School</span></h3>
<ul class="list-unstyled"> <ul class="list-unstyled">
<li><a href="#">Acedemic</a></li> <li><a href="#">Story</a></li>
<li><a href="#">Vision</a></li>
<li><a href="#">Mission</a></li>
<li><a href="#">News</a></li> <li><a href="#">News</a></li>
<li><a href="#">Our Interns</a></li> <li><a href="#">Gallery</a></li>
<li><a href="#">Our Leadership</a></li>
<li><a href="#">Careers</a></li>
<li><a href="#">Human Resources</a></li>
</ul> </ul>
</div> </div>
<div class="col-lg-3"> <div class="col-lg-3">
<h3 class="footer-heading"><span>Our Courses</span></h3> <h3 class="footer-heading"><span>Our Courses</span></h3>
<ul class="list-unstyled"> <ul class="list-unstyled">
<li><a href="#">Math</a></li> <li><a href="#">Classes</a></li>
<li><a href="#">Science &amp; Engineering</a></li> <!-- <li><a href="#">Science &amp; Engineering</a></li>
<li><a href="#">Arts &amp; Humanities</a></li> <li><a href="#">Arts &amp; Humanities</a></li>
<li><a href="#">Economics &amp; Finance</a></li> <li><a href="#">Economics &amp; Finance</a></li>
<li><a href="#">Business Administration</a></li> <li><a href="#">Business Administration</a></li> -->
<li><a href="#">Computer Science</a></li> <li><a href="#">Lessons</a></li>
</ul> </ul>
</div> </div>
<div class="col-lg-3"> <div class="col-lg-3">
<h3 class="footer-heading"><span>Contact</span></h3> <h3 class="footer-heading"><span>Contact Us</span></h3>
<ul class="list-unstyled"> <ul class="list-unstyled">
<li><a href="#">Help Center</a></li> <li><a href="#">Contact Us</a></li>
<li><a href="#">Support Community</a></li> <li><a href="#">Email</a></li>
<li><a href="#">Press</a></li> <li><a href="#">Facebook</a></li>
<li><a href="#">Share Your Story</a></li> <li><a href="#">Youtube</a></li>
<li><a href="#">Our Supporters</a></li>
</ul> </ul>
</div> </div>
</div> </div>
......
...@@ -96,41 +96,41 @@ ...@@ -96,41 +96,41 @@
<div class="footer"> <div class="footer">
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<!-- <div class="col-lg-3">
<p class="mb-4"><img src="images/logo.png" alt="Image" class="img-fluid"></p>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Beatae nemo minima qui dolor, iusto iure.</p>
<p><a href="#">Learn More</a></p>
</div> -->
<div class="col-lg-3"> <div class="col-lg-3">
<h3 class="footer-heading"><span>Our Campus</span></h3> <p class="mb-4"><img src="images/profile.jpeg" alt="Image" class="img-fluid"></p>
<!-- <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Beatae nemo minima qui dolor, iusto iure.</p>
<p><a href="#">Learn More</a></p> -->
</div>
<div class="col-lg-3">
<h3 class="footer-heading"><span>Our School</span></h3>
<ul class="list-unstyled"> <ul class="list-unstyled">
<li><a href="#">Acedemic</a></li> <li><a href="#">Story</a></li>
<li><a href="#">Vision</a></li>
<li><a href="#">Mission</a></li>
<li><a href="#">News</a></li> <li><a href="#">News</a></li>
<li><a href="#">Our Interns</a></li> <li><a href="#">Gallery</a></li>
<li><a href="#">Our Leadership</a></li>
<li><a href="#">Careers</a></li>
<li><a href="#">Human Resources</a></li>
</ul> </ul>
</div> </div>
<div class="col-lg-3"> <div class="col-lg-3">
<h3 class="footer-heading"><span>Our Courses</span></h3> <h3 class="footer-heading"><span>Our Courses</span></h3>
<ul class="list-unstyled"> <ul class="list-unstyled">
<li><a href="#">Math</a></li> <li><a href="#">Classes</a></li>
<li><a href="#">Science &amp; Engineering</a></li> <!-- <li><a href="#">Sc &amp; Engineering</a></li>
<li><a href="#">Arts &amp; Humanities</a></li> <li><a href="#">Arts &amp; Humanities</a></li>
<li><a href="#">Economics &amp; Finance</a></li> <li><a href="#">Economics &amp; Finance</a></li>
<li><a href="#">Business Administration</a></li> <li><a href="#">Business Administration</a></li> -->
<li><a href="#">Computer Science</a></li> <li><a href="#">Lessons</a></li>
</ul> </ul>
</div> </div>
<div class="col-lg-3"> <div class="col-lg-3">
<h3 class="footer-heading"><span>Contact</span></h3> <h3 class="footer-heading"><span>Contact</span></h3>
<ul class="list-unstyled"> <ul class="list-unstyled">
<li><a href="#">Help Center</a></li> <li><a href="#">Contact Us</a></li>
<li><a href="#">Support Community</a></li> <li><a href="#">Email</a></li>
<li><a href="#">Press</a></li> <li><a href="#">Facebook</a></li>
<li><a href="#">Share Your Story</a></li> <li><a href="#">Youtube</a></li>
<li><a href="#">Our Supporters</a></li>
</ul> </ul>
</div> </div>
</div> </div>
......
...@@ -8,27 +8,23 @@ ...@@ -8,27 +8,23 @@
<title>Main Page</title> <title>Main Page</title>
</head> </head>
<body> <body>
<body style="background-color:#87CEFA;"> <body style="background-repeat: no-repeat; background-size: cover; background-image: url({{asset('images/background.png')}});">
<div class="container"> <div class="container">
<div class="row mt-5"> <div class="row mt-5">
<div class="col-2">
<img src="{{ asset('images/logo_new.png') }}" style="width: 300px; height: 110px;" alt="Image" class="img-fluid">
</div>
<div class="col">
<span class="text-center mt-2 mb-5"> <span class="text-center mt-2 mb-5">
<h1>Eduvance - School Learning Management System</h1> <h1 style="color: black; font-size: 50px; font-weight: bolder;">EDUVANCE - School Learning Management System</h1>
</span> </span>
<div class="col-3">
<div class="card" style="height: 20rem;">
<div class="card-body">
<h2 class="text-center">AI ChatBot</h1>
<div class="text-center">
<a href="" class="btn btn-primary mt-5">View System</a>
</div>
</div>
</div>
</div> </div>
<div class="row mt-5">
<div class="col-3"> <div class="col-3">
<div class="card" style="height: 20rem;"> <div class="card" style="height: 18rem;width: 22rem;">
<div class="card-body"> <div class="card-body">
<h2 class="text-center">Course Recommendation</h1> <h2 class="text-center" style="font-weight: bolder;">Course Recommendation</h1>
<div class="text-center"> <div class="text-center">
<a href="" class="btn btn-primary mt-5">View System</a> <a href="" class="btn btn-primary mt-5">View System</a>
</div> </div>
...@@ -36,28 +32,21 @@ ...@@ -36,28 +32,21 @@
</div> </div>
</div> </div>
<div class="col-3"> <div class="col-3" style="margin-left: 40px;">
<div class="card" style="height: 20rem;"> <div class="card" style="height: 18rem;width: 22rem;">
<div class="card-body"> <div class="card-body">
<h2 class="text-center">Video Management System</h1> <h2 class="text-center" style="font-weight: bolder;">Video Management System</h1>
<div class="text-center"> <div class="text-center">
<a href="/main" class="btn btn-primary mt-5">View System</a> <a href="/main" class="btn btn-primary mt-5">View System</a>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="col-3">
<div class="card" style="height: 20rem;">
<div class="card-body">
<h2 class="text-center">Teacher Performance Handler</h1>
<div class="text-center">
<a href="" class="btn btn-primary mt-5">View System</a>
</div>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
</p> --> </p> -->
<div class="mb-3"> <div class="mb-3">
<label for="teacherId" class="fl-l">Teacher Name -</label> <label for="teacherId" class="fl-l">Select Teacher Name -</label>
<select name="teacherId" id="" class="form-control" style="border: 1px solid black;"> <select name="teacherId" id="" class="form-control" style="border: 1px solid black;">
<!-- @foreach($teachers as $each_teacher) <!-- @foreach($teachers as $each_teacher)
<option value="{{ $each_teacher['id'] }}">{{ $each_teacher['username'] }}</option> <option value="{{ $each_teacher['id'] }}">{{ $each_teacher['username'] }}</option>
......
<!doctype html>
<html lang="en">
<head>
<title>All Subjects</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link href="https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700,800,900" rel="stylesheet">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="{{asset('admin/css/style.css')}}">
</head>
<style>
::placeholder {
color: black !important;
}
input[type="text"] {
border: 1px solid black;
}
input[type="email"] {
border: 1px solid black;
}
input[type="password"] {
border: 1px solid black;
}
.fl-l {
float: left !important;
color: black;
}
.select {
border: 1px solid black;
}
</style>
<body>
<div class="wrapper d-flex align-items-stretch">
<nav id="sidebar" class="active">
<div class="custom-menu">
<button type="button" id="sidebarCollapse" class="btn btn-primary">
<i class="fa fa-bars"></i>
<span class="sr-only">Toggle Menu</span>
</button>
</div>
{{View::make('admin_header')}}
<!-- Page Content -->
<div id="content" class="p-4 p-md-5 pt-5">
<h2 class="mb-4">Update Class Details</h2>
<div class="row">
<div class="col">
<div class="card">
<div class="card-body">
<form class="text-center border border-light p-5" action="/update_class" method="post">
@csrf
@if(Session()->get('status') != '')
<div class="col-md-12 alert alert-success" role="alert">
{{Session()->get('status')}}
</div>
@endif
<p class="h4 mb-4">Update Class Details</p>
<!-- <p>Join our mailing list. We write rarely, but only the best content.</p> -->
<!-- <p>
<a href="" target="_blank">See the last newsletter</a>
</p> -->
<!-- Name -->
<div class="mb-3">
<input type="hidden" value="{{ $selected_classDetails[0]['id'] }}" name="classId">
<input type="text" placeholder="Class Name" name="className" class="form-control" value="{{ $selected_classDetails[0]['name'] }}">
</div>
<div class="mb-3">
<select name="teacherId" id="" class="form-control select">
@foreach ($all_teachers as $teacher)
@if($selected_classDetails[0]['username'] == $teacher['username'])
<option value="{{ $teacher['id'] }}" selected>{{ $teacher['username'] }}</option>
@else
<option value="{{ $teacher['id'] }}">{{ $teacher['username'] }}</option>
@endif
@endforeach
</select>
</div>
<!-- Sign in button -->
<button class="btn btn-info btn-block" type="submit">Update Class Details</button>
</form>
<a href="/add_subject">
<- Back to Subjects Tab</a>
</div>
</div>
</div>
</div>
</div>
<script src="{{asset('admin/js/jquery.min.js')}}"></script>
<script src="{{asset('admin/js/popper.js')}}"></script>
<script src="{{asset('admin/js/bootstrap.min.js')}}"></script>
<script src="{{asset('admin/js/main.js')}}"></script>
</body>
</html>
\ No newline at end of file
<!doctype html> <!doctype html>
<html lang="en"> <html lang="en">
<head> <head>
<title>Sidebar 03</title> <title>Update Lesson</title>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
...@@ -67,11 +67,11 @@ ...@@ -67,11 +67,11 @@
@endif @endif
<p class="h4 mb-4">Update Lesson</p> <p class="h4 mb-4">Update Lesson</p>
<p>Join our mailing list. We write rarely, but only the best content.</p> <!-- <p>Join our mailing list. We write rarely, but only the best content.</p> -->
<p> <!-- <p>
<a href="" target="_blank">See the last newsletter</a> <a href="" target="_blank">See the last newsletter</a>
</p> </p> -->
<div class="mb-3"> <div class="mb-3">
<label for="classGrade" style="float: left; color: black;">Select Grade</label> <label for="classGrade" style="float: left; color: black;">Select Grade</label>
...@@ -99,12 +99,13 @@ ...@@ -99,12 +99,13 @@
</div> </div>
<div class="mb-3"> <div class="mb-3">
<label for="" style="float: left; color: black;">Choose Thumbnail For Vedio</label> <label for="" style="float: left; color: black;">Choose Thumbnail for Video</label>
<input type="hidden" name="currentImage" value="{{$selected_lesson[0]['lesson_thumbnail']}}"> <input type="hidden" name="currentImage" value="{{$selected_lesson[0]['lesson_thumbnail']}}">
<input type="file" class="form-control" name="lessonThumbnail"> <input type="file" class="form-control" name="lessonThumbnail">
</div> </div>
<div class="mb-3"> <div class="mb-3">
<label for="" style="float: left; color: black;">Choose Video to Upload</label>
<input type="hidden" name="lesson_id" value="{{$selected_lesson[0]['id']}}"> <input type="hidden" name="lesson_id" value="{{$selected_lesson[0]['id']}}">
<input type="hidden" name="checkStatusV" value="{{$selected_lesson[0]['lesson_vedio_link']}}"> <input type="hidden" name="checkStatusV" value="{{$selected_lesson[0]['lesson_vedio_link']}}">
<input type="hidden" name="checkStatusL" value="{{$selected_lesson[0]['platform_link']}}"> <input type="hidden" name="checkStatusL" value="{{$selected_lesson[0]['platform_link']}}">
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<html lang="en"> <html lang="en">
<head> <head>
<title>Sidebar 03</title> <title>Update Student</title>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
<button class="btn btn-info btn-block" type="submit">Update Student</button> <button class="btn btn-info btn-block" type="submit">Update Student</button>
</form> </form>
<!-- Default form subscription --> <!-- Default form subscription -->
<a href="/show-all-students">Show All Registred Students -></a> <a href="/show-all-students"> <- Back to All Students Tab</a>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -63,10 +63,10 @@ ...@@ -63,10 +63,10 @@
@endif @endif
<p class="h4 mb-4">Update Subject Details</p> <p class="h4 mb-4">Update Subject Details</p>
<p>Join our mailing list. We write rarely, but only the best content.</p> <!-- <p>Join our mailing list. We write rarely, but only the best content.</p>
<p> <p>
<a href="" target="_blank">See the last newsletter</a> <a href="" target="_blank">See the last newsletter</a> -->
</p> </p>
<div class="mb-3"> <div class="mb-3">
...@@ -107,7 +107,7 @@ ...@@ -107,7 +107,7 @@
</form> </form>
<!-- Default form subscription --> <!-- Default form subscription -->
<a href="/show_all_subjects">Back to The All Subjects -></a> <a href="/show_all_subjects"> <- Back to All Subjects Tab </a>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
<button class="btn btn-info btn-block" type="submit">Update Teacher</button> <button class="btn btn-info btn-block" type="submit">Update Teacher</button>
</form> </form>
<!-- Default form subscription --> <!-- Default form subscription -->
<a href="/show-all-teachers">Back to The Registred Teachers -></a> <a href="/show-all-teachers"> <- Back to All Teachers Tab</a>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -97,7 +97,7 @@ Route::get('/update_lesson/{id}', function ($id) { ...@@ -97,7 +97,7 @@ Route::get('/update_lesson/{id}', function ($id) {
//dd($data); //dd($data);
$selectedLesson = json_decode(json_encode($data), true); $selectedLesson = json_decode(json_encode($data), true);
//dd($selectedLesson);
return view('update_lesson')->with(['selected_lesson'=>$selectedLesson, 'all_classes'=>$all_classes]); return view('update_lesson')->with(['selected_lesson'=>$selectedLesson, 'all_classes'=>$all_classes]);
}); });
...@@ -182,3 +182,27 @@ Route::post('/save_contact', 'ContactDetailController@saveContactDetails'); ...@@ -182,3 +182,27 @@ Route::post('/save_contact', 'ContactDetailController@saveContactDetails');
Route::post('/save_feedback', 'ContactDetailController@saveUserFeedbackDetail'); Route::post('/save_feedback', 'ContactDetailController@saveUserFeedbackDetail');
Route::get('/delete_feedback/{id}', 'ContactDetailController@deleteStudentFeedback'); Route::get('/delete_feedback/{id}', 'ContactDetailController@deleteStudentFeedback');
Route::get('/add-documents', 'DocumentController@showAddDocumentPage');
Route::post('/add_class', 'ClassesController@createNewClass');
Route::get('/all_classes', 'ClassesController@getAllClasses');
Route::get('/show-update-class/{id}', 'ClassesController@showUpdateClassForm');
Route::post('/update_class', 'ClassesController@updateSelectedClassDetails');
Route::get('/delete-class/{id}', 'ClassesController@deleteSelectedClassDetails');
Route::get('/findSubjectsForDocumentAdd','DocumentController@findSubjectsForDocumentAdd');
Route::get('/findLessonsForDocumentAdd', 'DocumentController@findLessonsForDocumentAdd');
Route::post('/upload-documents', 'DocumentController@uploadSelectedDocuments');
Route::get('/delete-document/{id}', 'DocumentController@deleteSelectedDocument');
Route::get('/test/{id}', 'LessonController@calculateLessonVideoViewCount')->name('test');
Route::get('/getViewCount/{id}', 'LessonController@getLessonVideoViewCount');
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment