Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add plagiarism detection for evaluations #5534

Merged
merged 9 commits into from
May 28, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update page layout
jorg-vr committed May 16, 2024
commit 2471808ca8fc9f2abe719b7028f524b1c7fd8dc8
8 changes: 3 additions & 5 deletions app/assets/stylesheets/components/table.css.scss
Original file line number Diff line number Diff line change
@@ -57,11 +57,9 @@
.table-resource .actions {
text-align: right;

&.submissions-table {
// by default the size of the element in the col is used as width if width is smaller than that element.
// This width is just here to force everything to the right
width: 1px;
}
// by default the size of the element in the col is used as width if width is smaller than that element.
// This width is just here to force everything to the right
width: 1px;
}

tr.gu-mirror {
4 changes: 2 additions & 2 deletions app/views/evaluations/_exercises_progress_table.html.erb
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@
<th class="status-icon"></th>
<th><%= t "activities.index.activity_title" %></th>
<th class='count'><%= t "evaluations.show.evaluation_progress" %></th>
<th class="status-icon"></th>
<th class="actions"></th>
</tr>
</thead>
<tbody>
@@ -30,7 +30,7 @@
</span>
</td>

<td>
<td class="actions">
<% if meta[:next_incomplete_feedback].present? %>
<%= link_to meta[:next_incomplete_feedback], title: t('evaluations.show.next_incomplete_feedback'), class: 'btn btn-outline with-icon' do %>
<i class="mdi mdi-message-draw mdi-18"></i>
26 changes: 11 additions & 15 deletions app/views/evaluations/show.html.erb
Original file line number Diff line number Diff line change
@@ -5,21 +5,17 @@
<h2 class="card-title-text"><%= t('.title', series: @evaluation.series.name) %></h2>
</div>
<div class="card-supporting-text">
<div class="row">
<div class="col-lg-6 col-md-12 order-lg-1">
<div class="callout callout-info">
<h4><%= t ".explanation_title" %></h4>
<% if @evaluation.score_items.empty? %>
<%= t ".explanation_no_grading_html" %>
<% else %>
<%= t ".explanation_yes_grading_html" %>
<% end %>
</div>
</div>
<div class="col-lg-6 col-md-12 order-lg-0">
<p><%= t '.deadline_html', users: @evaluation.users.count, exercises: @evaluation.exercises.count, deadline: l(@evaluation.deadline, format: :submission) %></p>
<%= render partial: 'exercises_progress_table', locals: { metadata: @evaluation.metadata, series: @evaluation.series } %>
</div>
<details>
<summary><%= t ".explanation_title" %></summary>
<% if @evaluation.score_items.empty? %>
<%= t ".explanation_no_grading_html" %>
<% else %>
<%= t ".explanation_yes_grading_html" %>
<% end %>
</details>
<div>
<p><%= t '.deadline_html', users: @evaluation.users.count, exercises: @evaluation.exercises.count, deadline: l(@evaluation.deadline, format: :submission) %></p>
<%= render partial: 'exercises_progress_table', locals: { metadata: @evaluation.metadata, series: @evaluation.series } %>
</div>
</div>
<div class="card-actions card-border">

Unchanged files with check annotations Beta

const LOADER_ID = "dolos-loader";
const DOLOS_URL = "/dolos_reports";
const handledBtns = new Set<string>();
export function initDolosBtn(btnID: string, url: string): void {

Check warning on line 11 in app/assets/javascripts/dolos.ts

Codecov / codecov/patch

app/assets/javascripts/dolos.ts#L10-L11

Added lines #L10 - L11 were not covered by tests
if (handledBtns.has(btnID)) {
return;

Check warning on line 13 in app/assets/javascripts/dolos.ts

Codecov / codecov/patch

app/assets/javascripts/dolos.ts#L13

Added line #L13 was not covered by tests
}
const btn = document.getElementById(btnID) as HTMLLinkElement;
btn.addEventListener("click", () => startDolos(btn, url));
handledBtns.add(btnID);

Check warning on line 17 in app/assets/javascripts/dolos.ts

Codecov / codecov/patch

app/assets/javascripts/dolos.ts#L15-L17

Added lines #L15 - L17 were not covered by tests
}
export async function startDolos(btn: HTMLLinkElement, url: string): Promise<void> {
console.log("Starting Dolos report generation", btn.id);

Check warning on line 21 in app/assets/javascripts/dolos.ts

Codecov / codecov/patch

app/assets/javascripts/dolos.ts#L20-L21

Added lines #L20 - L21 were not covered by tests
const loader = document.getElementById(LOADER_ID) as LoadingBar;
loader.show();
btn.classList.add("disabled");
.to_h { |m| [m.user, m.course_labels] }
@users = @users_labels.keys if users.nil?
@users = @item.evaluation.users if evaluation?

Check warning on line 35 in app/helpers/export_helper.rb

Codecov / codecov/patch

app/helpers/export_helper.rb#L35

Added line #L35 was not covered by tests
when Course
@list = @item.series if all?
@users_labels = @item.course_memberships
end
def evaluation?
@options[:evaluation].present? && @item.is_a?(Series) && @item.evaluation.present?

Check warning on line 97 in app/helpers/export_helper.rb

Codecov / codecov/patch

app/helpers/export_helper.rb#L97

Added line #L97 was not covered by tests
end
def zip_filename