Update opolka/ScoDoc from ScoDoc/ScoDoc #2

Merged
opolka merged 1272 commits from ScoDoc/ScoDoc:master into master 2024-05-27 09:11:04 +02:00
2 changed files with 25 additions and 0 deletions
Showing only changes of commit 8e56dc2418 - Show all commits

View File

@ -367,6 +367,9 @@ def evaluation_create_form(
+ "\n".join(H) + "\n".join(H)
+ "\n" + "\n"
+ tf[1] + tf[1]
+ render_template(
"scodoc/forms/evaluation_edit.j2",
)
+ render_template( + render_template(
"scodoc/help/evaluations.j2", is_apc=is_apc, modimpl=modimpl "scodoc/help/evaluations.j2", is_apc=is_apc, modimpl=modimpl
) )

View File

@ -0,0 +1,22 @@
{# Interdit de définir des évaluations non normales "immédiates" #}
<script>
document.addEventListener('DOMContentLoaded', function() {
var evaluationTypeSelect = document.getElementById('tf_evaluation_type');
var publishIncompleteCheckbox = document.querySelector('input[type="checkbox"][name="publish_incomplete:list"]');
function updateCheckboxState() {
if (evaluationTypeSelect.value !== '0') {
publishIncompleteCheckbox.disabled = true;
publishIncompleteCheckbox.checked = false; // Ensure the checkbox is not checked
} else {
publishIncompleteCheckbox.disabled = false;
}
}
// Add event listener to select element
evaluationTypeSelect.addEventListener('change', updateCheckboxState);
// Initial call to set the correct state when the page loads
updateCheckboxState();
});
</script>