Skip to content

Commit

Permalink
Merge pull request #5831 from christianbeeznest/matra-22057
Browse files Browse the repository at this point in the history
Internal: Add session replication, reinscription logic, and child session hierarchy for course expiration - refs BT#22057
  • Loading branch information
NicoDucou authored Mar 7, 2025
2 parents 4a78a87 + caacf2a commit 002ed27
Show file tree
Hide file tree
Showing 15 changed files with 1,222 additions and 63 deletions.
6 changes: 2 additions & 4 deletions public/main/gradebook/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -827,15 +827,13 @@ function confirmation() {
$category = null;
if (!empty($selectCat)) {
$repo = Container::getGradeBookCategoryRepository();
if (!empty($categoryId)) {
$category = $repo->find($selectCat);
}
$category = $repo->find($selectCat);
$course_id = CourseManager::get_course_by_category($selectCat);
$show_message = Category::show_message_resource_delete($course_id);
if (empty($show_message)) {
// Student
if (!api_is_allowed_to_edit() && !api_is_excluded_user_type()) {
if ($category) {
if (null !== $category) {
$certificate = Category::generateUserCertificate($category, $stud_id);
if ('true' !== $hideCertificateExport && isset($certificate['pdf_url'])) {
$actionsLeft .= Display::url(
Expand Down
6 changes: 4 additions & 2 deletions public/main/inc/ajax/model.ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ function getWhereClause($col, $oper, $val)
$count = ExerciseLib::get_count_exam_results(
$exerciseId,
$whereCondition,
'',
$courseId,
false,
true,
$status
Expand Down Expand Up @@ -839,6 +839,7 @@ function getWhereClause($col, $oper, $val)
['where' => $whereCondition, 'extra' => $extra_fields]
);
break;
case 'replication':
case 'custom':
case 'simple':
$count = SessionManager::getSessionsForAdmin(
Expand Down Expand Up @@ -1981,7 +1982,7 @@ function getWhereClause($col, $oper, $val)
break;
case 'custom':
case 'simple':
case 'all':
case 'replication':
$result = SessionManager::getSessionsForAdmin(
api_get_user_id(),
[
Expand All @@ -2000,6 +2001,7 @@ function getWhereClause($col, $oper, $val)
break;
case 'active':
case 'close':
case 'all':
$result = SessionManager::formatSessionsAdminForGrid(
[
'where' => $whereCondition,
Expand Down
Loading

0 comments on commit 002ed27

Please sign in to comment.