-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Change var to const for js constants being injected into the page from the server * Allows the before_play_start event to determine if the lti content item picker should be displayed * Move picker display function into a common controller * Add an api method that’ll validate and sign a content item selection lti request * injects LTI_MESSAGE_TYPE and LTI_KEY js constants into the picker page template * LTILaunch gains a method to load the lti config that is associated with a lti key * Updated a few strings that specifically mention canvas * Moves all classes, tests, migrations, and configs from fuel/app/modules/lti into fuel/app * overhaul lti test provider to simplify * simplify lti launch picker code when sending content selection messages to lti/assignment * fixed issue with starting plays with referrer urls longer than 255 characters fixes #1418 * updates oauth validation in fuel by ensuring the request uri is not masked by FuelPHP * Overhaul lit test provider a bit - mostly to simplify and use lessons * fix code sniff errors * add deps to docker image * attempt to fix yarn cache issue * Changes docker build process to ensure the built image has admin:make_paths_writable run to avoid having to run it every startup
- Loading branch information
Showing
50 changed files
with
1,035 additions
and
976 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,6 +54,13 @@ protected function tearDown(): void | |
} | ||
} | ||
|
||
protected static function remove_all_roles_for_user($user_id) | ||
{ | ||
\DB::delete('perm_role_to_user') | ||
->where('user_id', $user_id) | ||
->execute(); | ||
} | ||
|
||
protected static function clear_fuel_input() | ||
{ | ||
// reset fuelphp's input class | ||
|
@@ -196,6 +203,10 @@ protected function _as_student() | |
\Fuel\Tasks\Admin::new_user($uname, 'test', 'd', 'student', '[email protected]', $pword); | ||
$user = \Model_User::find_by_username($uname); | ||
} | ||
else | ||
{ | ||
static::remove_all_roles_for_user($user->id); | ||
} | ||
|
||
$login = \Service_User::login($uname, $pword); | ||
$this->assertTrue($login); | ||
|
@@ -215,13 +226,16 @@ protected function _as_author() | |
{ | ||
require_once(APPPATH.'/tasks/admin.php'); | ||
\Fuel\Tasks\Admin::new_user($uname, 'Prof', 'd', 'Author', '[email protected]', $pword); | ||
\Fuel\Tasks\Admin::give_user_role($uname, 'basic_author'); | ||
$user = \Model_User::find_by_username($uname); | ||
} | ||
else | ||
{ | ||
static::remove_all_roles_for_user($user->id); | ||
} | ||
|
||
\Materia\Perm_Manager::add_users_to_roles_system_only([$user->id], [\Materia\Perm_Role::AUTHOR]); | ||
$login = \Service_User::login($uname, $pword); | ||
$this->assertTrue($login); | ||
|
||
$this->users_to_clean[] = $user; | ||
return $user; | ||
} | ||
|
@@ -238,10 +252,14 @@ protected function _as_author_2() | |
{ | ||
require_once(APPPATH.'/tasks/admin.php'); | ||
\Fuel\Tasks\Admin::new_user($uname, 'test', 'd', 'author', '[email protected]', $pword); | ||
\Fuel\Tasks\Admin::give_user_role($uname, 'basic_author'); | ||
$user = \Model_User::find_by_username($uname); | ||
} | ||
else | ||
{ | ||
static::remove_all_roles_for_user($user->id); | ||
} | ||
|
||
\Materia\Perm_Manager::add_users_to_roles_system_only([$user->id], [\Materia\Perm_Role::AUTHOR]); | ||
$login = \Service_User::login($uname, $pword); | ||
$this->assertTrue($login); | ||
$this->users_to_clean[] = $user; | ||
|
@@ -260,10 +278,14 @@ protected function _as_author_3() | |
{ | ||
require_once(APPPATH.'/tasks/admin.php'); | ||
\Fuel\Tasks\Admin::new_user($uname, 'test', 'd', 'author', '[email protected]', $pword); | ||
\Fuel\Tasks\Admin::give_user_role($uname, 'basic_author'); | ||
$user = \Model_User::find_by_username($uname); | ||
} | ||
else | ||
{ | ||
static::remove_all_roles_for_user($user->id); | ||
} | ||
|
||
\Materia\Perm_Manager::add_users_to_roles_system_only([$user->id], [\Materia\Perm_Role::AUTHOR]); | ||
$login = \Service_User::login($uname, $pword); | ||
$this->assertTrue($login); | ||
$this->users_to_clean[] = $user; | ||
|
@@ -282,12 +304,14 @@ protected function _as_super_user() | |
{ | ||
require_once(APPPATH.'/tasks/admin.php'); | ||
\Fuel\Tasks\Admin::new_user($uname, 'test', 'd', 'su', '[email protected]', $pword); | ||
// TODO: super_user should get all these rights inherently right??????!!!! | ||
\Fuel\Tasks\Admin::give_user_role($uname, 'super_user'); | ||
\Fuel\Tasks\Admin::give_user_role($uname, 'basic_author'); | ||
$user = \Model_User::find_by_username($uname); | ||
} | ||
else | ||
{ | ||
static::remove_all_roles_for_user($user->id); | ||
} | ||
|
||
\Materia\Perm_Manager::add_users_to_roles_system_only([$user->id], [\Materia\Perm_Role::AUTHOR, \Materia\Perm_Role::SU]); | ||
$login = \Service_User::login($uname, $pword); | ||
$this->assertTrue($login); | ||
$this->users_to_clean[] = $user; | ||
|
@@ -305,11 +329,14 @@ protected function _as_noauth() | |
{ | ||
require_once(APPPATH.'/tasks/admin.php'); | ||
\Fuel\Tasks\Admin::new_user($uname, 'test', 'd', 'noauth', '[email protected]', $pword); | ||
// TODO: super_user should get all these rights inherently right??????!!!! | ||
\Fuel\Tasks\Admin::give_user_role($uname, 'no_author'); | ||
$user = \Model_User::find_by_username($uname); | ||
} | ||
else | ||
{ | ||
static::remove_all_roles_for_user($user->id); | ||
} | ||
|
||
\Materia\Perm_Manager::add_users_to_roles_system_only([$user->id], [\Materia\Perm_Role::NOAUTH]); | ||
$login = \Service_User::login($uname, $pword); | ||
$this->assertTrue($login); | ||
$this->users_to_clean[] = $user; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.