Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AvailabilitySchedule
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Uni Osnabrück
Plugins
AvailabilitySchedule
Commits
74dfb6c0
Commit
74dfb6c0
authored
11 years ago
by
Till Glöggler
Browse files
Options
Downloads
Patches
Plain Diff
first version of availability schedule
parent
6269ed4f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
AvailSchedule.class.php
+64
-0
64 additions, 0 deletions
AvailSchedule.class.php
README.md
+4
-2
4 additions, 2 deletions
README.md
plugin.manifest
+5
-0
5 additions, 0 deletions
plugin.manifest
templates/schedule.php
+58
-0
58 additions, 0 deletions
templates/schedule.php
with
131 additions
and
2 deletions
AvailSchedule.class.php
0 → 100755
+
64
−
0
View file @
74dfb6c0
<?php
/*
* AvailSchedule.class.php
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* @author Till Glggler <till.gloeggler@elan-ev.de>
* @copyright 2013 ELAN e.V. <http://www.elan-ev.de>
* @license http://www.gnu.org/licenses/gpl-2.0.html GPL version 2
* @category Stud.IP
*/
require_once
'lib/raumplan/draw_raumPlan.php'
;
require_once
'lib/raumplan/ConflictCounter.class.php'
;
require_once
'lib/classes/SemesterData.class.php'
;
class
AvailSchedule
extends
StudipPlugin
implements
SystemPlugin
{
/**
* Initialize a new instance of the plugin.
*/
function
__construct
()
{
parent
::
__construct
();
$seminar_id
=
Request
::
option
(
'cid'
,
$GLOBALS
[
'SeminarSession'
]);
$sem
=
Seminar
::
getInstance
(
$seminar_id
);
if
(
in_array
(
$sem
->
status
,
studygroup_sem_types
())
===
false
)
{
if
(
Navigation
::
hasItem
(
'/course/members'
)
&&
$GLOBALS
[
'perm'
]
->
have_studip_perm
(
'tutor'
,
$seminar_id
))
{
$navigation
=
Navigation
::
getItem
(
'/course/members'
);
$navigation
->
addSubNavigation
(
'conflicts'
,
new
Navigation
(
_
(
'Verfgbarkeit'
),
PluginEngine
::
getLink
(
'availschedule/show'
)));
}
}
}
function
show_action
()
{
$seminar_id
=
Request
::
option
(
'cid'
);
if
(
!
$seminar_id
||
!
$GLOBALS
[
'perm'
]
->
have_studip_perm
(
'tutor'
,
$seminar_id
))
{
die
;
}
PageLayout
::
setTitle
(
$GLOBALS
[
'SessSemName'
][
'header_line'
]
.
' - '
.
_
(
'Verfgbarkeitsplan'
));
Navigation
::
activateItem
(
'/course/members/conflicts'
);
$template_path
=
$this
->
getPluginPath
()
.
'/templates'
;
$template_factory
=
new
Flexi_TemplateFactory
(
$template_path
);
$template
=
$template_factory
->
open
(
'schedule'
);
$layout
=
$GLOBALS
[
'template_factory'
]
->
open
(
'layouts/base'
);
$template
->
set_layout
(
$layout
);
$template
->
set_attribute
(
'really'
,
Request
::
option
(
'really'
));
$template
->
set_attribute
(
'semester_id'
,
Request
::
option
(
'semester_id'
));
echo
$template
->
render
();
}
}
This diff is collapsed.
Click to expand it.
README.md
+
4
−
2
View file @
74dfb6c0
studip-availability-schedule
============================
Stud.IP Verfügbarkeitsplan
==========================
Setzt spezielle Anpassungen voraus, die momentan nur an der Universität Osnabrück verfügbar sind.
This diff is collapsed.
Click to expand it.
plugin.manifest
0 → 100755
+
5
−
0
View file @
74dfb6c0
pluginclassname=AvailSchedule
pluginname=AvailabilitySchedule
origin=elan-ev
version=0.1.1
studipMinVersion=2.4
This diff is collapsed.
Click to expand it.
templates/schedule.php
0 → 100755
+
58
−
0
View file @
74dfb6c0
<?php
/*
teilnehmer_conflicts.php - Verfgbarkeitsanzeige der Teilnehmer eines Seminares
Copyright (C) 2005-2013 Marco Diedrich <marco.diedrich@uni-osnabrueck.de>, Till Glggler <till.gloeggler@uni-osnabrueck.de>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
?>
<table
border=
"0"
cellspacing=
"0"
cellpadding=
"0"
width=
"100%"
>
<tr>
<td
class=
"blank"
align=
"center"
>
<br/>
<?
$semester
=
new
SemesterData
();
$all_semester
=
$semester
->
getAllSemesterData
();
if
(
!
$really
)
{
?>
<b>
Sie k
ö
nnen sich einen sogenannten Verf
ü
gbarkeitsplan anzeigen lassen.
<br/>
Es handelt sich dabei um eine Wochen
ü
bersicht, worauf sie erkennen k
ö
nnen
wieviele ihrer Teilnehmer zu den jeweiligen Zeiten andere Veranstaltungen belegen.
<br/>
<br/>
Klicken Sie auf ein Semester, um sich daf
ü
r diesen Verf
ü
gbarkeitsplan anzeigen zu lassen:
<br/>
<?
foreach
(
$all_semester
as
$key
=>
$val
)
{
if
(
$val
[
'ende'
]
>=
time
())
{
echo
'<a href="'
.
URLHelper
::
getLink
(
'?really=yes&semester_id='
.
$key
)
.
'">'
.
$val
[
'name'
]
.
'</a>'
;
echo
' | '
;
}
}
?>
</b><br/>
<br/>
<?
}
else
{
flush
();
$plan
=
createPlanData
(
Request
::
get
(
'cid'
),
$all_semester
[
$semester_id
][
'beginn'
]);
printTable
(
$plan
,
$all_semester
[
$semester_id
][
'name'
]);
flush
();
echo
"<br/><br/>"
;
printList
(
$plan
);
}
?>
<br/>
</td>
</tr>
</table>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment