Browse Source

Fix generated certificate redirection #2332

jmontoyaa 7 years ago
parent
commit
dd3e3e1a02
1 changed files with 7 additions and 0 deletions
  1. 7 0
      main/gradebook/gradebook_display_certificate.php

+ 7 - 0
main/gradebook/gradebook_display_certificate.php

@@ -138,6 +138,8 @@ switch ($action) {
         }
 
         Category::exportAllCertificates($categoryId, $userList);
+        header('Location: '.$url);
+        exit;
         break;
     case 'generate_all_certificates':
         $userList = CourseManager::get_user_list_from_course_code(
@@ -153,9 +155,14 @@ switch ($action) {
                 Category::generateUserCertificate($categoryId, $userInfo['user_id']);
             }
         }
+        header('Location: '.$url);
+        exit;
         break;
     case 'delete_all_certificates':
         Category::deleteAllCertificates($categoryId);
+        Display::addFlash(Display::return_message(get_lang('Deleted')));
+        header('Location: '.$url);
+        exit;
         break;
 }