This is the codeAbility Sharing Platform! Learn more about the codeAbility Sharing Platform.

Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • development/sharing/codeability-sharing-platform
1 result
Show changes
Commits on Source (4)
......@@ -6,6 +6,7 @@ import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
@SuppressWarnings("PMD")
@Entity
......@@ -23,6 +24,7 @@ public class ReviewComment implements Serializable {
@Column(nullable = true)
private Boolean requirementsAreClear;
@Lob
@Column(nullable = true)
private String descriptionComment;
......@@ -32,6 +34,7 @@ public class ReviewComment implements Serializable {
@Column(nullable = true)
private Boolean allMaterialsAvailable;
@Lob
@Column(nullable = true)
private String informationRequiredComment;
......@@ -41,12 +44,14 @@ public class ReviewComment implements Serializable {
@Column(nullable = true)
private Boolean subExercisesAreClear;
@Lob
@Column(nullable = true)
private String structuredComment;
@Column(nullable = true)
private Boolean solutionIsCorrect;
@Lob
@Column(nullable = true)
private String solutionComment;
......@@ -56,6 +61,7 @@ public class ReviewComment implements Serializable {
@Column(nullable = true)
private Boolean metadataIsCorrect;
@Lob
@Column(nullable = true)
private String metadataComment;
......
......@@ -327,9 +327,7 @@ public class ReviewService {
return;
}
Review review = reviewO.get();
if (review.getRequestedBy().equals(user.getId()) && !"DELETION_REQUESTED".equals(reviewDTO.getStatus().get(0))) {
throw new IllegalAccessException("User is not allowed to update ReviewRating");
}
if (review.getRequestedBy().equals(user.getId()) && "DELETION_REQUESTED".equals(reviewDTO.getStatus().get(0))) {
notifyReviewers(review.getId(), EMAIL_START + review.getResource() + " has been deleted by the user.");
deleteReview(review.getId());
......
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.1.xsd">
<changeSet id="20240801" author="Eduard">
<preConditions onFail="MARK_RAN">
<tableExists tableName="review_comment"/>
</preConditions>
<modifyDataType tableName="review_comment" columnName="description_comment" newDataType="clob"/>
<modifyDataType tableName="review_comment" columnName="information_required_comment" newDataType="clob"/>
<modifyDataType tableName="review_comment" columnName="structured_comment" newDataType="clob"/>
<modifyDataType tableName="review_comment" columnName="solution_comment" newDataType="clob"/>
<modifyDataType tableName="review_comment" columnName="metadata_comment" newDataType="clob"/>
</changeSet>
</databaseChangeLog>
......@@ -43,6 +43,7 @@
<include file="config/liquibase/changelog/202402281336_add_columnLastCheckToUserWatchList.xml" relativeToChangelogFile="false"/>
<include file="config/liquibase/changelog/202403071845_add_columnSavedSearches.xml" relativeToChangelogFile="false"/>
<include file="config/liquibase/changelog/20240304092200_added_entity_linked_edu_sharing_project.xml" relativeToChangelogFile="false"/>
<include file="config/liquibase/changelog/20240801_change_review_comment_datatype.xml" relativeToChangelogFile="false"/>
<!-- jhipster-needle-liquibase-add-constraints-changelog - JHipster will add liquibase constraints changelogs here -->
<!-- jhipster-needle-liquibase-add-incremental-changelog - JHipster will add incremental liquibase changelogs here -->
</databaseChangeLog>
......@@ -243,6 +243,13 @@ export class ExerciseBodyComponent implements OnInit, OnDestroy, AfterViewInit {
window.open(link, '_self')
}
public getReadableStatus(status: string): string {
if (['200_tocheck', '300_hasflaws', '400_checked'].includes(status)) {
return this.translate.instant('exercise.export.edu-sharing.workflow.' + status) as string
}
return status
}
public isAllowedToUploadToEduSharing(): boolean {
if (!this.accountService.isAuthenticated()) {
return false
......
......@@ -255,10 +255,17 @@
<hr />
</div>
<div class="col-12">
<div *ngIf="!isAllowedToUploadToEduSharing() && isEduSharingEnabled()">
<div class="alert alert-info" role="alert">
<p>{{ 'exercise.export.edu-sharing.notAllowed' | translate }}</p>
</div>
</div>
<button
(click)="tryUpsertExerciseToEduSharing()"
*ngIf="isAllowedToUploadToEduSharing() && eduSharingStatus == undefined && isEduSharingEnabled()"
[disabled]="this.isLoading"
[ngbTooltip]="exportToEduSharingHint"
aria-pressed="true"
class="btn btn-outline-secondary"
style="float: left; margin-right: 5px; margin-top: 5px"
......@@ -267,12 +274,16 @@
<span *ngIf="isLoading" class="spinner-border" role="status" style="width: 1em; height: 1em">&nbsp;</span>
{{ 'exercise.export.edu-sharing.exportNew' | translate }}
</button>
<ng-template #exportToEduSharingHint>
{{ 'exercise.export.edu-sharing.exportHint' | translate }}
</ng-template>
<button
(click)="openUpdateExerciseToEduSharingDialog()"
*ngIf="isAllowedToUploadToEduSharing() && eduSharingStatus != undefined && isEduSharingEnabled()"
[disabled]="this.isLoading"
aria-pressed="true"
[ngbTooltip]="exportToEduSharingHint"
class="btn btn-outline-secondary"
type="button"
style="float: left; margin-right: 5px; margin-top: 5px"
......@@ -338,7 +349,7 @@
{{ 'exercise.export.edu-sharing.workflow.status' | translate }}
</th>
<td *matCellDef="let element" mat-cell>
{{ element?.status }}
{{ this.getReadableStatus(element?.status) }}
</td>
</ng-container>
......@@ -359,6 +370,10 @@
<div *ngIf="eduSharingStatus != undefined" class="col-12" style="margin-top: 20px">
<h6>
{{ 'exercise.export.edu-sharing.publishedProjects.title' | translate }}
<fa-icon [ngbTooltip]="publishedProjectsHint" icon="question-circle"></fa-icon>
<ng-template #publishedProjectsHint>
{{ 'exercise.export.edu-sharing.publishedProjects.hint' | translate }}
</ng-template>
</h6>
<span *ngIf="eduSharingStatus?.publishedCopies?.length == 0">
......
......@@ -146,22 +146,28 @@
"edu-sharing": {
"errors": "Fehler",
"exportNew": "Neue Edu-Sharing Node erstellen",
"exportHint": "Das Hochladen einer Übung auf edu-sharing ist erforderlich, damit sie über den OER Hub zugänglich ist. Nachdem der Inhalt überprüft wurde, kann er veröffentlicht, und im OER Hub auffindbar gemacht werden.",
"exportExisting": "Edu-Sharing Node updaten",
"exportNotice": "Falls Sie nur Metadaten upgedatet haben, bitten wir Sie ihre Änderungen lediglich per Mail an <a href='mailto:oer@uibk.ac.at'>oer@uibk.ac.at</a> zu senden.<br/><br/>Mit dem automatischen Update fortfahren?",
"repositoryName": "Edu-Sharing UIBK",
"lastUpload": "Letztes Update",
"nodeId": "Edu-Sharing Node ID",
"viewUrl": "URL",
"notAllowed": "Nur Herausgeber und Administratoren können Übungen zu Edu-Sharing exportieren.",
"workflow": {
"updates": "Workflow Updates",
"time": "Zeit",
"status": "Status",
"comment": "Kommentar"
"comment": "Kommentar",
"200_tocheck": "In Überprüfung",
"300_hasflaws": "Anpassungen notwendig",
"400_checked": "Veröffentlicht"
},
"publishedProjects": {
"title": "Publizierte Kopien",
"noEntries": "Keine publizierten Kopien gefunden",
"createdAt": "Erstellt am"
"createdAt": "Erstellt am",
"hint": "Veröffentlichte Kopien sind im OERHub auffindbar. Veröffentlichtes Material bleibt in der Regel verfügbar, obwohl Rücknahmen selten sind."
},
"exportViolations": {
"UNKNOWN_ERROR": "Ein unbekannter Fehler ist aufgetreten",
......
......@@ -146,22 +146,28 @@
"edu-sharing": {
"errors": "Errors",
"exportNew": "Upload resource to edu-sharing",
"exportHint": "Uploading this exercise to edu-sharing is required for access through the OERHub. After reviewers check the content, it will published and made available on the OERHub.",
"exportExisting": "Update edu-sharing node",
"exportNotice": "If you have only updated metadata, please only send your changes by email to <a href='mailto:oer@uibk.ac.at'>oer@uibk.ac.at</a>.<br/><br/>Continue with the automatic update?",
"repositoryName": "Edu-Sharing UIBK",
"lastUpload": "Last Upload",
"nodeId": "Edu-Sharing Node ID",
"notAllowed": "Only publishers and administrators are allowed to export to edu-sharing.",
"viewUrl": "URL",
"workflow": {
"updates": "Workflow Updates",
"time": "Time",
"status": "Status",
"comment": "Comment"
"comment": "Comment",
"200_tocheck": "In review",
"300_hasflaws": "Revision required",
"400_checked": "Published"
},
"publishedProjects": {
"title": "Published Copies",
"noEntries": "No published copies found",
"createdAt": "Created at"
"createdAt": "Created at",
"hint": "Published copies can be found in the OERHub. Published content typically remains available, though retractions are rare."
},
"exportViolations": {
"UNKNOWN_ERROR": "An unknown error occurred",
......