Skip to content

Commit

Permalink
Changed some layout
Browse files Browse the repository at this point in the history
  • Loading branch information
zalsader committed Sep 11, 2015
1 parent 617e5e2 commit ab29328
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 10 deletions.
3 changes: 2 additions & 1 deletion app/Question.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ public function scopeActivated($q) {
->whereExists(function ($query) {
$query->select(\DB::raw(1))
->from('levels')
->whereRaw('levels.id = questions.level_id');
->whereRaw('levels.id = questions.level_id')
->where('levels.active', '=', true);
});
}
}
2 changes: 1 addition & 1 deletion config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
|
*/

'timezone' => 'Asia/Gaza',
'timezone' => 'Asia/Hebron',

/*
|--------------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions resources/views/app.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
<a href="{{url('logout')}}" class="btn btn-danger">log out</a>
</div>
</div>
<hr class="clear">
@yield('content')

<script type="text/javascript" src="{{asset('js/jquery.min.js')}}"></script>
Expand Down
4 changes: 3 additions & 1 deletion resources/views/profile.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
<tr>
<td><a href="{{url('question', [$question->id])}}">{{$question->name}}</a></td>
<td>{{round($level->mark,1)}}</td>
<?php $lastSub = $question->submissions->last(); ?>
<?php $lastSub = $question->submissions()
->where('user_id', '=', Auth::user()->id)
->orderBy('created_at', 'desc')->first(); ?>
@if (!empty($lastSub))
<td>{{\Carbon\Carbon::parse($lastSub->created_at)->toDayDateTimeString()}}</td>
@else
Expand Down
19 changes: 12 additions & 7 deletions resources/views/questions/show.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@

@section('content')
<div class="container">
<div class="row">
<div id="successfulSubmission" class="alert alert-success fade in hidden">
<a href="#" class="close" data-dismiss="alert">&times;</a>
Your work has been submitted successfully! Please wait while we grade it.
</div>
</div>
<div class="row">
<div class="col-md-2">
<a class="btn btn-default" href="{{url('profile')}}">&#8592; Go back</a>
</div>
</div>
<div class="row">
<div class="col-md-6" >
<h1>{{ $question->name}}</h1>
Expand All @@ -22,12 +33,6 @@
<button id="submit" class="btn btn-danger btn-block">Submit</button>
</div>
</div>
<div class="row">
<div id="successfulSubmission" class="alert alert-success fade in hidden">
<a href="#" class="close" data-dismiss="alert">&times;</a>
<strong>Success!</strong> Your work has been submitted successfully.
</div>
</div>
</div>

<iframe class="game" src="{{url('/game/apps/turtle/index.html')}}" width="95%" height="655" sandbox="allow-same-origin allow-scripts"></iframe>
Expand Down Expand Up @@ -84,7 +89,7 @@ class="{{empty($question->hint_image)? 'hidden': ''}}">
$(function(){
$('#submit').popover({
content:'You must run your program first',
content:'Please run your program first',
placement:'bottom',
container:'body',
trigger:'manual'
Expand Down

0 comments on commit ab29328

Please sign in to comment.