Skip to content

Commit

Permalink
Merge pull request #13 from talview/DEL-2805
Browse files Browse the repository at this point in the history
Stop candidate workflow in case of error
  • Loading branch information
rakeshprabhu authored Sep 3, 2020
2 parents e1b9828 + 0f99bf9 commit f5d66af
Show file tree
Hide file tree
Showing 8 changed files with 2,048 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.gitattributes export-ignore
.gitignore export-ignore
build export-ignore
# build export-ignore
.github export-ignore
6 changes: 5 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ jobs:
uses: actions/checkout@v2
- name: Build project # This would actually build your project, using zip for an example artifact
run: |
git archive --prefix=proview/ -o proview.zip HEAD
composer install
git add vendor -f
stashName=`git stash create`
git archive --prefix=proview/ -o proview.zip $stashName
git rm --cache -r vendor
- name: Create Release
id: create_release
uses: actions/create-release@v1
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.idea
.vagrant
vendor/
13 changes: 11 additions & 2 deletions classes/injector.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
defined('MOODLE_INTERNAL') || die();

require_once($CFG->libdir . '/pagelib.php');
require_once($CFG->dirroot . '/local/proview/vendor/autoload.php');
\Sentry\init(['dsn' => 'https://[email protected]/5304587' ]);

/**
* Class injector
Expand Down Expand Up @@ -124,8 +126,15 @@ public static function inject() {
$t = new api\tracker();
$t::insert_tracking();
return ;
} catch (Exception $error){
self::inject_password($PAGE, $quiz);
} catch (\Throwable $error){
\Sentry\captureException($error);
?>
<script>
document.body.style.margin='0px';
document.body.innerHTML=`<iframe id="errorIFrame" src='https://pages.talview.com/proview/error/index.html' title="Proview Error" style="width: 100%; height:100%; border: 0px;"><p>Your browser does not support iframes</p></iframe>`;
</script>
<?php
die;
}
}

Expand Down
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"name": "talview/moodle-local_proview",
"type": "moodle-local",
"description":"Plugin to enable Talview's Proview proctoring solution on Moodle.",
"require": {
"composer/installers": "~1.0"
"composer/installers": "~1.0",
"sentry/sdk": "^2.1"
},
"extra": {
"installer-name": "proview"
Expand Down
Loading

0 comments on commit f5d66af

Please sign in to comment.