Stud.IP  trunk Revision
biest7783-fix.php File Reference

Functions

 output ($what)
 

Variables

 $opts = getopt('d', ['dry-run'])
 
 $dry_run = isset($opts['d']) || isset($opts['dry-run'])
 
 $args = $_SERVER['argv']
 
 $arg_stop = array_search('--', $args)
 
if($arg_stop !==false) elseif(count($opts)) else
 
if(count($args)< 1) $semester_ids = explode(',', implode(',', array_map('trim', $args)))
 
foreach($semester_ids as $index=> $semester_id) $query
 
 $statement = DBManager::get()->prepare($query)
 
 $sets = $statement->fetchAll(PDO::FETCH_GROUP | PDO::FETCH_COLUMN)
 

Function Documentation

◆ output()

output (   $what)

This script removes all members from a course that should not have been members in the first place.

Author
Jan-Hendrik Willms tleil.nosp@m.ax+s.nosp@m.tudip.nosp@m.@gma.nosp@m.il.co.nosp@m.m
See also
https://develop.studip.de/trac/ticket/7783
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ $arg_stop

$arg_stop = array_search('--', $args)

◆ $args

$args = $_SERVER['argv']

◆ $dry_run

$dry_run = isset($opts['d']) || isset($opts['dry-run'])

◆ $opts

$opts = getopt('d', ['dry-run'])

◆ $query

foreach ( $semester_ids as $index=> $semester_id) $query
Initial value:
= "SELECT DISTINCT
cs.`set_id`, s.`seminar_id`
FROM `semester_data` AS sd
JOIN `seminare` AS s
ON (s.`start_time` <= sd.`beginn`
AND (
sd.`beginn` <= s.`start_time` + s.`duration_time`
OR s.`duration_time` = -1
)
)
JOIN `seminar_courseset` AS scs USING (`seminar_id`)
JOIN `coursesets` AS cs USING (`set_id`)
JOIN `auth_user_md5` USING (`user_id`)
JOIN `courseset_rule` AS csr USING (`set_id`)
JOIN `admission_condition` AS ac USING (`rule_id`)
JOIN `userfilter` AS uf USING (`filter_id`)
JOIN `userfilter_fields` AS uff USING (`filter_id`)
WHERE `semester_id` IN (:semester_ids)
AND `algorithm_run` = 0
AND uff.`type` = 'SemesterOfStudyCondition'
AND uff.`value` > 1
ORDER BY cs.`name` ASC, s.`name`"

◆ $semester_ids

if (count( $args)< 1) $semester_ids = explode(',', implode(',', array_map('trim', $args)))

◆ $sets

$sets = $statement->fetchAll(PDO::FETCH_GROUP | PDO::FETCH_COLUMN)

◆ $statement

$statement = DBManager::get()->prepare($query)

◆ else

if ( $arg_stop !==false) elseif (count( $opts)) else
Initial value:
{
$args = array_slice($args, 1)
$args
Definition: biest7783-fix.php:27