Better error when neither course nor rapla link are supplied
All checks were successful
Jenkins Production Deployment
All checks were successful
Jenkins Production Deployment
This commit is contained in:
parent
5d9a2d6d22
commit
fba5368a58
11
scripts.js
11
scripts.js
|
@ -32,9 +32,14 @@ function generateLink() {
|
||||||
|
|
||||||
if (selectedCourseFromPicker === '-1') {
|
if (selectedCourseFromPicker === '-1') {
|
||||||
let providedRaPlaLink = $('#raplalink').val().toString();
|
let providedRaPlaLink = $('#raplalink').val().toString();
|
||||||
const url = new URL(providedRaPlaLink);
|
if(providedRaPlaLink !== '') {
|
||||||
raplaUser = url.searchParams.get('user');
|
const url = new URL(providedRaPlaLink);
|
||||||
raplaFile = url.searchParams.get('file');
|
raplaUser = url.searchParams.get('user');
|
||||||
|
raplaFile = url.searchParams.get('file');
|
||||||
|
} else {
|
||||||
|
$('#full-link').text('Please provide either a course or a RaPla Link!');
|
||||||
|
return;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
let courseInfo = courseLinks[selectedCourseFromPicker];
|
let courseInfo = courseLinks[selectedCourseFromPicker];
|
||||||
raplaUser = courseInfo.user;
|
raplaUser = courseInfo.user;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user