Skip to content
Snippets Groups Projects
Commit b1f13ce8 authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms
Browse files

add remaining class filename and add migration to fix the cronjobs, re #4282

Merge request !3136
parent 7635e34c
Branches
No related tags found
No related merge requests found
Showing
with 63 additions and 21 deletions
...@@ -13,8 +13,8 @@ class LoncapaController extends AuthenticatedController ...@@ -13,8 +13,8 @@ class LoncapaController extends AuthenticatedController
if ($GLOBALS['perm']->have_studip_perm('user', $course_id) if ($GLOBALS['perm']->have_studip_perm('user', $course_id)
&& isset($GLOBALS['ELEARNING_INTERFACE_MODULES'][$cms_type])) && isset($GLOBALS['ELEARNING_INTERFACE_MODULES'][$cms_type]))
{ {
require_once 'lib/elearning/ELearningUtils.class.php'; require_once 'lib/elearning/ELearningUtils.php';
require_once 'lib/elearning/ObjectConnections.class.php'; require_once 'lib/elearning/ObjectConnections.php';
$object_connections = new ObjectConnections($course_id); $object_connections = new ObjectConnections($course_id);
$connected_modules = $object_connections->getConnections(); $connected_modules = $object_connections->getConnections();
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
/** /**
* Controller for the ajax-response of the QuickSearch class found in * Controller for the ajax-response of the QuickSearch class found in
* lib/classes/QuickSearch.class.php * lib/classes/QuickSearch.php
*/ */
class QuicksearchController extends AuthenticatedController class QuicksearchController extends AuthenticatedController
{ {
......
...@@ -18,7 +18,7 @@ class CleanupAdmissionRules extends Command ...@@ -18,7 +18,7 @@ class CleanupAdmissionRules extends Command
protected function execute(InputInterface $input, OutputInterface $output): int protected function execute(InputInterface $input, OutputInterface $output): int
{ {
require_once 'lib/classes/admission/CourseSet.class.php'; require_once 'lib/classes/admission/CourseSet.php';
$course_set = new \CourseSet(); $course_set = new \CourseSet();
......
...@@ -65,11 +65,11 @@ class PluginInfo extends AbstractPluginCommand ...@@ -65,11 +65,11 @@ class PluginInfo extends AbstractPluginCommand
private function pluginClassExists(string $plugindir, array $plugin) private function pluginClassExists(string $plugindir, array $plugin)
{ {
$pluginfile = $plugindir . $plugin['class'] . '.class.php'; $pluginfile = $plugindir . $plugin['class'] . '.php';
if (file_exists($pluginfile)) { if (file_exists($pluginfile)) {
return 1; return 1;
} else { } else {
$pluginfile = $plugindir . $plugin['class'] . '.php'; $pluginfile = $plugindir . $plugin['class'] . '.class.php';
if (file_exists($pluginfile)) { if (file_exists($pluginfile)) {
return 1; return 1;
} }
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
"Trails\\": "lib/trails/", "Trails\\": "lib/trails/",
"": [ "": [
"lib/calendar/", "lib/calendar/",
"lib/calendar/lib/",
"lib/classes/", "lib/classes/",
"lib/classes/admission/", "lib/classes/admission/",
"lib/classes/admission/userfilter/", "lib/classes/admission/userfilter/",
......
...@@ -329,7 +329,7 @@ $INST_ADMIN_DATAFIELDS_VIEW = [ ...@@ -329,7 +329,7 @@ $INST_ADMIN_DATAFIELDS_VIEW = [
/* /*
* Fields that may not be hidden by users in their privacy settings. * Fields that may not be hidden by users in their privacy settings.
* Can be configured per permission level. * Can be configured per permission level.
* @see lib/models/User.class.php in function getHomepageElements for * @see lib/models/User.php in function getHomepageElements for
* available fields. * available fields.
* Entries look like "'field_name' => true". * Entries look like "'field_name' => true".
*/ */
......
<?php <?php
require_once 'vendor/phpass/PasswordHash.php'; require_once 'vendor/phpass/PasswordHash.php';
require_once 'lib/classes/admission/CourseSet.class.php'; require_once 'lib/classes/admission/CourseSet.php';
class Step00240CourseSets extends Migration class Step00240CourseSets extends Migration
{ {
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
*/ */
require_once 'lib/classes/Avatar.class.php'; require_once 'lib/classes/Avatar.php';
class Step120Userpic extends Migration { class Step120Userpic extends Migration {
......
<?php
return new class extends Migration
{
private const ADJUSTMENTS = [
'lib/cronjobs/purge_cache',
'lib/cronjobs/check_admission',
'lib/cronjobs/session_gc',
'lib/cronjobs/cleanup_log',
'lib/cronjobs/garbage_collector',
'lib/cronjobs/send_mail_queue',
'lib/cronjobs/remind_oer_upload',
'lib/cronjobs/send_mail_notifications',
];
public function description()
{
return 'Adjusts the class names for core cronjobs by losing the .class suffix';
}
protected function up()
{
$this->changeCronjobFilenames('.class.php', '.php');
}
protected function down()
{
$this->changeCronjobFilenames('.php', '.class.php');
}
private function changeCronjobFilenames(string $fromExtension, string $toExtension): void
{
$query = "UPDATE `cronjobs_tasks`
SET `filename` = :new
WHERE `filename` = :old";
$statement = DBManager::get()->prepare($query);
foreach (self::ADJUSTMENTS as $filename) {
$statement->bindValue(':new', $filename . $toExtension);
$statement->bindValue(':old', $filename . $fromExtension);
$statement->execute();
}
}
};
<?php <?php
/** /**
* ConditionalAdmission.class.php * ConditionalAdmission.php
* *
* An admission rule that specifies conditions for course admission, like * An admission rule that specifies conditions for course admission, like
* degree, study course or semester. * degree, study course or semester.
......
<?php <?php
/** /**
* CourseMemberAdmission.class.php * CourseMemberAdmission.php
* *
* Specifies a mandatory course membership for course admission. * Specifies a mandatory course membership for course admission.
* *
......
<?php <?php
/** /**
* LimitedAdmission.class.php * LimitedAdmission.php
* *
* Represents rules for admission to a limited number of courses. * Represents rules for admission to a limited number of courses.
* *
......
<?php <?php
/** /**
* LockedAdmission.class.php * LockedAdmission.php
* *
* Represents a rule for completely locking courses for admission. * Represents a rule for completely locking courses for admission.
* *
......
<?php <?php
/** /**
* ParticipantRestrictedAdmission.class.php * ParticipantRestrictedAdmission.php
* *
* Specifies restricted number of participants for course admission. * Specifies restricted number of participants for course admission.
* *
......
<?php <?php
/** /**
* PasswordAdmission.class.php * PasswordAdmission.php
* *
* Represents a rule for course access with a given password. * Represents a rule for course access with a given password.
* *
......
<?php <?php
/** /**
* PreferentialAdmission.class.php * PreferentialAdmission.php
* *
* An admission rule that favors selected courses of study or semesters of study. * An admission rule that favors selected courses of study or semesters of study.
* *
......
<?php <?php
/** /**
* TermsAdmission.class.php * TermsAdmission.php
* *
* Represents a rule for course access with conditions of admission to be accepted. * Represents a rule for course access with conditions of admission to be accepted.
* *
......
<?php <?php
/** /**
* TimedAdmission.class.php * TimedAdmission.php
* *
* Specifies a time frame for course admission. * Specifies a time frame for course admission.
* *
......
<?php <?php
# Lifter010: TODO # Lifter010: TODO
/** /**
* CalendarColumn.class.php - a column for a CalendarView * CalendarColumn.php - a column for a CalendarView
* *
* This class represents an entry-column like "monday" in the calendar * This class represents an entry-column like "monday" in the calendar
* *
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# Lifter010: TODO # Lifter010: TODO
/** /**
* CalendarView.class.php - generates a calendar * CalendarView.php - generates a calendar
* *
* This class takes and checks all necessary parameters to display a calendar/schedule/time-table. * This class takes and checks all necessary parameters to display a calendar/schedule/time-table.
* *
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment