fixed bug where tests page in moderator view wouldn't load

This commit is contained in:
mwalbeck 2016-10-25 16:10:54 +02:00
commit 6b8526971b
2 changed files with 2 additions and 2 deletions
app/Http/Controllers
resources/views/tests

View file

@ -26,7 +26,7 @@ class ModeratorController extends Controller
public function showTests()
{
$tests = Auth::user()->getTests();
$tests = Auth::user()->group->getGroupTests();
return view('tests.showall', compact('tests'));
}
}

View file

@ -21,7 +21,7 @@
<tr>
<td>{{ $test->id }}</td>
<td>{{ $test->title }}</td>
@if (Auth::user()->access_level == 2 AND !$test->group_id == 0 OR Auth::user()->access_level == 3)
@if (Auth::user()->access_level == 2 AND $test->group_id == Auth::user()->group_id OR Auth::user()->access_level == 3)
<td>
<form method="get" class="pull-right">
<button class="btn btn-sm btn-default pull-left" formaction="/{{ Auth::user()->getAdminPath() }}/tests/{{ $test->id }}">Edit</button>