diff --git a/src/web/app/components/copy-session-modal/copy-session-modal.component.html b/src/web/app/components/copy-session-modal/copy-session-modal.component.html
index f66ccf42813..6863e2ca3a7 100644
--- a/src/web/app/components/copy-session-modal/copy-session-modal.component.html
+++ b/src/web/app/components/copy-session-modal/copy-session-modal.component.html
@@ -12,7 +12,7 @@
-
+
The field "Name for copied session" should not be empty.
@@ -35,5 +35,5 @@
diff --git a/src/web/app/components/copy-session-modal/copy-session-modal.component.ts b/src/web/app/components/copy-session-modal/copy-session-modal.component.ts
index 2a23d20ade7..af001d8f9a8 100644
--- a/src/web/app/components/copy-session-modal/copy-session-modal.component.ts
+++ b/src/web/app/components/copy-session-modal/copy-session-modal.component.ts
@@ -30,25 +30,21 @@ export class CopySessionModalComponent {
/**
* boolean to store validity of name
* /
+ validName: boolean = false;
- validateName(sessionName: string): boolean {
- if (this.sessionName.trim().length==0) {
- return false;
- }
- else {
- return true;
- }
- }
-
/**
* Fires the copy event.
*/
copy(): void {
/**
- * check if session name is whitespace or not
- */
- if (validateName(this.newFeedbackSessionName)) {
+ * check if session name is whitespace or not
+ * /
+ if (this.newFeedbackSessionName.trim().length==0) {
+ this.validName = false;
+ return;
+ } else {
+ this.validName = true;
this.activeModal.close({
newFeedbackSessionName: this.newFeedbackSessionName,
sessionToCopyCourseId: this.sessionToCopyCourseId,