You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by is...@apache.org on 2021/07/15 19:22:31 UTC

[airavata-custos-portal] branch custos-pearc-tutorial-2021 updated: Minor bug fixes

This is an automated email from the ASF dual-hosted git repository.

isjarana pushed a commit to branch custos-pearc-tutorial-2021
in repository https://gitbox.apache.org/repos/asf/airavata-custos-portal.git


The following commit(s) were added to refs/heads/custos-pearc-tutorial-2021 by this push:
     new 6f0e6f0  Minor bug fixes
     new 9dbd535  Merge pull request #118 from dinukadesilva/reference-student-portal
6f0e6f0 is described below

commit 6f0e6f09480d19f17019178cff560f51b01825c8
Author: Dinuka De Silva <l....@gmail.com>
AuthorDate: Thu Jul 15 14:54:18 2021 -0400

    Minor bug fixes
---
 src/lib/components/pages/TenantEntities.vue  |  9 ++++++---
 src/lib/components/pages/TenantNewEntity.vue | 13 +++++--------
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/lib/components/pages/TenantEntities.vue b/src/lib/components/pages/TenantEntities.vue
index 30fb20d..95587f1 100644
--- a/src/lib/components/pages/TenantEntities.vue
+++ b/src/lib/components/pages/TenantEntities.vue
@@ -124,7 +124,7 @@
                         <div>
                           <b-form-textarea size="sm" disabled
                                            v-model="entitiesMap[studentSubmission.submission.entityId].fullTextJson.text"/>
-                          <div v-if="studentSubmission.grading">
+                          <div v-if="studentSubmission.grading && !studentSubmission.hasGradePublished">
                             <div class="pt-3">
                               <b-form-select :options="['A+', 'A', 'A-','B+', 'B', 'B-','C+', 'C', 'C-','D', 'F']"
                                              size="sm"
@@ -135,7 +135,7 @@
                                             v-model="entitiesMap[studentSubmission.grading.entityId].fullTextJson.comment"/>
                             </div>
                           </div>
-                          <div v-else>
+                          <div v-else-if="!studentSubmission.hasGradePublished">
                             <b-button
                                 v-if="(hasProfessorRole || hasTeachingAssistantRole) && hasPermission(studentSubmission.submission, permissionTypeViewer)"
                                 variant="link" size="sm"
@@ -145,7 +145,8 @@
                           </div>
                         </div>
                         <template #modal-footer="{close}">
-                          <b-button variant="primary" size="sm" v-if="studentSubmission.grading"
+                          <b-button variant="primary" size="sm"
+                                    v-if="studentSubmission.grading && !studentSubmission.hasGradePublished"
                                     v-on:click="saveGrading(assignment, studentSubmission.submission, studentSubmission.grading);close()">
                             Save Grading
                           </b-button>
@@ -470,6 +471,7 @@ export default {
         ...this.entitiesMap,
         [newSubmissionEntityId]: {
           entityId: newSubmissionEntityId,
+          name: newSubmissionEntityId,
           type: entityTypeIdSubmission,
           saved: false,
           edit: true,
@@ -498,6 +500,7 @@ export default {
         ...this.entitiesMap,
         [newGradingEntityId]: {
           entityId: newGradingEntityId,
+          name: newGradingEntityId,
           type: entityTypeIdGrading,
           saved: false,
           edit: true,
diff --git a/src/lib/components/pages/TenantNewEntity.vue b/src/lib/components/pages/TenantNewEntity.vue
index 241f043..6e834fb 100644
--- a/src/lib/components/pages/TenantNewEntity.vue
+++ b/src/lib/components/pages/TenantNewEntity.vue
@@ -10,7 +10,8 @@
           <div class="pt-3">
             <label class="form-label" for="fullTextJson.title">Title</label>
             <b-form-input
-                v-model="fullTextJson.title"
+                v-model="name"
+                :state="inputState.name"
                 id="fullTextJson.title"
                 trim
                 size="sm">
@@ -76,9 +77,8 @@ export default {
 
       // availableProfessors: ["Dr. Aruna", "Dr. Ruwan", "Dr. Marlon"],
 
-      // name: null,
+      name: null,
       fullTextJson: {
-        "title": "",
         "description": "",
         "dueDate": "",
         "submissions": []
@@ -88,9 +88,6 @@ export default {
     };
   },
   computed: {
-    name() {
-      return this.title;
-    },
     clientId() {
       return this.$route.params.clientId;
     },
@@ -136,7 +133,7 @@ export default {
       }
     },
     async create() {
-      this.makeFormVisited()
+      this.makeFormVisited();
 
       if (this.isFormValid) {
         this.processing = true;
@@ -148,7 +145,7 @@ export default {
             entityId: entityId,
             clientId: this.clientId,
             name: this.name,
-            fullText: JSON.stringify(this.fullTextJson),
+            fullText: JSON.stringify({...this.fullTextJson, title: this.name}),
             type: this.entityTypeId,
             ownerId: this.$store.getters["auth/currentUsername"]
           });