Skip to content

Commit

Permalink
Finished progress unit test and refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
ADLMeganBohland committed Aug 13, 2024
1 parent 5e5de75 commit 109c0f7
Show file tree
Hide file tree
Showing 5 changed files with 1,726 additions and 489 deletions.
62 changes: 62 additions & 0 deletions classes/local/errorover.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,69 @@ function exception_grade(\Throwable $exception)
throw new nullException('Error in checking user grades: ' . $exception->getMessage(), 0);
// exit;
}
function progress_warning($errno, $errstr, $errfile, $errline)
{
// echo"Error stirn --- $errstr";
// echo"Error number --- $errno";
//echo"Error errfile --- $errfile";
// echo"Error errline --- $errline";
// Maybe we can construct the new errors here. This would allow the error personalization? And keep main code clean
echo " unable to get name ";
// throw new nullException('Unable to communicate with LRS. Caught exception: ' . $exception->getMessage() . " Check LRS is up, username and password are correct, and LRS endpoint is correct.", 0);
// exit;
}
function progresslrsreq_warning($errno, $errstr, $errfile, $errline)
{
// echo"Error stirn --- $errstr";
// echo"Error number --- $errno";
//echo"Error errfile --- $errfile";
// echo"Error errline --- $errline";
// Maybe we can construct the new errors here. This would allow the error personalization? And keep main code clean

throw new nullException('Unable to communicate with LRS. Caught exception: ' . $exception->getMessage() . " Check LRS is up, username and password are correct, and LRS endpoint is correct.", 0);
// exit;
}
/**
* An exception handler to use in AU cases when many different exceptions for data errors may be thrown.
* @param mixed $errno
* @param mixed $errstr
* @param mixed $errfile
* @param mixed $errline
* @throws \mod_cmi5launch\local\nullException
* @return never
*/
function exception_progresslrsreq(\Throwable $exception)
{

throw new nullException('Unable to communicate with LRS. Caught exception: ' . $exception->getMessage() . " Check LRS is up, username and password are correct, and LRS endpoint is correct.", 0);
// exit;
}
function progresslrs_warning($errno, $errstr, $errfile, $errline)
{
// echo"Error stirn --- $errstr";
// echo"Error number --- $errno";
//echo"Error errfile --- $errfile";
// echo"Error errline --- $errline";
// Maybe we can construct the new errors here. This would allow the error personalization? And keep main code clean

throw new nullException('Error in retrieving statements from LRS ' . $errstr, 0);
// exit;
}
/**
* An exception handler to use in AU cases when many different exceptions for data errors may be thrown.
* @param mixed $errno
* @param mixed $errstr
* @param mixed $errfile
* @param mixed $errline
* @throws \mod_cmi5launch\local\nullException
* @return never
*/
function exception_progresslrs(\Throwable $exception)
{

throw new nullException('Error in retrieving statements from LRS ' . $exception->getMessage(), 0);
// exit;
}
function sifting_data_warning($errno, $errstr, $errfile, $errline)
{
// echo"Error stirn --- $errstr";
Expand Down
Loading

0 comments on commit 109c0f7

Please sign in to comment.