Skip to content

Commit

Permalink
Merge branch 'develop' into feature/disable-personal-access-tokens-fo…
Browse files Browse the repository at this point in the history
…r-students
  • Loading branch information
SimonEntholzer authored Oct 12, 2024
2 parents 6614eda + 3154064 commit a0c650e
Show file tree
Hide file tree
Showing 543 changed files with 8,502 additions and 3,781 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/validate-pr-title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Validate PR Title

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review, edited]

jobs:
validate-pr-title:
runs-on: ubuntu-latest
timeout-minutes: 1
steps:
- uses: Slashgear/[email protected]
with:
regexp: '^`(Programming exercises|Integrated code lifecycle|Quiz exercises|Modeling exercises|Text exercises|File upload exercises|Exam mode|Grading|Assessment|Communication|Notifications|Team exercises|Lectures|Integrated markdown editor|Plagiarism checks|Learning analytics|Adaptive learning|Learning path|Tutorial groups|Iris|Scalability|Usability|Performance|Infrastructure|Mobile apps|Development|General)`:\s[A-Z].*$'
2 changes: 1 addition & 1 deletion angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
},
{
"glob": "**/*",
"input": "./node_modules/monaco-editor/min/vs",
"input": "./node_modules/monaco-editor/bundles/vs",
"output": "vs"
}
],
Expand Down
11 changes: 6 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -246,14 +246,15 @@ dependencies {
implementation "org.gitlab4j:gitlab4j-api:6.0.0-rc.5"

implementation "de.jplag:jplag:${jplag_version}"
implementation "de.jplag:java:${jplag_version}"
implementation "de.jplag:kotlin:${jplag_version}"

implementation "de.jplag:c:${jplag_version}"
implementation "de.jplag:swift:${jplag_version}"
implementation "de.jplag:java:${jplag_version}"
implementation "de.jplag:javascript:${jplag_version}"
implementation "de.jplag:kotlin:${jplag_version}"
implementation "de.jplag:python-3:${jplag_version}"
implementation "de.jplag:rlang:${jplag_version}"
implementation "de.jplag:rust:${jplag_version}"
implementation "de.jplag:javascript:${jplag_version}"
implementation "de.jplag:swift:${jplag_version}"
implementation "de.jplag:text:${jplag_version}"

// those are transitive dependencies of JPlag Text --> Stanford NLP
Expand Down Expand Up @@ -534,7 +535,7 @@ dependencies {
testImplementation "org.awaitility:awaitility:4.2.2"
testImplementation "org.apache.maven.shared:maven-invoker:3.3.0"
testImplementation "org.gradle:gradle-tooling-api:8.10.2"
testImplementation "org.apache.maven.surefire:surefire-report-parser:3.5.0"
testImplementation "org.apache.maven.surefire:surefire-report-parser:3.5.1"
testImplementation "com.opencsv:opencsv:5.9"
testImplementation("io.zonky.test:embedded-database-spring-test:2.5.1") {
exclude group: "org.testcontainers", module: "mariadb"
Expand Down
2 changes: 1 addition & 1 deletion docs/dev/guidelines/database.rst
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ Best Practices
// IrisSubSettings.java
@Column(name = "allowed_models")
@Convert(converter = IrisModelListConverter.class)
private TreeSet<String> allowedModels = new TreeSet<>();
private TreeSet<String> allowedVariants = new TreeSet<>();
* **Ordered Collection with duplicates**: When you want to order the collection of (potentially duplicated) objects of the relationship, then always use a ``List``. It is important to note here that there is no inherent order in a database table. One could argue that you can use the ``id`` field for the ordering, but there are edge cases where this can lead to problems. Therefore, for an ordered collection with duplicates, **always** annotate it with ``@OrderColumn``. An order column indicates to Hibernate that we want to order our collection based on a specific column of our data table. By default, the column name it expects is *tablenameS\_order*. For ordered collections, we also recommend that you annotate them with ``cascade = CascadeType.ALL`` and ``orphanRemoval = true``. E.g.:
Expand Down
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ All these exercises are supposed to be run either live in the lecture with insta
user/grading
user/courses/customizable
user/markdown-support
user/integrated-code-lifecycle
user/exports
user/mobile-applications
user/lti
Expand Down
4 changes: 4 additions & 0 deletions docs/user/exercises/programming-exercise-features.inc
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ Instructors can still use those templates to generate programming exercises and
+----------------------+----------+---------+
| JavaScript | yes | yes |
+----------------------+----------+---------+
| R | yes | yes |
+----------------------+----------+---------+

- Not all ``templates`` support the same feature set and supported features can also change depending on the continuous integration system setup.
Depending on the feature set, some options might not be available during the creation of the programming exercise.
Expand Down Expand Up @@ -71,6 +73,8 @@ Instructors can still use those templates to generate programming exercises and
+----------------------+----------------------+----------------------+---------------------+--------------+------------------------------------------+------------------------------+----------------------------+------------------------+
| JavaScript | no | no | yes | no | n/a | no | no | L: yes, J: no |
+----------------------+----------------------+----------------------+---------------------+--------------+------------------------------------------+------------------------------+----------------------------+------------------------+
| R | no | no | yes | no | n/a | no | no | L: yes, J: no |
+----------------------+----------------------+----------------------+---------------------+--------------+------------------------------------------+------------------------------+----------------------------+------------------------+

- *Sequential Test Runs*: ``Artemis`` can generate a build plan which first executes structural and then behavioral tests. This feature can help students to better concentrate on the immediate challenge at hand.
- *Static Code Analysis*: ``Artemis`` can generate a build plan which additionally executes static code analysis tools.
Expand Down
2 changes: 2 additions & 0 deletions docs/user/exercises/programming-repository-access.inc
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
If you are a student, and want to know how to use the Artemis Version Control for checking out repositories locally, :ref:`checkout this guide.<local-vc>`

The following tables lists the different types of repositories and gives an overview of the access rights different users have.
To gain these access rights, a user must assume the indicated role in the course the repository belongs to.

Expand Down
18 changes: 2 additions & 16 deletions docs/user/exercises/programming.rst
Original file line number Diff line number Diff line change
Expand Up @@ -224,19 +224,5 @@ Each one represents a single test case feedback and should have the format:
Integrated Code Lifecycle
-------------------------

The following sections describe programming exercise features that are part of the integrated code lifecycle system.

Repository View
^^^^^^^^^^^^^^^

.. include:: programming-integrated-code-lifecycle-repository-view.inc

Build Agent View
^^^^^^^^^^^^^^^^

.. include:: programming-integrated-code-lifecycle-build-agent-view.inc

Build Overview View
^^^^^^^^^^^^^^^^^^^

.. include:: programming-integrated-code-lifecycle-build-queue-view.inc
The Artemis Integrated Code Lifecycle system allows you to use programming exercises fully integrated within Artemis, without the need of any external tools.
Find more information on it :ref:`here<integrated code lifecycle>`.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
12 changes: 12 additions & 0 deletions docs/user/icl/general.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.. _icl-general-information:

General Information
===================

Artemis offers the Integrated Code Lifecycle (ICL), a comprehensive feature designed to streamline the development process for programming exercises.
ICL combines version control, secure communication, and continuous integration to provide a seamless experience for students and instructors.
Understanding these components is crucial for effectively using Artemis, especially if you're new to concepts like SSH and Git. The key components of ICL are:

- :ref:`Local Version Control<local-vc>`: Use the Local Version Control to interact with the repositories of programming exercises.
- :ref:`SSH<basic SSH introduction>`: Use SSH to perform Git operations on repositories.
- :ref:`Local Continuous Integration<local-ci>`: Exercise submissions are built and tested by the Local CI system.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ The build agent view consists of two parts: the *Build Agent Summary View* and t
The **Build Agent Summary View** shows a list of all build agents in the system, along with their status (idle and running), maximum number of concurrent builds, and running builds.
The running builds can be canceled individually by clicking the red cancellation button next to the build. An Administrator can also cancel all running builds on a build agent by clicking the '*Cancel All*' button.

.. figure:: programming/build-agent-summary.png
.. figure:: local-ci/build-agent-summary.png
:alt: Build Agent Summary View
:align: center

Expand All @@ -20,7 +20,7 @@ the submission time, start time, end time, the duration of the build job, the co
The administrator can click on the participation ID to navigate to the participation's submission page.
The administrator can also click on the commit hash to navigate to the commits details page and the course ID to navigate to the course management page.

.. figure:: programming/build-agent-details.png
.. figure:: local-ci/build-agent-details.png
:alt: Build Agent Details
:align: center

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Artemis provides a build overview view that displays all queued, running, and finished build jobs. Access to the system-wide build overview is
exclusively available to **Administrators** through the *System Administration* menu.

.. figure:: programming/buildQueueSystemAdministration.png
.. figure:: local-ci/buildQueueSystemAdministration.png
:alt: Build Overview System Administration
:align: center

Expand All @@ -10,7 +10,7 @@ exclusively available to **Administrators** through the *System Administration*
**Instructors** can access the build overview for a specific course through the *Build Overview* button located in *Course Management*.
This view displays only the queued, running, and finished build jobs associated with the selected course.

.. figure:: programming/buildQueueCourseManagement.png
.. figure:: local-ci/buildQueueCourseManagement.png
:alt: Build Overview Course Management
:align: center

Expand All @@ -27,7 +27,7 @@ Jobs are dynamically added to and removed from the queue in real-time.
Users have the ability to cancel any job in progress. The table provides the following information:


.. figure:: programming/running-build-jobs.png
.. figure:: local-ci/running-build-jobs.png
:alt: Running Build Jobs
:align: center

Expand All @@ -43,7 +43,7 @@ Users also have the option to cancel any job that is queued.
The table below displays the following information:


.. figure:: programming/queued-build-jobs.png
.. figure:: local-ci/queued-build-jobs.png
:alt: Queued Build Jobs
:align: center

Expand All @@ -59,7 +59,7 @@ Instructors can also access build logs with detailed information about the build
The table provides the following information:


.. figure:: programming/finished-build-jobs.png
.. figure:: local-ci/finished-build-jobs.png
:alt: Finished Build Jobs
:align: center

Expand Down
Binary file added docs/user/icl/local-ci/build-agent-details.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/user/icl/local-ci/build-agent-summary.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/user/icl/local-ci/finished-build-jobs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/user/icl/local-ci/queued-build-jobs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/user/icl/local-ci/running-build-jobs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions docs/user/icl/local-continuous-integration.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
.. _local-ci:

Continuous Integration
======================

Continuous Integration (CI) is a software development practice where developers frequently merge their code changes into a shared repository. Each change is automatically built and tested, which helps to:

- Detect and address integration issues early
- Ensure code quality and consistency
- Streamline the development process

Artemis Local CI is our implementation of these CI principles, tailored to support the Artemis learning platform.
It provides tools and views to help users build and test in programming exercises effectively.

This document will introduce you to the key components of Artemis Local CI: the Build Agent View and the Build Overview View.
These tools will assist you throughout your development workflow on the Artemis platform.

Build Agent View
^^^^^^^^^^^^^^^^

.. include:: local-ci-build-agent-view.inc


Build Overview View
^^^^^^^^^^^^^^^^^^^

.. include:: local-ci-build-queue-view.inc
67 changes: 67 additions & 0 deletions docs/user/icl/local-vc-authentication.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
Cloning a repository
^^^^^^^^^^^^^^^^^^^^

You can use Sourcetree, git from the terminal, or any client you like to clone your Git repository.
These instructions show you how to clone your repository using Git from the terminal.

From the exercise view, click the code button to display the Clone dialog.
Copy the clone URL (either the SSH format or the HTTPS, with or without token).
If you are using the SSH protocol, ensure your public key is stored in your Artemis account settings and loaded on the local system to which you are cloning.
From a terminal window, change to the local directory where you want to clone your repository.

Paste the command you copied from Bitbucket, for example:

Clone over HTTPS:

.. code-block:: bash

git clone https://[email protected]/course/documentation-tests.git


Clone over HTTPS with access token:

.. code-block:: bash

git clone https://username:[email protected]/course/documentation-tests.git


Clone over SSH:

.. code-block:: bash

git clone ssh://[email protected]/course/documentation-tests.git


If the clone was successful, a new sub-directory appears on your local drive.
This directory has the same name as the repository that you cloned.
The clone contains the files and metadata that Git requires to maintain the changes you make to the source files.

Choosing between HTTPS and SSH:

- HTTPS: Easier to set up initially, works through firewalls, but requires entering credentials more frequently.
- SSH: More secure, doesn't require entering passwords for each operation once set up, but initial setup can be more complex.

Choose HTTPS if you're new to Git or working in an environment with strict firewall rules.
Choose SSH for enhanced security and convenience in long-term development.

HTTPS access tokens
^^^^^^^^^^^^^^^^^^^

Instructors can create HTTP access tokens for repository access in Artemis.
They are created in the account settings and are used in place of passwords for Git over HTTPS.
For every student's exercise, Artemis automatically generates an access token, only associated with the repository of this particular exercise.
You can use these to authenticate to the Artemis Local Version Control.

Token Creation
""""""""""""""

1. Go to Profile > Settings > VCS token.
2. Create a new token

Using SSH keys to secure Git operations
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Artemis provides a simple way for users to connect securely to repositories, using SSH to perform Git operations.
Next is a :ref:`small and basic introduction to SSH<basic SSH introduction>`, and if you already know it, :ref:`here is a guide on how to create SSH keys<create ssh key>`.
If you already have an SSH key, :ref:`learn how to add it to your Artemis account here<create ssh key>`.

Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ These changes are stored in a repository. A repository is a collection of files
How to navigate through the repository and view the code is explained in the following sections. This guide is divided into two parts: one for students and one for instructors.
It is demonstrated using course programming exercises, but the same principles apply to exams as well.

For Students
""""""""""""
Access Repositories as a Student
""""""""""""""""""""""""""""""""

As a student, you can use the repository to view your course submissions.
To access your submissions, you need to navigate to the exercise, press the '*Code*' button, and click on |open-repository-button|.

.. figure:: programming/open-repository-student.png
.. figure:: local-vc/open-repository-student.png
:alt: Opening the repository in the student view
:align: center

Expand All @@ -22,7 +22,7 @@ To the right side of the screen, above the problem statement, you can see the re
the '*Code*' button to clone the repository to your local machine and see the full commit history by pressing the '*Open Commit History*' button. Finally, you can
download the repository as a ZIP file by pressing the '*Download Repository*' button.

.. figure:: programming/current-repository-content-view.png
.. figure:: local-vc/current-repository-content-view.png
:alt: Current Repository Content
:align: center

Expand All @@ -33,7 +33,7 @@ You can see the commit message, the author of the commit, the date of the commit
If you created a submission with multiple commits, you can see all of them here but only the last commit has the result of the submission.
Lastly, you can also view the code of the commit by pressing on the commit hash.

.. figure:: programming/commit-history-view.png
.. figure:: local-vc/commit-history-view.png
:alt: Commit History View
:align: center

Expand All @@ -44,20 +44,20 @@ You can see the changes in the code, the files that have been added, the files t
Green color indicates the lines that have been added and red color indicates the lines that have been deleted.
You can also see the commit message, the author of the commit, the date of the commit and the commit hash.

.. figure:: programming/commit-diff-view.png
.. figure:: local-vc/commit-diff-view.png
:alt: Commit Diff View
:align: center

Commit Diff View

For Instructors
"""""""""""""""
Access Repositories as an Instructor
""""""""""""""""""""""""""""""""""""

As an instructor, you can use the repository to view the submissions of your students. For this purpose, you need to navigate to the exercise participations page.
Here you can see all the students’ participations for the exercise and navigate to the repository of a student by pressing the '*Code*' button and clicking on |open-repository-button|.
This will show the repository of the student just like it is shown to the student.

.. figure:: programming/open-repository-instructor-participations.png
.. figure:: local-vc/open-repository-instructor-participations.png
:alt: Open Repository Button in Participations Page
:align: center

Expand All @@ -66,11 +66,11 @@ This will show the repository of the student just like it is shown to the studen
You can also see the repositories for an exercises **solution**, **template** and **test** repositories on the exercise management page.
You can navigate to these repositories by pressing the '*Code*' button and clicking |open-repository-button| as described above.

.. figure:: programming/course-management-repositories.png
.. figure:: local-vc/course-management-repositories.png
:alt: Solution, Template and Test Repositories in Exercise Management Page
:align: center

Solution, Template and Test Repositories in Exercise Management Page

.. |open-repository-button| image:: programming/open-repository-button.png
.. |open-repository-button| image:: local-vc/open-repository-button.png
:scale: 50%
Binary file added docs/user/icl/local-vc/commit-diff-view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/user/icl/local-vc/commit-history-view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/user/icl/local-vc/open-repository-button.png
Binary file added docs/user/icl/local-vc/open-settings.png
Binary file added docs/user/icl/local-vc/ssh-add-public-key.png
16 changes: 16 additions & 0 deletions docs/user/icl/local-version-control.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.. _local-vc:

Local Version Control
=====================

.. contents:: Content of this document
:local:
:depth: 2


Repository View
^^^^^^^^^^^^^^^

.. include:: local-vc-repository-view.inc

.. include:: local-vc-authentication.inc
Loading

0 comments on commit a0c650e

Please sign in to comment.