Skip to content

Commit

Permalink
Merge branch 'develop' into feature/exam-mode/add-sidebar-with-large-…
Browse files Browse the repository at this point in the history
…cards

Merge develop into branch
  • Loading branch information
edkaya committed Jun 20, 2024
2 parents b5cce62 + c63709d commit 88f0784
Show file tree
Hide file tree
Showing 139 changed files with 3,119 additions and 2,893 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ Refer to [Using JHipster in production](http://www.jhipster.tech/production) for
The following command can automate the deployment to a server. The example shows the deployment to the main Artemis test server (which runs a virtual machine):

```shell
./artemis-server-cli deploy [email protected] -w build/libs/Artemis-7.2.2.war
./artemis-server-cli deploy [email protected] -w build/libs/Artemis-7.2.3.war
```

## Architecture
Expand Down
3 changes: 2 additions & 1 deletion angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@
"index": "src/main/webapp/index.html",
"browser": "src/main/webapp/app/app.main.ts",
"polyfills": [
"src/main/webapp/app/polyfills.ts"
"src/main/webapp/app/polyfills.ts",
"@angular/localize/init"
],
"tsConfig": "tsconfig.json",
"inlineStyleLanguage": "scss",
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ plugins {
}

group = "de.tum.in.www1.artemis"
version = "7.2.2"
version = "7.2.3"
description = "Interactive Learning with Individual Feedback"

java {
Expand Down
4 changes: 2 additions & 2 deletions docs/dev/setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ following dependencies/tools on your machine:
2. `MySQL Database Server 8 <https://dev.mysql.com/downloads/mysql>`__, or `PostgreSQL <https://www.postgresql.org/>`_:
Artemis uses Hibernate to store entities in an SQL database and Liquibase to
automatically apply schema transformations when updating Artemis.
3. `Node.js <https://nodejs.org/en/download>`__: We use Node LTS (>=20.10.0 < 21) to compile
3. `Node.js <https://nodejs.org/en/download>`__: We use Node LTS (>=20.14.0 < 21) to compile
and run the client Angular application. Depending on your system, you
can install Node either from source or as a pre-packaged bundle.
4. `Npm <https://nodejs.org/en/download>`__: We use Npm (>=10.2.3) to
4. `Npm <https://nodejs.org/en/download>`__: We use Npm (>=10.7.0) to
manage client side dependencies. Npm is typically bundled with Node.js,
but can also be installed separately.
5. ( `Graphviz <https://www.graphviz.org/download/>`__: We use Graphviz to generate graphs within exercise task
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ rootProject.name=Artemis
profile=dev

# Build properties
node_version=20.10.0
npm_version=10.2.3
node_version=20.14.0
npm_version=10.7.0

# Dependency versions
jhipster_dependencies_version=8.5.0
Expand Down
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ module.exports = {
global: {
// TODO: in the future, the following values should increase to at least 90%
statements: 86.80,
branches: 73.21,
branches: 73.18,
functions: 81.21,
lines: 86.89,
},
Expand Down
4,919 changes: 2,549 additions & 2,370 deletions package-lock.json

Large diffs are not rendered by default.

130 changes: 73 additions & 57 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "artemis",
"version": "7.2.2",
"version": "7.2.3",
"description": "Interactive Learning with Individual Feedback",
"private": true,
"license": "MIT",
Expand All @@ -13,36 +13,36 @@
"node_modules"
],
"dependencies": {
"@angular/animations": "17.3.9",
"@angular/cdk": "17.3.9",
"@angular/common": "17.3.9",
"@angular/compiler": "17.3.9",
"@angular/core": "17.3.9",
"@angular/forms": "17.3.9",
"@angular/localize": "17.3.9",
"@angular/material": "17.3.9",
"@angular/platform-browser-dynamic": "17.3.9",
"@angular/platform-browser": "17.3.9",
"@angular/router": "17.3.9",
"@angular/service-worker": "17.3.9",
"@angular/animations": "18.0.3",
"@angular/cdk": "18.0.4",
"@angular/common": "18.0.3",
"@angular/compiler": "18.0.3",
"@angular/core": "18.0.3",
"@angular/forms": "18.0.3",
"@angular/localize": "18.0.3",
"@angular/material": "18.0.4",
"@angular/platform-browser-dynamic": "18.0.3",
"@angular/platform-browser": "18.0.3",
"@angular/router": "18.0.3",
"@angular/service-worker": "18.0.3",
"@ctrl/ngx-emoji-mart": "9.2.0",
"@danielmoncada/angular-datetime-picker": "17.0.0",
"@fingerprintjs/fingerprintjs": "4.3.0",
"@fingerprintjs/fingerprintjs": "4.4.1",
"@flaviosantoro92/ngx-datatable": "1.0.2",
"@fortawesome/angular-fontawesome": "0.14.1",
"@fortawesome/angular-fontawesome": "0.15.0",
"@fortawesome/fontawesome-svg-core": "6.5.2",
"@fortawesome/free-regular-svg-icons": "6.5.2",
"@fortawesome/free-solid-svg-icons": "6.5.2",
"@ls1intum/apollon": "3.3.14",
"@ng-bootstrap/ng-bootstrap": "16.0.0",
"@ng-bootstrap/ng-bootstrap": "17.0.0",
"@ngx-translate/core": "15.0.0",
"@ngx-translate/http-loader": "8.0.0",
"@sentry/angular-ivy": "7.114.0",
"@sentry/tracing": "7.114.0",
"@swimlane/ngx-charts": "20.5.0",
"@swimlane/ngx-graph": "8.3.0",
"@vscode/codicons": "0.0.36",
"ace-builds": "1.33.2",
"ace-builds": "1.35.0",
"bootstrap": "5.3.3",
"brace": "0.11.1",
"compare-versions": "6.1.0",
Expand All @@ -51,7 +51,7 @@
"dayjs": "1.11.11",
"diff-match-patch-typescript": "1.0.8",
"fast-json-patch": "3.1.1",
"dompurify": "3.1.3",
"dompurify": "3.1.5",
"export-to-csv": "1.3.0",
"franc-min": "6.2.0",
"interactjs": "1.10.27",
Expand All @@ -60,11 +60,11 @@
"jszip": "3.10.1",
"lodash-es": "4.17.21",
"mobile-drag-drop": "3.0.0-rc.0",
"monaco-editor": "0.48.0",
"ngx-infinite-scroll": "17.0.0",
"ngx-webstorage": "13.0.1",
"monaco-editor": "0.50.0",
"ngx-infinite-scroll": "18.0.0",
"ngx-webstorage": "18.0.0",
"papaparse": "5.4.1",
"posthog-js": "1.131.4",
"posthog-js": "1.139.5",
"rxjs": "7.8.1",
"showdown": "2.1.0",
"showdown-highlight": "3.1.0",
Expand All @@ -74,69 +74,85 @@
"sockjs-client": "1.6.1",
"split.js": "1.6.5",
"ts-cacheable": "1.0.10",
"tslib": "2.6.2",
"uuid": "9.0.1",
"tslib": "2.6.3",
"uuid": "10.0.0",
"webstomp-client": "1.2.6",
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.2/xlsx-0.20.2.tgz",
"zone.js": "0.14.5"
"zone.js": "0.14.7"
},
"overrides": {
"@danielmoncada/angular-datetime-picker": {
"@angular/cdk": "^18.0.0",
"@angular/common": "^18.0.0",
"@angular/core": "^18.0.0"
},
"@sentry/angular-ivy": {
"@angular/cdk": "^18.0.0",
"@angular/common": "^18.0.0",
"@angular/core": "^18.0.0",
"@angular/localize": "^18.0.0",
"@angular/forms": "^18.0.0",
"@angular/router": "^18.0.0"
},
"@swimlane/ngx-graph": {
"@angular/animations": "^17.0.0",
"@angular/cdk": "^17.0.0",
"@angular/common": "^17.0.0",
"@angular/core": "^17.0.0",
"@angular/animations": "^18.0.0",
"@angular/cdk": "^18.0.0",
"@angular/common": "^18.0.0",
"@angular/core": "^18.0.0",
"d3-brush": "^3.0.0",
"d3-color": "^3.1.0",
"d3-interpolate": "^3.0.1",
"d3-selection": "^3.0.0",
"d3-transition": "^3.0.0"
},
"axios": "1.6.8",
"axios": "1.7.2",
"braces": "3.0.3",
"critters": "0.0.22",
"debug": "4.3.4",
"jsdom": "24.0.0",
"katex": "0.16.10",
"postcss": "8.4.38",
"semver": "7.6.0",
"semver": "7.6.2",
"showdown-katex": {
"showdown": "2.1.0"
},
"tough-cookie": "4.1.3",
"undici": "6.12.0",
"vite": "5.1.7",
"tough-cookie": "4.1.4",
"undici": "6.18.1",
"vite": "5.2.12",
"webpack-dev-middleware": "7.2.1",
"word-wrap": "1.2.5"
"word-wrap": "1.2.5",
"ws": "8.17.1",
"yargs-parser": "21.1.1"
},
"devDependencies": {
"@angular-builders/jest": "17.0.3",
"@angular-devkit/build-angular": "17.3.7",
"@angular-eslint/builder": "17.4.1",
"@angular-eslint/eslint-plugin": "17.4.1",
"@angular-eslint/eslint-plugin-template": "17.4.1",
"@angular-eslint/schematics": "17.4.1",
"@angular-eslint/template-parser": "17.4.1",
"@angular/cli": "17.3.7",
"@angular/compiler-cli": "17.3.9",
"@angular/language-service": "17.3.9",
"@angular-builders/jest": "18.0.0",
"@angular-devkit/build-angular": "18.0.5",
"@angular-eslint/builder": "18.0.1",
"@angular-eslint/eslint-plugin": "18.0.1",
"@angular-eslint/eslint-plugin-template": "18.0.1",
"@angular-eslint/schematics": "18.0.1",
"@angular-eslint/template-parser": "18.0.1",
"@angular/cli": "18.0.5",
"@angular/compiler-cli": "18.0.3",
"@angular/language-service": "18.0.3",
"@sentry/types": "7.114.0",
"@types/crypto-js": "4.2.2",
"@types/d3-shape": "3.1.6",
"@types/dompurify": "3.0.5",
"@types/jest": "29.5.12",
"@types/lodash-es": "4.17.12",
"@types/node": "20.12.12",
"@types/node": "20.14.6",
"@types/papaparse": "5.3.14",
"@types/showdown": "2.0.6",
"@types/smoothscroll-polyfill": "0.3.4",
"@types/sockjs-client": "1.5.4",
"@types/uuid": "9.0.8",
"@typescript-eslint/eslint-plugin": "7.9.0",
"@typescript-eslint/parser": "7.9.0",
"@typescript-eslint/eslint-plugin": "7.13.1",
"@typescript-eslint/parser": "7.13.1",
"eslint": "8.57.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-deprecation": "2.0.0",
"eslint-plugin-jest": "28.5.0",
"eslint-plugin-deprecation": "3.0.0",
"eslint-plugin-jest": "28.6.0",
"eslint-plugin-jest-extended": "2.4.0",
"eslint-plugin-prettier": "5.1.3",
"folder-hash": "4.0.4",
Expand All @@ -147,17 +163,17 @@
"jest-extended": "4.0.2",
"jest-fail-on-console": "3.3.0",
"jest-junit": "16.0.0",
"jest-preset-angular": "14.0.4",
"lint-staged": "15.2.2",
"ng-mocks": "14.12.2",
"prettier": "3.2.5",
"sass": "1.77.1",
"ts-jest": "29.1.2",
"jest-preset-angular": "14.1.1",
"lint-staged": "15.2.7",
"ng-mocks": "14.13.0",
"prettier": "3.3.2",
"sass": "1.77.6",
"ts-jest": "29.1.5",
"typescript": "5.4.5",
"weak-napi": "2.0.2"
},
"engines": {
"node": ">=20.10.0"
"node": ">=20.14.0"
},
"scripts": {
"postinstall": "husky",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ CASE WHEN TYPE(e) = ProgrammingExercise THEN TREAT(e AS ProgrammingExercise).all
WHERE e.id IN :exerciseIds
AND s.submitted = TRUE
AND (p.student.id = :userId OR u.id = :userId)
AND p.testRun = FALSE
GROUP BY e.id, p.id
""")
Set<ResourceTimestampDTO> findLatestSubmissionDatesForUser(@Param("exerciseIds") Set<Long> exerciseIds, @Param("userId") long userId);
Expand All @@ -127,6 +128,7 @@ CASE WHEN TYPE(e) = ProgrammingExercise THEN TREAT(e AS ProgrammingExercise).all
LEFT JOIN p.exercise e
WHERE e.id IN :exerciseIds
AND s.submitted = TRUE
AND p.testRun = FALSE
GROUP BY e.id, p.id
""")
Set<ResourceTimestampDTO> findLatestSubmissionDates(@Param("exerciseIds") Set<Long> exerciseIds);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public interface LectureUnitMetricsRepository extends JpaRepository<LectureUnit,
* @return the lecture unit information for all lecture units in the course
*/
@Query("""
SELECT new de.tum.in.www1.artemis.web.rest.dto.metrics.LectureUnitInformationDTO(lu.id, lu.lecture.id, COALESCE(lu.name, a.name), lu.releaseDate, TYPE(lu))
SELECT new de.tum.in.www1.artemis.web.rest.dto.metrics.LectureUnitInformationDTO(lu.id, lu.lecture.id, lu.lecture.title, COALESCE(lu.name, a.name), lu.releaseDate, TYPE(lu))
FROM LectureUnit lu
LEFT JOIN Attachment a ON a.attachmentUnit.id = lu.id
WHERE lu.lecture.course.id = :courseId
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1013,9 +1013,8 @@ public boolean accept(java.io.File directory, String fileName) {

/**
* Lists all files and directories within the given repository, excluding symbolic links.
* This method utilizes caching to avoid repeated scanning of the repository. If the repository's content is
* already cached, it returns the cached content. Otherwise, it performs a scan, filters out symbolic links,
* and caches the result for future use.
* This method performs a file scan and filters out symbolic links.
* It supports bare and checked-out repositories.
* <p>
* Note: This method does not handle changes to the repository content between invocations. If files change
* after the initial caching, the cache does not automatically refresh, which may lead to stale data.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import de.tum.in.www1.artemis.domain.Repository;
import de.tum.in.www1.artemis.domain.iris.message.IrisMessage;
import de.tum.in.www1.artemis.domain.participation.ProgrammingExerciseParticipation;
import de.tum.in.www1.artemis.service.ProfileService;
import de.tum.in.www1.artemis.service.connectors.GitService;
import de.tum.in.www1.artemis.service.connectors.pyris.dto.data.PyrisBuildLogEntryDTO;
import de.tum.in.www1.artemis.service.connectors.pyris.dto.data.PyrisFeedbackDTO;
Expand All @@ -37,9 +38,12 @@ public class PyrisDTOService {

private final RepositoryService repositoryService;

public PyrisDTOService(GitService gitService, RepositoryService repositoryService) {
private final ProfileService profileService;

public PyrisDTOService(GitService gitService, RepositoryService repositoryService, ProfileService profileService) {
this.gitService = gitService;
this.repositoryService = repositoryService;
this.profileService = profileService;
}

/**
Expand Down Expand Up @@ -125,7 +129,13 @@ private PyrisResultDTO getLatestResult(ProgrammingSubmission submission) {
*/
private Optional<Repository> getRepository(ProgrammingExerciseParticipation participation) {
try {
return Optional.ofNullable(gitService.getOrCheckoutRepository(participation.getVcsRepositoryUri(), true));
var repositoryUri = participation.getVcsRepositoryUri();
if (profileService.isLocalVcsActive()) {
return Optional.ofNullable(gitService.getBareRepository(repositoryUri));
}
else {
return Optional.ofNullable(gitService.getOrCheckoutRepository(repositoryUri, true));
}
}
catch (GitAPIException e) {
log.error("Could not fetch repository", e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@
/**
* DTO for lecture unit information.
*
* @param id the id of the lecture unit
* @param lectureId the id of the lecture
* @param name the name of the lecture unit
* @param releaseDate the release date of the lecture unit
* @param type the type of the lecture unit
* @param id the id of the lecture unit
* @param lectureId the id of the lecture
* @param lectureTitle the title of the lecture
* @param name the name of the lecture unit
* @param releaseDate the release date of the lecture unit
* @param type the type of the lecture unit
*/
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public record LectureUnitInformationDTO(long id, long lectureId, String name, ZonedDateTime releaseDate, Class<? extends LectureUnit> type) {
public record LectureUnitInformationDTO(long id, long lectureId, String lectureTitle, String name, ZonedDateTime releaseDate, Class<? extends LectureUnit> type) {
}
Loading

0 comments on commit 88f0784

Please sign in to comment.