For OdooExtensions

Merge branch 'master' of https://github.com/FH-Complete/FHC-Core
This commit is contained in:
Paminger
2015-04-16 10:33:56 +02:00
58 changed files with 10304 additions and 5232 deletions
+1 -4
View File
@@ -1,7 +1,4 @@
.htaccess
/nbproject/
/.idea/
documents/dms/5501ab0195d74.pdf
documents/dms/5501abcc7300b.pdf
documents/dms/5501b6ed6b073.jpg
documents/dms/5501d1a12fa02.jpg
documents/
+675
View File
@@ -0,0 +1,675 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
{one line to give the program's name and a brief idea of what it does.}
Copyright (C) {year} {name of author}
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 3 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, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
{project} Copyright (C) {year} {fullname}
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
+4 -1
View File
@@ -533,8 +533,10 @@ $refreshtime = ($sdtools?99999:(isset($_SESSION[constSESSIONNAME]["uid"]) && !em
else
{
// Lageplan
if(defined('CIS_INFOSCREEN_LAGEPLAN_ANZEIGEN') && CIS_INFOSCREEN_LAGEPLAN_ANZEIGEN)
{
echo '
<tr class="cursor_hand">
<tr class="cursor_hand">
<td>
<a href="'.htmlspecialchars($_SERVER['PHP_SELF']).'?work=lageplan&amp;standort_id='.$standort_id.'">
<span class="blau_mitteText">
@@ -543,6 +545,7 @@ $refreshtime = ($sdtools?99999:(isset($_SESSION[constSESSIONNAME]["uid"]) && !em
</a>
</td>
</tr>';
}
}
echo '<tr><td>&nbsp;</td></tr>';
@@ -1021,41 +1021,48 @@ echo "
else
$hide = "style='display:block;visibility:visible;'";
echo "<td valign='bottom' nowrap>
<form name='$row_stud->uid' id='$row_stud->uid' method='POST' action='".$_SERVER['PHP_SELF']."?lvid=$lvid&lehreinheit_id=$lehreinheit_id&stsem=$stsem'>
<span id='lvnoteneingabe_".$row_stud->uid."' ".$hide.">
<input type='hidden' name='student_uid' value='$row_stud->uid'>";
// Punkte
if(CIS_GESAMTNOTE_PUNKTE)
if(!defined('CIS_GESAMTNOTE_UEBERSCHREIBEN') || CIS_GESAMTNOTE_UEBERSCHREIBEN || (!CIS_GESAMTNOTE_UEBERSCHREIBEN && is_null($znote)))
{
//$punkte_lv = $punkte_vorschlag;
echo '<input type="text" name="punkte" id="textbox-punkte-'.$i.'" value="'.$punkte_vorschlag.'" size="3" oninput="PunkteEingabe('.$i.')"/>';
}
echo "<td valign='bottom' nowrap>
<form name='$row_stud->uid' id='$row_stud->uid' method='POST' action='".$_SERVER['PHP_SELF']."?lvid=$lvid&lehreinheit_id=$lehreinheit_id&stsem=$stsem'>
<span id='lvnoteneingabe_".$row_stud->uid."' ".$hide.">
<input type='hidden' name='student_uid' value='$row_stud->uid'>";
// Punkte
if(CIS_GESAMTNOTE_PUNKTE)
{
//$punkte_lv = $punkte_vorschlag;
echo '<input type="text" name="punkte" id="textbox-punkte-'.$i.'" value="'.$punkte_vorschlag.'" size="3" oninput="PunkteEingabe('.$i.')"/>';
}
// Noten DropDown
if($punkte_vorschlag!='' && CIS_GESAMTNOTE_PUNKTE)
$disabled='disabled="disabled"';
else
$disabled='';
echo '<select name="note" id="dropdown-note-'.$i.'" '.$disabled.'>';
echo '<option value="">-- keine Auswahl --</option>';
foreach($noten_obj->result as $row_note)
{
if($row_note->note == $note_vorschlag)
$selected='selected';
// Noten DropDown
if($punkte_vorschlag!='' && CIS_GESAMTNOTE_PUNKTE)
$disabled='disabled="disabled"';
else
$selected='';
$disabled='';
echo '<select name="note" id="dropdown-note-'.$i.'" '.$disabled.'>';
echo '<option value="">-- keine Auswahl --</option>';
foreach($noten_obj->result as $row_note)
{
if($row_note->note == $note_vorschlag)
$selected='selected';
else
$selected='';
if($row_note->lehre && $row_note->aktiv)
echo '<option value="'.$row_note->note.'" '.$selected.'>'.$row_note->bezeichnung.'</option>';
if($row_note->lehre && $row_note->aktiv)
echo '<option value="'.$row_note->note.'" '.$selected.'>'.$row_note->bezeichnung.'</option>';
}
echo '</select>';
echo "
<input type='hidden' name='note_orig' value='$note_lv'>
<input type='button' value='->' onclick=\"saveLVNote('".$row_stud->uid."');\">
</span>
</form></td>";
}
else
{
echo '<td></td>';
}
echo '</select>';
echo "
<input type='hidden' name='note_orig' value='$note_lv'>
<input type='button' value='->' onclick=\"saveLVNote('".$row_stud->uid."');\">
</span>
</form></td>";
if(isset($noten_array[$note_lv]) && $noten_array[$note_lv]['positiv']==false)
$negmarkier = " style='color:red; font-weight:bold;'";
+32 -1
View File
@@ -92,11 +92,42 @@ if (isset($_GET["handbuch"])){
readfile($filename);
exit;
}
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
?><!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="../../../skin/style.css.php" rel="stylesheet" type="text/css">
<link href="../../../skin/jquery.css" rel="stylesheet" type="text/css"/>
<script src="../../../include/js/jquery1.9.min.js" type="text/javascript" ></script>
<?php
// ADDONS laden
$addon_obj = new addon();
$addon_obj->loadAddons();
foreach($addon_obj->result as $addon)
{
if(file_exists('../../../addons/'.$addon->kurzbz.'/cis/init.js.php'))
echo '<script type="application/x-javascript" src="../../../addons/'.$addon->kurzbz.'/cis/init.js.php" ></script>';
}
// Wenn Seite fertig geladen ist Addons aufrufen
echo '
<script>
$( document ).ready(function()
{
if(typeof addon !== \'undefined\')
{
for(i in addon)
{
addon[i].init("cis/private/lehre/lesson.php", {uid:\''.$user.'\',lvid:\''.$lvid.'\',studiensemester_kurzbz:\''.$studiensemester_kurzbz.'\'});
}
}
});
</script>
';
?>
<style type="text/css">
.transparent {
filter:alpha(opacity=90);
+36 -8
View File
@@ -453,9 +453,14 @@ function openDialog(lehrveranstaltung_id, termin_id, lvBezeichnung, terminVon, t
*/
function saveAnmeldung(lehrveranstaltung_id, termin_id)
{
var lehrveranstaltung_id = $("#lehrveranstaltungHidden").val();
var termin_id = $("#terminHidden").val();
var uid = $("#anmeldung_hinzufuegen_uid").val();
if(lehrveranstaltung_id === undefined)
lehrveranstaltung_id = $("#lehrveranstaltungHidden").val();
if(termin_id === undefined)
termin_id = $("#terminHidden").val();
var bemerkungen = $("#anmeldungBemerkung").val();
if(bemerkungen === undefined)
bemerkungen = "von Lektor hinzugefügt";
$.ajax({
dataType: 'json',
@@ -465,7 +470,8 @@ function saveAnmeldung(lehrveranstaltung_id, termin_id)
method: "saveAnmeldung",
termin_id: termin_id,
lehrveranstaltung_id: lehrveranstaltung_id,
bemerkung: bemerkungen
bemerkung: bemerkungen,
uid: uid
},
error: loadError
}).success(function(data){
@@ -480,7 +486,17 @@ function saveAnmeldung(lehrveranstaltung_id, termin_id)
resetForm();
}).complete(function(event, xhr, settings){
$("#saveDialog").dialog("close");
refresh();
if(uid === undefined)
{
//Wenn Anmeldung durch Student
refresh();
}
else
{
//Wenn Anmeldung durch Lektor
showAnmeldungen(termin_id, lehrveranstaltung_id);
}
});
}
@@ -653,6 +669,7 @@ function writeAnmeldungen(data)
var ort_kurzbz = data.result.ort_kurzbz;
var liste = "<ul id='sortable'>";
var count = 0;
var studiensemester = $("#filter_studiensemester option:selected").val();
data.result.anmeldungen.forEach(function(d){
count++;
var vorname = d.student.vorname !== "null" ? d.student.vorname : "";
@@ -683,8 +700,10 @@ function writeAnmeldungen(data)
});
liste += "</ul>";
$("#anmeldung_hinzufuegen").html("<input id='anmeldung_hinzufuegen_uid' type='text' placeholder='StudentIn-UID' /><input type='button' value='hinzufügen' onclick='saveAnmeldung(\""+lehrveranstaltung_id+"\",\""+terminId+"\");'/>");
$("#reihungSpeichernButton").html("<input type='button' value='Reihung speichern' onclick='saveReihung(\""+terminId+"\", \""+lehrveranstaltung_id+"\");'>");
$("#anmeldeDaten").html(liste);
$("#listeDrucken").html("<a href='./pruefungsanmeldungen_liste.php?termin_id="+terminId+"&lehrveranstaltung_id="+lehrveranstaltung_id+"&studiensemester="+studiensemester+"' target='_blank'>Liste drucken</a>");
if(ort_kurzbz !== null)
{
$("#raumLink").html("<span>Prüfungsraum: </span>"+ort_kurzbz);
@@ -829,11 +848,12 @@ function loadStudiengaenge()
$("#stgListe").empty();
if(data.error === 'false')
{
var liste = "";
var liste = "<select id='select_studiengang' onchange='loadPruefungStudiengang();'><option>Studiengang auswählen</option>";
data.result.forEach(function(e){
var kuerzel = e.typ+e.kurzbz
liste += "<li id='stg"+e.studiengang_kz+"'><span class='studiengang'><a href='#' onclick='loadPruefungStudiengang(\""+e.studiengang_kz+"\");'>"+e.bezeichnung+" ("+kuerzel.toUpperCase()+")</a></span></li>";
liste += "<option id='stg"+e.studiengang_kz+"' value='"+e.studiengang_kz+"'>"+e.bezeichnung+" ("+kuerzel.toUpperCase()+")</option>";
});
liste += "</select>";
$("#stgListe").append(liste);
}
else
@@ -848,15 +868,22 @@ function loadStudiengaenge()
* @param {type} studiengang_kz Studiengangskennzahl
* @returns {undefined}
*/
function loadPruefungStudiengang(studiengang_kz)
function loadPruefungStudiengang(studiengang_kz, studiensemester)
{
if(studiengang_kz === undefined)
studiengang_kz = $("#select_studiengang option:selected").val();
if(studiensemester === undefined)
studiensemester = $("#filter_studiensemester option:selected").val();
$.ajax({
dataType: 'json',
url: "./pruefungsanmeldung.json.php",
type: "POST",
data: {
method: "getPruefungenStudiengang",
studiengang_kz: studiengang_kz
studiengang_kz: studiengang_kz,
studiensemester: studiensemester
},
error: loadError
}).success(function(data){
@@ -867,6 +894,7 @@ function loadPruefungStudiengang(studiengang_kz)
{
var liste = "";
data.result.forEach(function(e){
console.log(e);
liste += "<ul><li>"+e.bezeichnung+"<ul>";
e.pruefung[0].termine.forEach(function(d){
liste += "<li> <a onclick='showAnmeldungen(\""+d.pruefungstermin_id+"\", \""+e.lehrveranstaltung_id+"\");'>"+convertDateTime(d.von)+" "+convertDateTime(d.von, "time")+" - "+convertDateTime(d.bis, "time")+"</a></li>";
File diff suppressed because it is too large Load Diff
@@ -32,6 +32,9 @@ require_once('../../../../include/student.class.php');
$uid = get_uid();
//TODO uid entfernen
$uid="p20132443";
$db = new basis_db();
$rechte = new benutzerberechtigung();
$rechte->getBerechtigungen($uid);
@@ -0,0 +1,264 @@
<!DOCTYPE html>
<?php
/*
* Copyright 2014 fhcomplete.org
*
* 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., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*
*
* Authors: Stefan Puraner <puraner@technikum-wien.at>
*/
require_once('../../../../config/cis.config.inc.php');
require_once('../../../../include/functions.inc.php');
require_once('../../../../include/benutzerberechtigung.class.php');
require_once('../../../../include/pruefungsanmeldung.class.php');
require_once('../../../../include/pruefungCis.class.php');
require_once('../../../../include/pruefungstermin.class.php');
require_once('../../../../include/studiensemester.class.php');
require_once('../../../../include/lehrveranstaltung.class.php');
require_once('../../../../include/mitarbeiter.class.php');
require_once('../../../../include/student.class.php');
require_once('../../../../include/datum.class.php');
$uid = get_uid();
$rechte = new benutzerberechtigung();
$rechte->getBerechtigungen($uid);
?>
<html moznomarginboxes="">
<head>
<meta charset="UTF-8">
<script src="../../../../include/js/jquery1.9.min.js"></script>
<style type="text/css">
body {
margin: 0;
padding: 0;
}
* {
box-sizing: border-box;
-moz-box-sizing: border-box;
}
#page {
width: 210mm;
min-height: 297mm;
padding: 20mm;
margin: 10mm auto;
border: 1px #D3D3D3 solid;
border-radius: 5px;
background: white;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
font-family: Arial, Helvetica;
}
#subpage {
padding: 10mm;
border: 1px black solid;
height: 256mm;
outline: 20mm
}
#liste {
border: 1px solid black;
border-collapse: collapse;
width: 100%;
margin-top: 5mm;
font-size: 11pt;
}
h1 {
text-align: center;
}
.bold {
font-weight: bold;
}
td {
border: 1px solid black;
padding: 1mm;
}
th {
border: 1px solid black;
}
thead > tr {
background-color: white !important;
}
tr:nth-child(odd){
background-color: lightgrey;
}
span {
line-height: 16pt;
font-size: 12pt;
}
@page {
size: A4;
margin: 0;
}
@media print {
html, body {
width: 210mm;
height: 250mm;
}
#page {
margin: 0;
border: initial;
border-radius: initial;
width: initial;
min-height: initial;
box-shadow: initial;
background: initial;
page-break-after: auto;
}
/*
* Workaround um beim Drucken jede zweite Zeile der Tabelle
* grau darzustellen. Standardmäßig werden von Browsern keine
* Hintergrundfarben gedruckt.
*/
tr:nth-child(odd) > td{
box-shadow: inset 0 0 0 1000px lightgrey;
}
//Veranlasst Chrome Hintergrundfarben zu drucken
body{
-webkit-print-color-adjust:exact;
background-color: #FFFFFF;
margin: 0;
}
//Anweisungen nur für Firefox
@-moz-document url-prefix() {
html, body {
height: 280mm;
}
}
@-moz-document url-prefix() {
#page {
padding: 15mm 25mm 25mm 15mm !important;
}
}
}
</style>
</head>
<body>
<script>
$(document).ready(function(){
window.print();
});
</script>
<div id="page">
<div id="subpage">
<h1>Anmeldungsliste</h1>
<?php
if(empty($pruefung->result) && !$rechte->isBerechtigt('lehre/pruefungsanmeldungAdmin'))
die('Sie haben keine Berechtigung für diese Seite');
$termin_id = filter_input(INPUT_GET,"termin_id");
$lehrveranstaltung_id = filter_input(INPUT_GET,"lehrveranstaltung_id");
$studiensemester = filter_input(INPUT_GET, "studiensemester");
if(is_null($lehrveranstaltung_id))
{
die('Fehlender Parameter lehrveranstaltung_id');
}
else if(is_null($termin_id))
{
die('Fehlender Parameter termin_id');
}
else if(is_null($studiensemester))
{
die('Fehlender Parameter studiensemester');
}
else
{
$datum = new datum();
$stdsem = new studiensemester($studiensemester);
$pruefungsanmeldung = new pruefungsanmeldung();
$anmeldungen = $pruefungsanmeldung->getAnmeldungenByTermin($termin_id, $lehrveranstaltung_id, $studiensemester, "bestaetigt");
$lehrveranstaltung = new lehrveranstaltung($lehrveranstaltung_id);
$einzeln = FALSE;
if(!empty($anmeldungen))
{
$pruefung = new pruefungCis($anmeldungen[0]->pruefung_id);
$pruefungstermin = new pruefungstermin($anmeldungen[0]->pruefungstermin_id);
$mitarbeiter = new mitarbeiter($pruefung->mitarbeiter_uid);
if($pruefung->einzeln)
{
$einzeln = TRUE;
$pruefungsintervall = $pruefung->pruefungsintervall;
}
}
?>
<span class="bold">Lehrveranstaltung: </span><span><?=$lehrveranstaltung->bezeichnung?></span><br/>
<span class="bold">Studiensemester: </span><span><?=$stdsem->bezeichnung?></span><br/>
<span class="bold">Prüfer: </span><span><?=$mitarbeiter->getFullName(FALSE)?></span><br/>
<table id="liste">
<thead>
<tr>
<th>#</th>
<th>Vorname</th>
<th>Nachname</th>
<th>Matrikelnummer</th>
<th>Datum</th>
</tr>
</thead>
<tbody>
<?php
$count = 0;
/*@var $anmeldung pruefungsanmeldung */
foreach($anmeldungen as $anmeldung)
{
$student = new student($anmeldung->uid);
$prfTermin = new pruefungstermin($anmeldung->pruefungstermin_id);
if($einzeln)
{
$date = $datum->formatDatum($prfTermin->von, "Y-m-d H:i:s");
$date = strtotime($date);
$date = $date+(60*$pruefungsintervall*($count));
$date = $datum->formatDatum($prfTermin->von,"d.m.Y").' - '.date("h:i",$date);
$count++;
}
else
{
$date = $datum->formatDatum($prfTermin->von,"d.m.Y - H:i");
}
echo '<tr>';
echo '<td>'.$anmeldung->reihung.'</td>';
echo '<td>'.$student->vorname.'</td>';
echo '<td>'.$student->nachname.'</td>';
echo '<td>'.$student->matrikelnr.'</td>';
echo '<td>'.$date.'</td>';
echo '</tr>';
}
?>
</tbody>
<?php
}
?>
</table>
</div>
</div>
</body>
</html>
@@ -1,269 +1,306 @@
<!DOCTYPE html>
<?php
/*
* Copyright 2014 fhcomplete.org
*
* 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., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*
*
* Authors: Stefan Puraner <puraner@technikum-wien.at>
*/
require_once('../../../../config/cis.config.inc.php');
require_once('../../../../include/functions.inc.php');
require_once('../../../../include/benutzerberechtigung.class.php');
require_once('../../../../include/pruefungCis.class.php');
require_once('../../../../include/studiensemester.class.php');
$uid = get_uid();
$db = new basis_db();
$rechte = new benutzerberechtigung();
$rechte->getBerechtigungen($uid);
$studiensemester = new studiensemester();
$pruefung = new pruefungCis();
$pruefung->getPruefungByMitarbeiter($uid, $studiensemester->getaktorNext());
if(empty($pruefung->result) && !$rechte->isBerechtigt('lehre/pruefungsanmeldungAdmin'))
die('Sie haben keine Berechtigung für diese Seite');
?>
<html>
<head>
<meta charset="UTF-8">
<title>Prüfungsanmeldung Verwaltung</title>
<script src="../../../../include/js/datecheck.js"></script>
<script src="../../../../include/js/jquery1.9.min.js"></script>
<script src="../../../../include/js/jquery.tablesorter.min.js"></script>
<script src="./pruefung.js"></script>
<link rel="stylesheet" href="../../../../skin/jquery-ui-1.9.2.custom.min.css">
<link rel="stylesheet" href="../../../../skin/fhcomplete.css">
<link rel="stylesheet" href="../../../../skin/style.css.php">
<link rel="stylesheet" href="../../../../skin/tablesort.css">
<link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
<style type="text/css">
body {
padding: 10px 0 0 10px;
}
#stgWrapper {
position: absolute;
height: 80%;
width: 450px;
padding: 1.8em 1.5em 1.8em 1em;
border-radius: 25px;
/*border: 1px solid black;*/
box-shadow: 0em 0em 2em 0.5em #888888 inset;
}
#studiengaenge {
/*border: 1px solid black;*/
width: 94%;
position: relative;
float: left;
padding: 0 1em 0em 1em;
height: 100%;
overflow: auto;
overflow-x: hidden;
}
#prfWrapper {
position: absolute;
height: 80%;
width: 200px;
left: 510px;
padding: 1.8em 1.5em 1.8em 1em;
border-radius: 25px;
/*border: 1px solid black;*/
box-shadow: 0em 0em 2em 0.5em #888888 inset;
}
#pruefungen {
/*border: 1px solid black;*/
width: 94%;
position: relative;
float: left;
padding: 0 1em 0em 1em;
height: 100%;
overflow: auto;
overflow-x: hidden;
}
#anmWrapper {
position: absolute;
/*top: 45px;*/
left: 760px;
width: 400px;
height: 80%;
padding: 1.8em 1.5em 1.8em 1em;
border-radius: 25px;
/*border: 1px solid black;*/
box-shadow: 0em 0em 2em 0.5em #888888 inset;
}
#anmeldungen {
height: 100%;
overflow: auto;
overflow-x: hidden;
}
#anmeldungen > * {
padding: 0.5em;
}
#raum > * {
margin-bottom: 0.5em;
}
#message {
position: fixed;
bottom: 0px;
width: 100%;
height: 2em;
font-size: 1.5em;
font-weight: bold;
}
#sortable {
list-style-type: none;
margin: 0;
padding: 0;
width: 100%;
}
#sortable li {
margin: 0 3px 3px 3px;
padding: 0.2em 0.4em 0.4em;
padding-left: 1.5em;
font-size: 1.4em;
height: 18px;
list-style-image: none;
display: block;
}
#sortable li span {
/*position: absolute;*/
margin-left: -1.3em;
float:left;
}
.resultOK {
color: green;
}
.resultNotOK {
color: red;
}
#sortable li a {
float: left;
}
#sortable li div {
float: right;
margin-left: 5px;
font-size: 0.8em;
}
.anmerkungInfo {
text-align: right;
width: 10%;
}
#progressbar {
position: fixed;
width: 300px;
top: 30%;
left: 50%;
margin-left: -150px;
z-index: 100;
background: '#9CFF29';
}
.modalOverlay {
position: fixed;
width: 100%;
height: 100%;
top: 0px;
left: 0px;
background-color: rgba(0,0,0,0.3); /* black semi-transparent */
}
.studiengang {
font-size: 1em;
font-weight: bold;
}
</style>
</head>
<body>
<script>
$(document).ready(function(){
loadStudiengaenge();
$("#raumDialog").dialog({
modal: true,
autoOpen: false,
width: "400px"
});
});
</script>
<h1>Anmeldungen Verwalten</h1>
<div id='stgWrapper'>
<div id='studiengaenge'>
<h2>Studiengänge</h2>
<ul id='stgListe'>
</ul>
</div>
</div>
<div id='prfWrapper'>
<div id='pruefungen'>
<h2>Prüfungen</h2>
<ul id="pruefungenListe">
</ul>
</div>
</div>
<div id='anmWrapper'>
<div id="anmeldungen">
<h2>Anmeldungen</h2>
<div id="anmeldeDaten">
</div>
<div id="reihungSpeichernButton">
</div>
<div id="kommentar">
</div>
<div id="kommentarSpeichernButton">
</div>
<div id="raumLink">
</div>
<div id="raumDialog">
<div id="raum">
</div>
<div id="raumSpeichernButton">
</div>
</div>
</div>
</div>
<div id="message"></div>
<div id="progressbar"></div>
</body>
</html>
<!DOCTYPE html>
<?php
/*
* Copyright 2014 fhcomplete.org
*
* 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., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*
*
* Authors: Stefan Puraner <puraner@technikum-wien.at>
*/
require_once('../../../../config/cis.config.inc.php');
require_once('../../../../include/functions.inc.php');
require_once('../../../../include/benutzerberechtigung.class.php');
require_once('../../../../include/pruefungCis.class.php');
require_once('../../../../include/studiensemester.class.php');
$uid = get_uid();
$db = new basis_db();
$rechte = new benutzerberechtigung();
$rechte->getBerechtigungen($uid);
$studiensemester = new studiensemester();
$pruefung = new pruefungCis();
$pruefung->getPruefungByMitarbeiter($uid, $studiensemester->getaktorNext());
if(empty($pruefung->result) && !$rechte->isBerechtigt('lehre/pruefungsanmeldungAdmin'))
die('Sie haben keine Berechtigung für diese Seite');
?>
<html>
<head>
<meta charset="UTF-8">
<title>Prüfungsanmeldung Verwaltung</title>
<script src="../../../../include/js/datecheck.js"></script>
<script src="../../../../include/js/jquery1.9.min.js"></script>
<script src="../../../../include/js/jquery.tablesorter.min.js"></script>
<script src="./pruefung.js"></script>
<link rel="stylesheet" href="../../../../skin/jquery-ui-1.9.2.custom.min.css">
<link rel="stylesheet" href="../../../../skin/fhcomplete.css">
<link rel="stylesheet" href="../../../../skin/style.css.php">
<link rel="stylesheet" href="../../../../skin/tablesort.css">
<link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
<style type="text/css">
body {
padding: 10px 0 0 10px;
}
#stgWrapper {
position: absolute;
height: 70px;
width: 850px;
padding: 1.8em 1.5em 1.8em 1em;
border-radius: 25px;
/*border: 1px solid black;*/
box-shadow: 0em 0em 2em 0.5em #888888 inset;
}
#studiengaenge {
/*border: 1px solid black;*/
width: 94%;
position: relative;
float: left;
padding: 0 1em 0em 1em;
height: 100%;
overflow: auto;
overflow-x: hidden;
}
#prfWrapper {
position: absolute;
height: 70%;
width: 300px;
top: 180px;
padding: 1.8em 1.5em 1.8em 1em;
border-radius: 25px;
/*border: 1px solid black;*/
box-shadow: 0em 0em 2em 0.5em #888888 inset;
}
#pruefungen {
/*border: 1px solid black;*/
width: 94%;
position: relative;
float: left;
padding: 0 1em 0em 1em;
height: 100%;
overflow: auto;
overflow-x: hidden;
}
#anmWrapper {
position: absolute;
/*top: 45px;*/
left: 350px;
top: 180px;
width: 500px;
height: 70%;
padding: 1.8em 1.5em 1.8em 1em;
border-radius: 25px;
/*border: 1px solid black;*/
box-shadow: 0em 0em 2em 0.5em #888888 inset;
}
#anmeldungen {
height: 100%;
overflow: auto;
overflow-x: hidden;
}
#anmeldungen > * {
padding: 0.5em;
}
#raum > * {
margin-bottom: 0.5em;
}
#message {
position: fixed;
bottom: 0px;
width: 100%;
height: 2em;
font-size: 1.5em;
font-weight: bold;
}
#sortable {
list-style-type: none;
margin: 0;
padding: 0;
width: 100%;
}
#sortable li {
margin: 0 3px 3px 3px;
padding: 0.2em 0.4em 0.4em;
padding-left: 1.5em;
font-size: 1.4em;
height: 18px;
list-style-image: none;
display: block;
}
#sortable li span {
/*position: absolute;*/
margin-left: -1.3em;
float:left;
}
.resultOK {
color: green;
}
.resultNotOK {
color: red;
}
#sortable li a {
float: left;
}
#sortable li div {
float: right;
margin-left: 5px;
font-size: 0.8em;
}
.anmerkungInfo {
text-align: right;
width: 10%;
}
#progressbar {
position: fixed;
width: 300px;
top: 30%;
left: 50%;
margin-left: -150px;
z-index: 100;
background: '#9CFF29';
}
.modalOverlay {
position: fixed;
width: 100%;
height: 100%;
top: 0px;
left: 0px;
background-color: rgba(0,0,0,0.3); /* black semi-transparent */
}
.studiengang {
font-size: 1em;
font-weight: bold;
}
#studiengaenge > div {
float: left;
width: 50%;
}
</style>
</head>
<body>
<script>
$(document).ready(function(){
loadStudiengaenge();
$("#filter_studiensemester").css("visibility","visible");
console.log($("#filter_studiensemester"));
$("#raumDialog").dialog({
modal: true,
autoOpen: false,
width: "400px"
});
});
</script>
<h1>Anmeldungen Verwalten</h1>
<div id='stgWrapper'>
<div id='studiengaenge'>
<div>
<h2>Studiengänge</h2>
<div id='stgListe'>
</div>
</div>
<div>
<h2>Studiensemester</h2>
<?php
echo '<select id="filter_studiensemester" onchange="loadPruefungStudiengang();" style="visibility: hidden;">';
$aktuellesSemester = $studiensemester->getaktorNext();
$studiensemester->getAll();
foreach($studiensemester->studiensemester as $sem)
{
/*@var $sem studiensemester */
if($aktuellesSemester == $sem->studiensemester_kurzbz)
{
echo '<option selected value="'.$sem->studiensemester_kurzbz.'">'.$sem->bezeichnung.'</option>';
}
else
{
echo '<option value="'.$sem->studiensemester_kurzbz.'">'.$sem->bezeichnung.'</option>';
}
}
echo '</select></p>';
?>
</div>
</div>
</div>
<div id='prfWrapper'>
<div id='pruefungen'>
<h2>Prüfungen</h2>
<ul id="pruefungenListe">
</ul>
</div>
</div>
<div id='anmWrapper'>
<div id="anmeldungen">
<h2>Anmeldungen</h2>
<div id="anmeldung_hinzufuegen">
</div>
<div id="anmeldeDaten">
</div>
<div id="reihungSpeichernButton">
</div>
<div id="kommentar">
</div>
<div id="kommentarSpeichernButton">
</div>
<div id="raumLink">
</div>
<div id="listeDrucken">
</div>
<div id="raumDialog">
<div id="raum">
</div>
<div id="raumSpeichernButton">
</div>
</div>
</div>
</div>
<div id="message"></div>
<div id="progressbar"></div>
</body>
</html>
File diff suppressed because it is too large Load Diff
+221 -49
View File
@@ -33,6 +33,7 @@ require_once('../../include/akte.class.php');
require_once('../../include/konto.class.php');
require_once('../../include/benutzer.class.php');
require_once('../../include/vorlage.class.php');
require_once('../../include/addon.class.php');
if (!$db = new basis_db())
die('Fehler beim Oeffnen der Datenbankverbindung');
@@ -89,31 +90,34 @@ if(isset($_GET['abschlusspruefung_id']))
$params.='&abschlusspruefung_id='.$_GET['abschlusspruefung_id'];
if(isset($_GET['typ']))
$params.='&typ='.$_GET['typ'];
if(isset($_GET['output']))
$output=$_GET['output'];
else
$output='pdf';
$konto = new konto();
if (($user == $_GET["uid"]) || $rechte->isBerechtigt('admin'))
{
if($xsl=='Inskription' && (!$konto->checkStudienbeitrag($user, $_GET["ss"])))
die('Der Studienbeitrag wurde noch nicht bezahlt');
if(($xsl=='Inskription' || $xsl == 'Studienblatt') && (!$konto->checkStudienbeitrag($user, $_GET["ss"])))
die('Der Studienbeitrag wurde noch nicht bezahlt');
if(isset($_GET['buchungsnummern']))
{
//Beim Drucken von Buchungsbestaetigungen pruefen ob diese Buchungen auch zu diesem Benutzer gehoeren
$buchungsnr = explode(';',$_GET['buchungsnummern']);
$user_obj = new benutzer();
$user_obj->load($user);
foreach($buchungsnr as $bnr)
//Beim Drucken von Buchungsbestaetigungen pruefen ob diese Buchungen auch zu diesem Benutzer gehoeren
$buchungsnr = explode(';',$_GET['buchungsnummern']);
$user_obj = new benutzer();
$user_obj->load($user);
foreach($buchungsnr as $bnr)
{
if($bnr!='')
{
if($bnr!='')
{
$konto->load($bnr);
if($konto->person_id!=$user_obj->person_id)
die('Sie haben keine Berechtigung fuer diese Buchung');
if($konto->getDifferenz($bnr)!=0)
die('Diese Zahlung wurde noch nicht beglichen');
}
$konto->load($bnr);
if($konto->person_id!=$user_obj->person_id)
die('Sie haben keine Berechtigung fuer diese Buchung');
if($konto->getDifferenz($bnr)!=0)
die('Diese Zahlung wurde noch nicht beglichen');
}
}
}
$xml_url=XML_ROOT.$xml.$params;
//echo $xml_url;
@@ -134,49 +138,217 @@ if (($user == $_GET["uid"]) || $rechte->isBerechtigt('admin'))
{
if($xsl_stg_kz=='')
$xsl_stg_kz='0';
$vorlage->getAktuelleVorlage($xsl_stg_kz, $xsl, $version);
}
// Load the XSL source
$xsl_doc = new DOMDocument;
if(!$xsl_doc->loadXML($vorlage->text))
die('unable to load xsl');
// Configure the transformer
$proc = new XSLTProcessor;
$proc->importStyleSheet($xsl_doc); // attach the xsl rules
$buffer = $proc->transformToXml($xml_doc);
//in $buffer steht nun das xsl-fo file mit den daten
$buffer = '<?xml version="1.0" encoding="utf-8" ?>'.substr($buffer, strpos($buffer,"\n"),strlen($buffer));
//Pdf erstellen
$fo2pdf = new XslFo2Pdf();
//wenn uid gefunden wird, dann den Nachnamen zum Dateinamen dazuhaengen
$nachname='';
if(mb_strstr($vorlage->mimetype, 'application/vnd.oasis.opendocument'))
{
switch($vorlage->mimetype)
{
case 'application/vnd.oasis.opendocument.text':
$endung = 'odt';
break;
case 'application/vnd.oasis.opendocument.spreadsheet':
$endung = 'ods';
break;
default:
$endung = 'pdf';
}
// Load the XSL source
$xsl_doc = new DOMDocument;
if(!$xsl_doc->loadXML($vorlage->text))
die('unable to load xsl');
// Configure the transformer
$proc = new XSLTProcessor;
$proc->importStyleSheet($xsl_doc); // attach the xsl rules
$buffer = $proc->transformToXml($xml_doc);
//echo $buffer;
//exit;
$tempfolder = '/tmp/'.uniqid();
mkdir($tempfolder);
chdir($tempfolder);
file_put_contents('content.xml', $buffer);
// Wenn ein Style XSL uebergeben wurde wird ein zweites XML File erstellt mit den
// Styleanweisungen und ebenfalls zum Zip hinzugefuegt
if(isset($_GET['style_xsl']))
{
$style_xsl=$_GET['style_xsl'];
$style_vorlage = new vorlage();
$style_vorlage->getAktuelleVorlage($xsl_stg_kz, $style_xsl, $version);
$style_xsl_doc = new DOMDocument;
if(!$style_xsl_doc->loadXML($style_vorlage->text))
die('unable to load xsl');
// Configure the transformer
$style_proc = new XSLTProcessor;
$style_proc->importStyleSheet($style_xsl_doc); // attach the xsl rules
$stylebuffer = $style_proc->transformToXml($xml_doc);
file_put_contents('styles.xml', $stylebuffer);
}
$vorlage_found=false;
$addons = new addon();
foreach($addons->aktive_addons as $addon)
{
$zipfile = DOC_ROOT.'addons/'.$addon.'/system/vorlage_zip/'.$vorlage->vorlage_kurzbz.'.'.$endung;
if(file_exists($zipfile))
{
$vorlage_found=true;
break;
}
}
if(!$vorlage_found)
$zipfile = DOC_ROOT.'system/vorlage_zip/'.$vorlage->vorlage_kurzbz.'.'.$endung;
$tempname_zip = 'out.zip';
if(copy($zipfile, $tempname_zip))
{
exec("zip $tempname_zip content.xml");
if(isset($_GET['style_xsl']))
exec("zip $tempname_zip styles.xml");
clearstatcache();
if($vorlage->bezeichnung!='')
$filename = $vorlage->bezeichnung;
else
$filename = $vorlage->vorlage_kurzbz;
if($output == 'pdf')
{
if($xsl == 'LV_Informationen')
{
$studiengang = new studiengang($_GET['stg_kz']);
$studiensemester = new studiensemester($_GET['ss']);
$tempPdfName = $vorlage->vorlage_kurzbz.'_'.$studiengang->kurzbzlang.'_'.$studiensemester->studiensemester_kurzbz.'.pdf';
$filename = $filename.'_'.$studiengang->kurzbzlang.'_'.$studiensemester->studiensemester_kurzbz.'.pdf';
}
elseif($xsl == "Honorarvertrag")
{
$tempPdfName = $vorlage->vorlage_kurzbz.'_'.$benutzer_obj->nachname.'_'.$benutzer_obj->vorname.'.pdf';
$filename = $filename.'_'.$benutzer_obj->nachname.'_'.$benutzer_obj->vorname.'.pdf';
}
elseif($xsl == "Studienordnung")
{
$studienordnung = new studienordnung();
$studienordnung->loadStudienordnung($_GET['studienordnung_id']);
$filename = $filename.'_'.$studienordnung->studiengangkurzbzlang.'.pdf';
$tempPdfName = $vorlage->vorlage_kurzbz.'.pdf';
}
else
{
$tempPdfName = $vorlage->vorlage_kurzbz.'.pdf';
$filename = $filename.'.pdf';
}
exec("unoconv -e IsSkipEmptyPages=false --stdout -f pdf $tempname_zip > $tempPdfName");
$fsize = filesize($tempPdfName);
$handle = fopen($tempPdfName,'r');
header('Content-type: application/pdf');
header('Content-Disposition: attachment; filename="'.$filename.'"');
header('Content-Length: '.$fsize);
}
else if($output =='odt')
{
if($xsl == "Studienordnung")
{
$studienordnung = new studienordnung();
$studienordnung->loadStudienordnung($_GET['studienordnung_id']);
$filename = $filename.'_'.$studienordnung->studiengangkurzbzlang;
}
$fsize = filesize($tempname_zip);
$handle = fopen($tempname_zip,'r');
header('Content-type: '.$vorlage->mimetype);
header('Content-Disposition: attachment; filename="'.$filename.'.'.$endung.'"');
header('Content-Length: '.$fsize);
}
else if($output =='doc')
{
$tempPdfName = $vorlage->vorlage_kurzbz.'.doc';
if($xsl == "Studienordnung")
{
$studienordnung = new studienordnung();
$studienordnung->loadStudienordnung($_GET['studienordnung_id']);
$filename = $filename.'_'.$studienordnung->studiengangkurzbzlang.'.doc';
}
else
{
$filename = $filename.'.doc';
}
exec("unoconv -e IsSkipEmptyPages=false --stdout -f doc $tempname_zip > $tempPdfName");
$fsize = filesize($tempPdfName);
$handle = fopen($tempPdfName,'r');
header('Content-type: application/vnd.ms-word');
header('Content-Disposition: attachment; filename="'.$filename.'"');
header('Content-Length: '.$fsize);
}
while (!feof($handle))
{
echo fread($handle, 8192);
}
fclose($handle);
unlink('content.xml');
if(isset($_GET['style_xsl']))
unlink('styles.xml');
unlink($tempname_zip);
if($output=='pdf' || $output=='doc')
unlink($filename);
rmdir($tempfolder);
}
}
else
{
// Load the XSL source
$xsl_doc = new DOMDocument;
if(!$xsl_doc->loadXML($vorlage->text))
die('unable to load xsl');
// Configure the transformer
$proc = new XSLTProcessor;
$proc->importStyleSheet($xsl_doc); // attach the xsl rules
$buffer = $proc->transformToXml($xml_doc);
//in $buffer steht nun das xsl-fo file mit den daten
$buffer = '<?xml version="1.0" encoding="utf-8" ?>'.substr($buffer, strpos($buffer,"\n"),strlen($buffer));
//Pdf erstellen
$fo2pdf = new XslFo2Pdf();
//wenn uid gefunden wird, dann den Nachnamen zum Dateinamen dazuhaengen
$nachname='';
if(isset($_GET['uid']) && $_GET['uid']!='')
{
if(isset($_GET['uid']) && $_GET['uid']!='')
{
$uid = str_replace(';','',$_GET['uid']);
$qry = "SELECT nachname FROM campus.vw_benutzer WHERE uid=".$db->db_add_param($uid);
if($result = $db->db_query($qry))
{
if($row = $db->db_fetch_object($result))
{
$nachname = '_'.$row->nachname;
}
if($row = $db->db_fetch_object($result))
{
$nachname = '_'.$row->nachname;
}
}
}
$filename=$xsl.$nachname;
if (!$fo2pdf->generatePdf($buffer, $filename, "D"))
{
}
$filename=$xsl.$nachname;
if (!$fo2pdf->generatePdf($buffer, $filename, "D"))
{
echo('Failed to generate PDF');
}
}
}
else
+14
View File
@@ -135,6 +135,7 @@ echo $p->t('global/studiensemester')."</b> <SELECT name='stsem' onChange=\"MM_ju
echo "</SELECT><br />";
$konto = new konto();
if ($konto->checkStudienbeitrag($uid, $stsem))
{
echo "<a href='../pdfExport.php?xsl=Inskription&xml=student.rdf.php&ss=".$stsem."&uid=".$uid."&xsl_stg_kz=".$xsl_stg_kz."'>".$p->t('tools/inskriptionsbestaetigung')."</a>";
@@ -145,6 +146,19 @@ else
echo "<hr>";
if(defined('CIS_DOKUMENTE_STUDIENBUCHLBATT_DRUCKEN') && CIS_DOKUMENTE_STUDIENBUCHLBATT_DRUCKEN)
{
if ($konto->checkStudienbeitrag($uid, $stsem))
{
echo "<a href='../pdfExport.php?xsl=Studienblatt&xml=studienblatt.xml.php&ss=".$stsem."&uid=".$uid."'>".$p->t('tools/studienbuchblatt')."</a>";
echo ' - '.$p->t('tools/studienbeitragFuerSSBezahltAmDatum',array($stsem, $konto->buchungsdatum));
}
else
echo $p->t('tools/studienbuchblatt')." - ".$p->t('tools/studienbeitragFuerSSNochNichtBezahlt',array($stsem));
echo "<hr>";
}
echo "<a href='studienerfolgsbestaetigung.php' class='Item'>".$p->t('tools/studienerfolgsbestaetigung')." Deutsch</a><br>";
echo "<a href='studienerfolgsbestaetigung.php?lang=en' class='Item'>".$p->t('tools/studienerfolgsbestaetigung')." Englisch</a>";
echo "<hr><br>";
-250
View File
@@ -1,250 +0,0 @@
<?php
/* Copyright (C) 2006 Technikum-Wien
*
* 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.
*
* Authors: Christian Paminger <christian.paminger@technikum-wien.at>,
* Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at>,
* Rudolf Hangl <rudolf.hangl@technikum-wien.at>,
* Karl Burkhart <burkhart@technikum-wien.at>.
*/
// Oberflaeche zur Aenderung von Beispielen und Upload von Bildern
require_once('../../config/cis.config.inc.php');
require_once('../../include/functions.inc.php');
require_once('../../include/person.class.php');
require_once('../../include/benutzerberechtigung.class.php');
require_once('../../include/akte.class.php');
require_once('../../include/dokument.class.php');
require_once('../../include/mail.class.php');
require_once('../../include/phrasen.class.php');
require_once('../../include/dms.class.php');
header("Content-Type: text/html; charset=utf-8");
session_cache_limiter('none'); //muss gesetzt werden sonst funktioniert der Download mit IE8 nicht
session_start();
if (!isset($_SESSION['bewerbung/user']) || $_SESSION['bewerbung/user']=='')
{
header('Location: registration.php?method=allgemein');
exit;
}
if(isset($_GET['lang']))
setSprache($_GET['lang']);
$person_id = isset($_GET['person_id'])?$_GET['person_id']:'';
if(!isset($_SESSION['bewerbung/personId']))
die('Sie haben keine Berechtigung für diese Seite');
if($person_id!=$_SESSION['bewerbung/personId'])
die('Sie haben keine Berechtigung für diese Seite');
$dokumenttyp = (isset($_GET['dokumenttyp']))? $_GET['dokumenttyp'] : '';
$kategorie_kurzbz = isset($_REQUEST['kategorie_kurzbz'])?$_REQUEST['kategorie_kurzbz']:'';
$sprache = getSprache();
$p=new phrasen($sprache);
$PHP_SELF = $_SERVER['PHP_SELF'];
echo "<html>
<head><title>File-Upload</title></head>
<body>";
//Bei Upload des Bildes
if(isset($_POST['submitbild']))
{
$error = false;
// dms Eintrag anlegen
if(isset($_POST['fileupload']))
{
$ext = pathinfo($_FILES['file']['name'], PATHINFO_EXTENSION);
$filename = uniqid();
$filename.=".".$ext;
$uploadfile = DMS_PATH.$filename;
if(move_uploaded_file($_FILES['file']['tmp_name'], $uploadfile))
{
if(!chgrp($uploadfile,'dms'))
echo 'CHGRP failed';
if(!chmod($uploadfile, 0774))
echo 'CHMOD failed';
exec('sudo chown wwwrun '.$uploadfile);
$dms = new dms();
$dms->version='0';
$dms->kategorie_kurzbz=$kategorie_kurzbz;
$dms->insertamum=date('Y-m-d H:i:s');
//$dms->insertvon = $user;
$dms->mimetype=$_FILES['file']['type'];
$dms->filename = $filename;
$dms->name = $_FILES['file']['name'];
if($dms->save(true))
{
$dms_id=$dms->dms_id;
}
else
{
echo 'Fehler beim Speichern der Daten';
$error = true;
}
}
else
{
echo 'Fehler beim Hochladen der Datei';
$error = true;
}
}
if(isset($_FILES['file']['tmp_name']) && !$error)
{
//Extension herausfiltern
$ext = explode('.',$_FILES['file']['name']);
$ext = mb_strtolower($ext[count($ext)-1]);
$filename = $_FILES['file']['tmp_name'];
//$fp = fopen($filename,'r');
//auslesen
//$content = fread($fp, filesize($filename));
//fclose($fp);
$akte = new akte();
if($akte->getAkten($_GET['person_id'], 'Lichtbil'))
{
if(count($akte->result)>0)
{
$akte = $akte->result[0];
$akte->new = false;
}
else
$akte->new = true;
}
else
{
$akte->new = true;
}
$dokument = new dokument();
$dokument->loadDokumenttyp($_REQUEST['dokumenttyp']);
$extension = end(explode(".",strtolower($_FILES['file']['name'])));
$titel = '';
// da nur 32 zeichen gespeichert werden dürfen, muss anhand vom typ gekürzt werden
if($_REQUEST['dokumenttyp']=='Lebenslf')
$titel = $p->t('incoming/lebenslauf').".".$extension;
if($_REQUEST['dokumenttyp']=='LearnAgr')
$titel = $p->t('incoming/learningAgreement').".".$extension;
if($_REQUEST['dokumenttyp']=='Motivat')
$titel = $p->t('incoming/motivationsschreiben').".".$extension;
if($_REQUEST['dokumenttyp']=='Zeugnis')
$titel = $p->t('incoming/zeugnis').".".$extension;
if($_REQUEST['dokumenttyp']=='Lichtbil')
$titel = $p->t('incoming/lichtbild').".".$extension;
$akte->dokument_kurzbz = $_REQUEST['dokumenttyp'];
$akte->bezeichnung = $_FILES['file']['name'];
$akte->person_id = $_GET['person_id'];
//$akte->inhalt = base64_encode($content);
$akte->mimetype = $_FILES['file']['type'];
$akte->erstelltam = date('Y-m-d H:i:s');
$akte->gedruckt = false;
$akte->titel = $titel;
//$akte->bezeichnung = $dokument->bezeichnung;
$akte->updateamum = date('Y-m-d H:i:s');
// $akte->updatevon = $user;
$akte->insertamum = date('Y-m-d H:i:s');
$akte->nachgereicht = false;
$akte->anmerkung = '';
// $akte->insertvon = $user;
$akte->uid = '';
$akte->dms_id = $dms_id;
$akte->new = true;
if (!$akte->save()) {
echo "<b>Fehler: $akte->errormsg</b>";
} else {
echo "<b>" . $p->t('global/erfolgreichgespeichert') . "</b>";
}
echo "<script>
var loc = window.opener.location;
if(!/active/.test(loc.href)) {
window.opener.location = loc + '?active=dokumente';
} else {
window.opener.location.reload();
}
</script>";
}
}
if($person_id !='')
{
$dokument = new dokument();
$dokument->getAllDokumenteForPerson($person_id);
echo " <form method='POST' enctype='multipart/form-data' action='$PHP_SELF?person_id=".$_GET['person_id']."'>
<table>
<tr>
<td>".$p->t('incoming/dokument').":</td>
<td>
<input type='file' name='file' />
</td>
</tr>
<tr>
<td>".$p->t('incoming/dokumenttyp').":</td>
<td>
<SELECT name='dokumenttyp'>";
foreach ($dokument->result as $dok)
{
$selected=($dokumenttyp == $dok->dokument_kurzbz)?'selected':'';
echo '<option '.$selected.' value="'.$dok->dokument_kurzbz.'" >'.$dok->bezeichnung."</option>\n";
}
echo " </select>
</td>
</tr>
<tr><td>&nbsp;</td></tr>
<tr>
<td><input type='hidden' name='kategorie_kurzbz' id='kategorie_kurzbz' value='Akte'>
<td><input type='hidden' name='fileupload' id='fileupload'></td>
<td><input type='submit' name='submitbild' value='Upload'></td>
</tr>
</table>
</form>";
}
else
{
echo "Es wurde keine Person_id angegeben";
}
?>
</body>
</html>
+10 -18
View File
@@ -95,15 +95,11 @@ if($frage_id!='' && is_numeric($frage_id))
echo $row->frage_text.'<br>';
if($row->frage_audio!='')
{
echo '
<script language="JavaScript" src="../audio-player/audio-player.js"></script>
<object type="application/x-shockwave-flash" data="../audio-player/player.swf" id="audioplayer1" height="24" width="290">
<param name="movie" value="../audio_player/player.swf" />
<param name="FlashVars" value="playerID=audioplayer1&amp;soundFile=../sound.php%3Fsrc%3Dfrage%26frage_id%3D'.$frage_id.'%26sprache%3D'.$sprache.'" />
<param name="quality" value="high" />
<param name="menu" value="false" />
<param name="wmode" value="transparent" />
</object>';
echo ' <audio src="../sound.php?src=frage&amp;frage_id='.$frage_id.'&amp;sprache='.$sprache.'" controls="controls">
<div>
<p>Ihr Browser unterstützt dieses Audioelement leider nicht.</p>
</div>
</audio>';
}
if($row->frage_bild!='')
echo "<img class='testtoolfrage' src='../bild.php?src=frage&amp;frage_id=$frage_id&amp;sprache=".$sprache."' /><br/><br/>\n";
@@ -118,15 +114,11 @@ if($frage_id!='' && is_numeric($frage_id))
echo $row->vorschlag_text;
if($row->vorschlag_audio!='')
{
echo '
<script language="JavaScript" src="../audio-player/audio-player.js"></script>
<object type="application/x-shockwave-flash" data="../audio-player/player.swf" id="audioplayer1" height="24" width="290">
<param name="movie" value="../audio_player/player.swf" />
<param name="FlashVars" value="playerID=audioplayer1&amp;soundFile=../sound.php%3Fsrc%3Dvorschlag%26vorschlag_id%3D'.$row->vorschlag_id.'%26sprache%3D'.$sprache.'" />
<param name="quality" value="high" />
<param name="menu" value="false" />
<param name="wmode" value="transparent" />
</object>';
echo ' <audio src="../sound.php?src=vorschlag&amp;vorschlag_id='.$row->vorschlag_id.'&amp;sprache='.$sprache.'" controls="controls">
<div>
<p>Ihr Browser unterstützt dieses Audioelement leider nicht.</p>
</div>
</audio>';
}
if($row->vorschlag_bild!='')
echo "<img class='testtoolfrage' src='../bild.php?src=vorschlag&amp;vorschlag_id=$row->vorschlag_id&amp;sprache=".$sprache."' /><br/><br/>\n";
+11 -22
View File
@@ -518,7 +518,7 @@ echo '<table width="100%"><tr><td>';
//Liste der Studiengänge
echo 'Studiengang: <select onchange="window.location.href=this.value">';
echo '<option value="'.$PHP_SELF.'?" '.$selected.'>Alle Studiengänge</option>';
echo '<option value="'.$PHP_SELF.'?" >Alle Studiengänge</option>';
foreach ($studiengang->result as $row)
{
$stg_arr[$row->studiengang_kz] = $row->kuerzel;
@@ -677,23 +677,17 @@ if($frage_id!='')
}
else
{
//echo "\n<tr><td align='center' width='400' height='300' style='background: #DDDDDD;'>Kein Bild vorhanden\n";
echo "\n<tr><td align='center' width='400' style='background: #DDDDDD;'>\n";
if($frage->audio=='')
echo "Kein Bild vorhanden\n";
}
if($frage->audio!='')
{
//echo '<br /><embed autostart="false" src="../sound.php?src=frage&amp;frage_id='.$frage->frage_id.'&amp;sprache='.$sprache.'" height="20" width="250"/>';
echo '
<script language="JavaScript" src="../audio-player/audio-player.js"></script>
<object type="application/x-shockwave-flash" data="../audio-player/player.swf" id="audioplayer1" height="24" width="290">
<param name="movie" value="../audio_player/player.swf" />
<param name="FlashVars" value="playerID=audioplayer1&amp;soundFile=../sound.php%3Fsrc%3Dfrage%26frage_id%3D'.$frage->frage_id.'%26sprache%3D'.$sprache.'" />
<param name="quality" value="high" />
<param name="menu" value="false" />
<param name="wmode" value="transparent" />
</object>';
echo ' <audio src="../sound.php?src=frage&amp;frage_id='.$frage->frage_id.'&amp;sprache='.$sprache.'" controls="controls">
<div>
<p>Ihr Browser unterstützt dieses Audioelement leider nicht.</p>
</div>
</audio>';
}
echo '</td>';
//Zusaetzliche EingabeFelder anzeigen
@@ -829,16 +823,11 @@ if($frage_id!='')
$a[] = $vs->punkte;
if($vs->audio!='')
{
//echo "<embed autostart='false' src='../sound.php?src=vorschlag&amp;vorschlag_id=".$vs->vorschlag_id."&amp;sprache=".$sprache."' height='20' width='150'/>";
echo '
<script language="JavaScript" src="../audio-player/audio-player.js"></script>
<object type="application/x-shockwave-flash" data="../audio-player/player.swf" id="audioplayer1" height="24" width="290">
<param name="movie" value="../audio_player/player.swf" />
<param name="FlashVars" value="playerID=audioplayer1&amp;soundFile=../sound.php%3Fsrc%3Dvorschlag%26vorschlag_id%3D'.$vs->vorschlag_id.'%26sprache%3D'.$sprache.'" />
<param name="quality" value="high" />
<param name="menu" value="false" />
<param name="wmode" value="transparent" />
</object>';
echo ' <audio src="../sound.php?src=vorschlag&amp;vorschlag_id='.$vs->vorschlag_id.'&amp;sprache='.$sprache.'" controls="controls">
<div>
<p>Ihr Browser unterstützt dieses Audioelement leider nicht.</p>
</div>
</audio>';
}
echo " </td>
<td><a href='$PHP_SELF?gebiet_id=$gebiet_id&amp;stg_kz=$stg_kz&amp;nummer=$nummer&amp;frage_id=$frage->frage_id&amp;vorschlag_id=$vs->vorschlag_id'>edit</a></td>
+10 -18
View File
@@ -185,15 +185,11 @@ if(isset($_REQUEST['AuswahlGebiet']))
//Sound einbinden
if($spracheFrage->audio!='')
{
echo '
<script language="JavaScript" src="../audio-player/audio-player.js"></script>
<object type="application/x-shockwave-flash" data="../audio-player/player.swf" id="audioplayer1" height="24" width="290">
<param name="movie" value="audio_player/player.swf" />
<param name="FlashVars" value="playerID=audioplayer1&amp;soundFile=../sound.php%3Fsrc%3Dfrage%26frage_id%3D'.$spracheFrage->frage_id.'%26sprache%3D'.$sprache.'" />
<param name="quality" value="high" />
<param name="menu" value="false" />
<param name="wmode" value="transparent" />
</object>';
echo ' <audio src="../sound.php?src=frage&amp;frage_id='.$spracheFrage->frage_id.'&amp;sprache='.$sprache.'" controls="controls">
<div>
<p>Ihr Browser unterstützt dieses Audioelement leider nicht.</p>
</div>
</audio>';
}
// FRAGE anzeigen
echo "$spracheFrage->text<br/><br/>\n";
@@ -226,15 +222,11 @@ if(isset($_REQUEST['AuswahlGebiet']))
}
if($vorschlag->audio!='')
{
echo '
<script language="JavaScript" src="../audio-player/audio-player.js"></script>
<object type="application/x-shockwave-flash" data="../audio-player/player.swf" id="audioplayer1" height="24" width="290">
<param name="movie" value="audio_player/player.swf" />
<param name="FlashVars" value="playerID=audioplayer1&amp;soundFile=../sound.php%3Fsrc%3Dvorschlag%26vorschlag_id%3D'.$vorschlag->vorschlag_id.'%26sprache%3D'.$_SESSION['sprache'].'" />
<param name="quality" value="high" />
<param name="menu" value="false" />
<param name="wmode" value="transparent" />
</object>';
echo ' <audio src="../sound.php?src=vorschlag&amp;vorschlag_id='.$vorschlag->vorschlag_id.'&amp;sprache='.$sprache.'" controls="controls">
<div>
<p>Ihr Browser unterstützt dieses Audioelement leider nicht.</p>
</div>
</audio>';
}
}
+18 -68
View File
@@ -161,6 +161,7 @@ echo '
{
var check = confirm(<?php echo "'".$p->t('testtool/okKlickenUmZuStarten')."'"?>+' '+stunde+'h '+minute+'m '+sekunde+'s');
if (check == true) {
var sprache_user = <?php echo "'".$sprache_user."'"?>;
document.location.href = 'frage.php?gebiet_id='+gebiet_id+'&start=true';
}
else {
@@ -192,8 +193,14 @@ else
list($stunde, $minute, $sekunde) = explode(':',$gebiet->zeit);
$gestartet = $gebiet->isGestartet($gebiet_id, $_SESSION['pruefling_id'], null);
if(!$gestartet && $gebiet->errormsg!='')
{
die($gebiet->errormsg.'</body></html>');
}
//Start des Pruefungsvorganges
if(isset($_GET['start']))
if(isset($_GET['start']) && !$gestartet)
{
//Fragenpool generieren
$frage = new frage();
@@ -523,19 +530,6 @@ if($frage->frage_id!='')
else
{
if(!$demo)
/*{
$qry = "SELECT count(*) as anzahl FROM testtool.tbl_frage
WHERE tbl_frage.gebiet_id=".$db->db_add_param($gebiet_id, FHC_INTEGER)."
AND demo ";
if($row = $db->db_fetch_object($db->db_query($qry)))
{
if($row->anzahl>1)
{
//Bei Demos den Weiter-Button nur anzeigen, wenn ausser der Startseite noch andere Demoseiten vorhanden sind
echo " <a href='$PHP_SELF?gebiet_id=$gebiet_id' class='Item'>".$p->t("testtool/zurueckZurStartseite")." &gt;&gt;</a>";
}
}
}*/
//else
{
//Wenns der letzte Eintrag ist, wieder zum ersten springen
@@ -543,40 +537,6 @@ if($frage->frage_id!='')
}
}
}
/*else
{
//Naechste Frage holen und Weiter-Button anzeigen
if($demo)
{
$frage2 = new frage();
$nextfrage = $frage2->getNextFrage($gebiet_id, $_SESSION['pruefling_id'], $frage_id, $demo);
if($nextfrage)
{
$value="Demo";
echo " <a href='$PHP_SELF?gebiet_id=$gebiet_id&amp;frage_id=$nextfrage' class='Item'>$value &gt;&gt;</a>";
}
else
{
//Naechste Frage holen und Weiter-Button anzeigen
//$frage = new frage();
//$nextfrage = $frage->getNextFrage($gebiet_id, $_SESSION['pruefling_id'], $frage_id, $demo);
$qry = "SELECT count(*) as anzahl FROM testtool.tbl_frage
WHERE tbl_frage.gebiet_id=".$db->db_add_param($gebiet_id, FHC_INTEGER)."
AND demo ";
if($row = $db->db_fetch_object($db->db_query($qry)))
{
if($row->anzahl>1)
{
//Bei Demos den Weiter-Button nur anzeigen, wenn ausser der Startseite noch andere Demoseiten vorhanden sind
echo " <a href='$PHP_SELF?gebiet_id=$gebiet_id' class='Item'>".$p->t("testtool/zurueckZurStartseite")." &gt;&gt;</a>";
}
}
}
}
}*/
if(!$demo && !$levelgebiet)
echo " </tr></table>";
@@ -588,16 +548,11 @@ if($frage->frage_id!='')
//Sound einbinden
if($frage->audio!='')
{
//echo '<embed autostart="false" src="sound.php?src=frage&amp;frage_id='.$frage->frage_id.'&amp;sprache='.$_SESSION['sprache'].'" height="20" width="250"/><br />';
echo '
<script language="JavaScript" src="audio-player/audio-player.js"></script>
<object type="application/x-shockwave-flash" data="audio-player/player.swf" id="audioplayer1" height="24" width="290">
<param name="movie" value="audio_player/player.swf" />
<param name="FlashVars" value="playerID=audioplayer1&amp;soundFile=sound.php%3Fsrc%3Dfrage%26frage_id%3D'.$frage->frage_id.'%26sprache%3D'.$_SESSION['sprache'].'" />
<param name="quality" value="high" />
<param name="menu" value="false" />
<param name="wmode" value="transparent" />
</object>';
echo ' <audio src="sound.php?src=frage&amp;frage_id='.$frage->frage_id.'&amp;sprache='.$_SESSION['sprache'].'" controls="controls">
<div>
<p>Ihr Browser unterstützt dieses Audioelement leider nicht.</p>
</div>
</audio>';
}
echo "$frage->text<br/><br/>\n";
@@ -645,16 +600,11 @@ if($frage->frage_id!='')
echo "<img class='testtoolvorschlag' src='bild.php?src=vorschlag&amp;vorschlag_id=$vorschlag->vorschlag_id&amp;sprache=".$_SESSION['sprache']."' /><br/>";
if($vorschlag->audio!='')
{
//echo '<embed autostart="false" src="sound.php?src=vorschlag&amp;vorschlag_id='.$vorschlag->vorschlag_id.'&amp;sprache='.$_SESSION['sprache'].'" height="20" width="100"/><br />';
echo '
<script language="JavaScript" src="audio-player/audio-player.js"></script>
<object type="application/x-shockwave-flash" data="audio-player/player.swf" id="audioplayer1" height="24" width="290">
<param name="movie" value="audio_player/player.swf" />
<param name="FlashVars" value="playerID=audioplayer1&amp;soundFile=sound.php%3Fsrc%3Dvorschlag%26vorschlag_id%3D'.$vs->vorschlag_id.'%26sprache%3D'.$_SESSION['sprache'].'" />
<param name="quality" value="high" />
<param name="menu" value="false" />
<param name="wmode" value="transparent" />
</object>';
echo ' <audio src="sound.php?src=vorschlag&amp;vorschlag_id='.$vorschlag->vorschlag_id.'&amp;sprache='.$_SESSION['sprache'].'" controls="controls">
<div>
<p>Ihr Browser unterstützt dieses Audioelement leider nicht.</p>
</div>
</audio>';
}
if($vorschlag->text!='')
echo $vorschlag->text.'<br/>';
+1 -3
View File
@@ -137,7 +137,6 @@ if (isset($_SESSION['pruefling_id']))
if($row_time->time>0)
{
//Gebiet gestartet aber noch nicht zu ende
//$style='text-decoration: underline;';
$style='';
$class='ItemTesttoolAktiv';
}
@@ -152,7 +151,6 @@ if (isset($_SESSION['pruefling_id']))
else
{
//Gebiet ist zu Ende
//$style='text-decoration:line-through;';
$style='';
$class='ItemTesttoolBeendet';
}
@@ -182,7 +180,7 @@ if (isset($_SESSION['pruefling_id']))
{
echo '<tr>
<td nowrap>
<span class="error"><img src="../../skin/images/menu_item.gif" width="7" height="9">&nbsp;'.$row->gebiet_bez.' (invalid)</span>
<span class="error">&nbsp;'.$row->gebiet_bez.' (invalid)</span>
</td>
</tr>';
}
-3
View File
@@ -27,9 +27,6 @@ require_once '../../include/phrasen.class.php';
die('Fehler beim Oeffnen der Datenbankverbindung');
require_once('../../include/gebiet.class.php');
//if(isset($_GET['lang']))
//setSprache($_GET['lang']);
function getSpracheUser()
{
+4 -28
View File
@@ -347,40 +347,16 @@ if(isset($_REQUEST['delete']))
// DB Eintrag löschen
if(!$dms->deleteVersion($dms_id, $version))
echo '<span class="error">'.$dms->errormsg.'</span>';
else
{
// File im Filesystem löschen
if(unlink(DMS_PATH.$dms->filename))
echo '<span class="ok">Erfolgreich gelöscht!</span>';
else
echo '<span class="error">Fehler beim löschen aus dem Filesystem aufgetreten!</span>';
}
}else
}
else
{
// lösche gesamten Eintrag
$dms = new dms();
$dms_id = $_REQUEST['dms_id'];
$dms = new dms();
$error = false;
$dms->getAllVersions($dms_id);
// DB Einträge löschen
// DB Einträge und Dokumente löschen
if(!$dms->deleteDms($dms_id))
echo '<span class="error">'.$dms->errormsg.'</span>';
else
{
// Alle Versionen der Datei vom Filesystem löschen
foreach($dms->result as $obj)
{
if(!unlink(DMS_PATH.$obj->filename))
$error = true;
}
if($error)
echo '<span class="error">Fehler beim löschen aus dem Filesystem aufgetreten!</span>';
else
echo '<span class="ok">Erfolgreich gelöscht!</span>';
}
}
}
+8 -1
View File
@@ -167,7 +167,7 @@ define('MAIL_INTERNATIONAL_OUTGOING', 'invalid@technikum-wien.at');
define('ANZAHL_PREINTERESSENT','5');
//Name der aktiven Addons getrennt mit ;
//Name der aktiven Addons getrennt mit ;
define('ACTIVE_ADDONS','');
// ***** MOODLE *****
@@ -195,4 +195,11 @@ define('TABLE_ID','_id');
define('TABLE_BEGIN','tbl_');
define('VIEW_BEGIN','vw_');
//Gibt an, ob das Studienbuchblatt im CIS gedruckt werden kann
define('CIS_DOKUMENTE_STUDIENBUCHLBATT_DRUCKEN',false);
//**** INFOSCREEN ****
//Gibt an, ob der Lageplan im Infoterminal angezeigt werden soll.
define('CIS_INFOSCREEN_LAGEPLAN_ANZEIGEN',true);
?>
+6
View File
@@ -45,6 +45,9 @@ define('CIS_ANWESENHEITSLISTE_NOTENLISTE_ANZEIGEN',true);
// Punkte bei der Noteneingabe anzeigen
define('CIS_GESAMTNOTE_PUNKTE',false);
// Gibt an ob der Lektor erneut eine LVNote eintragen kann wenn bereits eine Zeugnisnote vorhanden ist (true | false) DEFAULT true
define('CIS_GESAMTNOTE_UEBERSCHREIBEN',true);
// Anzeigeoptionen für LV-Plan Menü
define('CIS_LVPLAN_EXPORT_ANZEIGEN',true);
define('CIS_LVPLAN_PERSONENAUSWAHL_ANZEIGEN',true);
@@ -135,4 +138,7 @@ define('PRESTUDENT_ID_DUMMY_STUDENT', 13478);
//Legt fest ob die Option für alle Räume im Saalplan Dropdown angezeigt werden soll. (true|false)
define('CIS_SAALPLAN_ALLERAEUME_OPTION', false);
//Legt fest ob Bestätigungsmails über eine Anmelung zu einer Prüfung an eine einzelne Person erfolgt oder an den jeweiligen Lektor. (Leerstring für jeweiligen Lektro);
define('CIS_PRUEFUNG_MAIL_EMPFAENGER_ANMEDLUNG',"p.vondrak");
?>
+3 -2
View File
@@ -462,7 +462,7 @@ var boardObserver=
if (evt.target.tagName=="label")
evt.target.setAttribute("style","background-color:#AAFFAA;");
else
evt.target.setAttribute("style",styleNow+"border:1px dashed black;");
evt.target.setAttribute("style",styleNow+";border:1px dashed black;");
},
onDragExit: function (evt,flavour,session)
{
@@ -470,7 +470,7 @@ var boardObserver=
if (evt.target.tagName=="label")
evt.target.setAttribute("style","");
else
evt.target.setAttribute("style",styleNow+"border:1px solid black;");
evt.target.setAttribute("style",styleNow+";border:1px solid black;");
},
onDragOver: function(evt,flavour,session)
{
@@ -495,6 +495,7 @@ var boardObserver=
var stunde=evt.target.getAttribute("stunde");
var new_datum=evt.target.getAttribute("datum");
if (evt.target.tagName=="label")
{
var new_ort=evt.target.getAttribute("ort_kurzbz");
+10 -2
View File
@@ -582,8 +582,16 @@ if(!$error)
}
else
{
$return = false;
$errormsg = 'Fehler: '.$variable->errormsg;
if($variable->errormsg=='')
{
$return = true;
$data = '';
}
else
{
$return = false;
$errormsg = 'Fehler: '.$variable->errormsg;
}
}
}
else
+5 -5
View File
@@ -140,28 +140,28 @@ function getStundenproInstitut($mitarbeiter_uid, $studiensemester_kurzbz)
{
global $db;
$ret="Der Lektor ist in folgenden Instituten zugeteilt:\n";
$ret="Der Lektor ist in folgenden Organisationseinheiten zugeteilt:\n";
//Liste mit den Stunden in den jeweiligen Instituten anzeigen
$qry = "SELECT sum(tbl_lehreinheitmitarbeiter.semesterstunden) as summe, tbl_fachbereich.bezeichnung
$qry = "SELECT sum(tbl_lehreinheitmitarbeiter.semesterstunden) as summe, tbl_organisationseinheit.bezeichnung
FROM
lehre.tbl_lehreinheitmitarbeiter
JOIN lehre.tbl_lehreinheit USING(lehreinheit_id)
JOIN lehre.tbl_lehrveranstaltung as lehrfach ON(lehrfach_id=lehrfach.lehrveranstaltung_id)
JOIN public.tbl_fachbereich USING(oe_kurzbz)
JOIN public.tbl_organisationseinheit USING(oe_kurzbz)
WHERE
mitarbeiter_uid=".$db->db_add_param($mitarbeiter_uid)." AND
studiensemester_kurzbz=".$db->db_add_param($studiensemester_kurzbz)." AND
faktor>0 AND
stundensatz>0 AND
bismelden
GROUP BY tbl_fachbereich.bezeichnung";
GROUP BY tbl_organisationseinheit.bezeichnung";
if($result = $db->db_query($qry))
{
while($row = $db->db_fetch_object($result))
{
$ret .=$row->summe.' Stunden im Institut '.$row->bezeichnung."\n";
$ret .=$row->summe.' Stunden '.$row->bezeichnung."\n";
}
}
return $ret;
@@ -44,10 +44,10 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
<!-- ************************* -->
<vbox id="vboxSTPLDetailsListe">
<popupset>
<popup id="stpldetail-treestpldetail-popup">
<menupopup id="stpldetail-treestpldetail-popup">
<menuitem label="Bearbeiten" oncommand="STPLDetailEdit()" />
<menuitem label="Entfernen" oncommand="STPLDetailDelete()" />
</popup>
</menupopup>
</popupset>
<tree id="treeStplDetails" seltype="single" hidecolumnpicker="false" flex="1"
+202 -5
View File
@@ -86,6 +86,10 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
class="sortDirectionIndicator"
sort="rdf:http://www.technikum-wien.at/notiz/rdf#endeISO" />
<xul:splitter class="tree-splitter"/>
<xul:treecol anonid="treecol-notiz-dokumente" label="Dokumente" flex="2" hidden="false" persist="hidden width ordinal"
class="sortDirectionIndicator"
sort="rdf:http://www.technikum-wien.at/notiz/rdf#dokumente" />
<xul:splitter class="tree-splitter"/>
<xul:treecol anonid="treecol-notiz-erledigt" label="Erledigt" flex="2" hidden="false" persist="hidden width ordinal"
class="sortDirectionIndicator" type="checkbox"
sort="rdf:http://www.technikum-wien.at/notiz/rdf#erledigt_boolean" />
@@ -114,6 +118,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
<xul:treecell label="rdf:http://www.technikum-wien.at/notiz/rdf#bearbeiter_uid"/>
<xul:treecell label="rdf:http://www.technikum-wien.at/notiz/rdf#start"/>
<xul:treecell label="rdf:http://www.technikum-wien.at/notiz/rdf#ende"/>
<xul:treecell label="rdf:http://www.technikum-wien.at/notiz/rdf#dokumente"/>
<xul:treecell label="erledigt" value="rdf:http://www.technikum-wien.at/notiz/rdf#erledigt"/>
<xul:treecell label="rdf:http://www.technikum-wien.at/notiz/rdf#notiz_id"/>
<xul:treecell label="rdf:http://www.technikum-wien.at/notiz/rdf#startISO"/>
@@ -150,6 +155,16 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
<xul:label value="Text"/>
<xul:box class="WYSIWYG" anonid="textbox-notiz-text" flex="1"/>
</xul:row>
<xul:row>
<xul:spacer flex="1" />
<xul:hbox anonid="hbox-notiz-dokumente"></xul:hbox>
</xul:row>
<xul:row>
<xul:spacer flex="1" />
<xul:hbox>
<xul:button anonid="button-notiz-upload-dokument" oncommand="document.getBindingParent(this).UploadDokument()" label="Dokument hinzufügen" disabled="true" />
</xul:hbox>
</xul:row>
<xul:row>
<xul:label value="Gültig von"/>
<xul:hbox>
@@ -267,6 +282,8 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
document.getAnonymousElementByAttribute(this ,'anonid', 'menulist-notiz-bearbeiter').disabled=val;
document.getAnonymousElementByAttribute(this ,'anonid', 'checkbox-notiz-erledigt').disabled=val;
document.getAnonymousElementByAttribute(this ,'anonid', 'button-notiz-speichern').disabled=val;
if(val)
document.getAnonymousElementByAttribute(this ,'anonid', 'button-notiz-upload-dokument').disabled=val;
]]>
</body>
</method>
@@ -292,6 +309,11 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
document.getAnonymousElementByAttribute(this ,'anonid', 'menulist-notiz-bearbeiter').value='';
document.getAnonymousElementByAttribute(this ,'anonid', 'checkbox-notiz-erledigt').checked=false;
document.getAnonymousElementByAttribute(this ,'anonid', 'label-notiz-updateamum').value='';
var notizdoks = document.getAnonymousElementByAttribute(this ,'anonid', 'hbox-notiz-dokumente');
while(notizdoks.hasChildNodes())
{
notizdoks.removeChild(notizdoks.firstChild);
}
]]>
</body>
</method>
@@ -402,6 +424,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
<![CDATA[
this.ResetDetails();
this.DisableDetails(false);
document.getAnonymousElementByAttribute(this ,'anonid', 'button-notiz-upload-dokument').disabled=true;
document.getAnonymousElementByAttribute(this ,'anonid', 'caption-notiz-detail').label="Neue Notiz";
]]>
</body>
@@ -415,6 +438,15 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
]]>
</body>
</method>
<method name="RefreshNotizBlocking">
<body>
<![CDATA[
//debug('Refresh Notiz');
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
this.TreeNotizDatasource.Refresh(true); //blocking
]]>
</body>
</method>
<method name="Loeschen">
<body>
<![CDATA[
@@ -429,7 +461,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
//Abfrage ob wirklich geloescht werden soll
if (confirm('Wollen Sie die Notiz mit der ID: '+notiz_id+' wirklich loeschen?'))
{
document.getAnonymousElementByAttribute(this ,'anonid', 'button-notiz-upload-dokument').disabled=true;
var soapBody = new SOAPObject("deleteNotiz");
soapBody.appendChild(new SOAPObject("notiz_id")).val(notiz_id);
@@ -536,10 +568,17 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
<body>
<![CDATA[
var id = this.value;
if(id!='')
{
this.DisableDetails(false);
var notizdoks = document.getAnonymousElementByAttribute(this ,'anonid', 'hbox-notiz-dokumente');
while(notizdoks.hasChildNodes())
{
notizdoks.removeChild(notizdoks.firstChild);
}
this.DisableDetails(false);
document.getAnonymousElementByAttribute(this ,'anonid', 'button-notiz-upload-dokument').disabled=false;
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
//Daten holen
var url = '<?php echo APP_ROOT ?>rdf/notiz.rdf.php?notiz_id='+id+'&'+gettimestamp();
@@ -554,8 +593,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
var predicateNS = "http://www.technikum-wien.at/notiz/rdf";
//RDF parsen
titel = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#titel" ));
titel = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#titel" ));
text = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#text" ));
start = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#start" ));
ende = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#ende" ));
@@ -595,7 +633,48 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
menulist.selectedItem=null;
}
document.getAnonymousElementByAttribute(this ,'anonid', 'caption-notiz-detail').label="Bearbeiten";
// Dokumente auslesen
var url = '<?php echo APP_ROOT ?>rdf/dms.rdf.php?notiz_id='+id+'&'+gettimestamp();
var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].
getService(Components.interfaces.nsIRDFService);
dsource = rdfService.GetDataSourceBlocking(url);
// Alle Elemente aus dem RDF holen
var dsResources = dsource.GetAllResources();
var thisResource = null;
// Durchlaufen der Elemente
while(dsResources.hasMoreElements())
{
thisResource = dsResources.getNext().QueryInterface( Components.interfaces.nsIRDFResource);
var predicateNS = "http://www.technikum-wien.at/dms/rdf";
//Spalten holen
name = getTargetHelper(dsource,thisResource,rdfService.GetResource( predicateNS + "#name" ));
dms_id = getTargetHelper(dsource,thisResource,rdfService.GetResource( predicateNS + "#dms_id" ));
if(dms_id!='')
{
// Download-Link für Dokument einfügen
var dokurl = '<?php echo APP_ROOT ?>content/notizdokdownload.php?id='+dms_id;
var dokbtn = document.createElement("button");
dokbtn.setAttribute("label", name);
dokbtn.setAttribute("onclick", "window.open('"+dokurl+"')");
dokbtn.setAttribute("style", "margin-right: -5px;");
document.getAnonymousElementByAttribute(this ,'anonid', 'hbox-notiz-dokumente').appendChild(dokbtn);
// Link zum Löschen des Dokuments
var delbtn = document.createElement("button");
delbtn.setAttribute("image", "<?php echo APP_ROOT;?>skin/images/delete_x.png");
delbtn.setAttribute("tooltiptext", "Datei "+name+" löschen");
delbtn.setAttribute("onclick", "document.getBindingParent(this).LoeschenDokument("+dms_id+",'"+name+"')");
document.getAnonymousElementByAttribute(this ,'anonid', 'hbox-notiz-dokumente').appendChild(delbtn);
}
}
}
]]>
</body>
@@ -806,6 +885,124 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
]]>
</body>
</method>
<method name="UploadDokument">
<body>
<![CDATA[
notiz_id = document.getAnonymousElementByAttribute(this ,'anonid', 'textbox-notiz-notiz_id').value;
if(notiz_id != '')
{
NotizDokumentUploadScope = this;
this.selectID=notiz_id;
var new_window = window.open("<?php echo APP_ROOT; ?>content/notizdokupload.php?notiz_id="+notiz_id ,"","chrome, status=no, width=800, height=350, centerscreen, resizable");
}
else
alert("keine Notiz ausgewählt");
]]>
</body>
</method>
<method name="LoeschenDokument">
<parameter name="dms_id"/>
<parameter name="dateiname"/>
<body>
<![CDATA[
//Abfrage ob wirklich geloescht werden soll
if (confirm('Wollen Sie die Datei '+dateiname+' wirklich loeschen?'))
{
var soapBody = new SOAPObject("deleteDokument");
soapBody.appendChild(new SOAPObject("dms_id")).val(dms_id);
var sr = new SOAPRequest("deleteDokument",soapBody);
SOAPClient.Proxy="<?php echo APP_ROOT;?>soap/notiz.soap.php?"+gettimestamp();
SOAPClient.AjaxAsync=false;
function mycallb(obj) {
var me=obj;
this.invoke=function (respObj) {
try
{
var result = respObj.Body[0].deleteDokumentResponse[0].message[0].Text;
}
catch(e)
{
try
{
var fehler = respObj.Body[0].Fault[0].faultstring[0].Text;
}
catch(e)
{
var fehler = e;
}
alert('Fehler: '+fehler);
return;
}
me.RefreshNotiz();
}
}
var cb=new mycallb(this);
SOAPClient.SendRequest(sr, cb.invoke);
// Alle Download-Buttons der Dokumente entfernen
var notizdoks = document.getAnonymousElementByAttribute(this ,'anonid', 'hbox-notiz-dokumente');
while(notizdoks.hasChildNodes())
{
notizdoks.removeChild(notizdoks.firstChild);
}
// Dokumente auslesen
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var id = document.getAnonymousElementByAttribute(this ,'anonid', 'textbox-notiz-notiz_id').value;
var url = '<?php echo APP_ROOT ?>rdf/dms.rdf.php?notiz_id='+id+'&'+gettimestamp();
var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].
getService(Components.interfaces.nsIRDFService);
dsource = rdfService.GetDataSourceBlocking(url);
// Alle Elemente aus dem RDF holen
var dsResources = dsource.GetAllResources();
var thisResource = null;
// Durchlaufen der Elemente
while(dsResources.hasMoreElements())
{
thisResource = dsResources.getNext().QueryInterface( Components.interfaces.nsIRDFResource);
var predicateNS = "http://www.technikum-wien.at/dms/rdf";
//Spalten holen
name = getTargetHelper(dsource,thisResource,rdfService.GetResource( predicateNS + "#name" ));
dms_id = getTargetHelper(dsource,thisResource,rdfService.GetResource( predicateNS + "#dms_id" ));
if(dms_id!='')
{
// Download-Link für Dokument einfügen
var dokurl = '<?php echo APP_ROOT ?>content/notizdokdownload.php?id='+dms_id;
var dokbtn = document.createElement("button");
dokbtn.setAttribute("label", name);
dokbtn.setAttribute("onclick", "window.open('"+dokurl+"')");
dokbtn.setAttribute("style", "margin-right: -5px;");
document.getAnonymousElementByAttribute(this ,'anonid', 'hbox-notiz-dokumente').appendChild(dokbtn);
// Link zum Löschen des Dokuments
var delbtn = document.createElement("button");
delbtn.setAttribute("image", "<?php echo APP_ROOT;?>skin/images/delete_x.png");
delbtn.setAttribute("tooltiptext", "Datei "+name+" löschen");
delbtn.setAttribute("onclick", "document.getBindingParent(this).LoeschenDokument("+dms_id+",'"+name+"')");
document.getAnonymousElementByAttribute(this ,'anonid', 'hbox-notiz-dokumente').appendChild(delbtn);
}
}
}
]]>
</body>
</method>
<constructor>
//debug('load notiz:'+this.getAttribute('id'));
+74
View File
@@ -0,0 +1,74 @@
<?php
/* Copyright (C) 2015 Technikum-Wien
*
* 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.
*
* Authors: Nikolaus Krondraf <nikolaus.krondraf@technikum-wien.at>
*/
/**
* Die Dokumente werden entweder base64 kodiert in der Datenbank in der Spalte inhalt gespeichert
* oder im Filesystem, in diesem Fall ist die Akte mit einer DMS ID verknuepft in welcher der Dateiname steht.
*/
require_once('../config/vilesci.config.inc.php');
require_once('../include/dms.class.php');
require_once('../include/benutzerberechtigung.class.php');
require_once('../include/functions.inc.php');
$user = get_uid();
$rechte = new benutzerberechtigung();
$rechte->getBerechtigungen($user);
if(!$rechte->isBerechtigt('admin') && !$rechte->isBerechtigt('assistenz') && !$rechte->isBerechtigt('mitarbeiter'))
die('Keine Berechtigung');
if(isset($_GET['id']) && is_numeric($_GET['id']))
{
$dms = new dms();
if(!$dms->load($_GET['id']))
die('Kein Dokument vorhanden');
$filename=DMS_PATH.$dms->filename;
if(!isset($_GET['notimeupdate']))
$dms->touch($dms->dms_id, $dms->version);
if(file_exists($filename))
{
if($handle = fopen($filename,"r"))
{
if($dms->mimetype=='')
$dms->mimetype='application/octetstream';
header('Content-type: '.$dms->mimetype);
header('Content-Disposition: inline; filename="'.$dms->name.'"');
header('Content-Length: ' .filesize($filename));
while (!feof($handle))
{
echo fread($handle, 8192);
}
fclose($handle);
}
else
echo 'Fehler: Datei konnte nicht geoeffnet werden';
}
else
echo 'Die Datei existiert nicht';
}
else
{
echo "Ungueltige DMS-ID";
}
?>
+142
View File
@@ -0,0 +1,142 @@
<?php
/* Copyright (C) 2015 Technikum-Wien
*
* 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.
*
* Authors: Nikolaus Krondraf <nikolaus.krondraf@technikum-wien.at>
*/
// Oberflaeche zum Upload von Dokumenten zu Notizen aus dem FAS
require_once('../config/vilesci.config.inc.php');
require_once('../include/functions.inc.php');
require_once('../include/benutzerberechtigung.class.php');
require_once('../include/dms.class.php');
require_once('../include/notiz.class.php');
header("Content-Type: text/html; charset=utf-8");
$PHP_SELF = $_SERVER['PHP_SELF'];
echo "<html><body>";
$user = get_uid();
$rechte = new benutzerberechtigung();
$rechte->getBerechtigungen($user);
if(!$rechte->isBerechtigt('admin') && !$rechte->isBerechtigt('assistenz') && !$rechte->isBerechtigt('mitarbeiter'))
die('Keine Berechtigung');
$kategorie_kurzbz = 'notiz';
$dokument_kurzbz = isset($_REQUEST['dokument_kurzbz'])?$_REQUEST['dokument_kurzbz']:'';
if(isset($_POST['fileupload']))
{
$error = false;
// dms Eintrag anlegen
if(isset($_GET['notiz_id']))
{
$ext = pathinfo($_FILES['file']['name'], PATHINFO_EXTENSION);
$filename = uniqid();
$filename.=".".$ext;
$uploadfile = DMS_PATH.$filename;
if(move_uploaded_file($_FILES['file']['tmp_name'], $uploadfile))
{
if(!chgrp($uploadfile,'dms'))
echo 'CHGRP failed';
if(!chmod($uploadfile, 0774))
echo 'CHMOD failed';
exec('sudo chown wwwrun '.$uploadfile);
$dms = new dms();
$dms->version='0';
$dms->kategorie_kurzbz=$kategorie_kurzbz;
$dms->insertamum=date('Y-m-d H:i:s');
$dms->insertvon = $user;
$dms->mimetype=$_FILES['file']['type'];
$dms->filename = $filename;
$dms->name = $_FILES['file']['name'];
$dms->beschreibung = $_POST['anmerkung_intern'];
if($dms->save(true))
{
$dms_id=$dms->dms_id;
$notiz = new notiz($_GET['notiz_id']);
if(!$notiz->saveDokument($dms_id))
{
echo 'Fehler beim Speichern des Dokuments';
$error = true;
}
else
{
echo '<script>window.opener.NotizDokumentUploadScope.RefreshNotizBlocking();window.opener.NotizDokumentUploadScope.selectItem();window.close();</script>';
}
}
else
{
echo 'Fehler beim Speichern der Daten';
$error = true;
}
}
else
{
echo 'Fehler beim Hochladen der Datei';
$error = true;
}
}
else
{
echo 'Es muss eine Notiz ausgewaehlt werden';
$error = true;
}
}
if(isset($_GET['notiz_id']))
{
echo " <!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN' 'http://www.w3.org/TR/html4/loose.dtd'>
<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>
<link href='../skin/style.css.php' rel='stylesheet' type='text/css'>
<link rel='stylesheet' href='../skin/jquery.css' type='text/css'/>
</head>
<body style='padding:10px;'>
<h1>Upload Dokumente</h1>
<form method='POST' enctype='multipart/form-data' action='$PHP_SELF?notiz_id=".$_GET['notiz_id']."'>
<table>
<tr>
<td align='right'>Dokument:</td>
<td><input type='file' name='file' /></td>
</tr>";
echo " <tr>
<td align='right'>Anmerkung:</td><td><textarea name='anmerkung_intern' cols='45' id='anmerkung_intern'></textarea></td>
</tr>
<tr>
<td><input type='hidden' name='fileupload' id='fileupload'></td>
<td><input type='submit' name='submitdok' value='Upload'></td>
</tr></table></form></body></html>";
}
else
{
echo "Es wurde keine notiz_id angegeben";
}
?>
</body>
</html>
+42 -9
View File
@@ -2436,11 +2436,14 @@ if(!$error)
//Speichert einen Noteneintrag
$noten = new zeugnisnote();
$lehrveranstaltung_id = filter_input(INPUT_POST, 'lehrveranstaltung_id');
$student_uid = filter_input(INPUT_POST, 'student_uid');
$studiensemester_kurzbz = filter_input(INPUT_POST, 'studiensemester_kurzbz');
if(isset($_POST['lehrveranstaltung_id']) && isset($_POST['student_uid']) && isset($_POST['studiensemester_kurzbz']))
if(!is_null($lehrveranstaltung_id) && !is_null($student_uid) && !is_null($studiensemester_kurzbz))
{
//Berechtigung pruefen
$qry = "SELECT studiengang_kz FROM lehre.tbl_lehrveranstaltung WHERE lehrveranstaltung_id=".$db->db_add_param($_POST['lehrveranstaltung_id'], FHC_INTEGER);
$qry = "SELECT studiengang_kz FROM lehre.tbl_lehrveranstaltung WHERE lehrveranstaltung_id=".$db->db_add_param($lehrveranstaltung_id, FHC_INTEGER);
if($result = $db->db_query($qry))
{
if($row = $db->db_fetch_object($result))
@@ -2461,7 +2464,7 @@ if(!$error)
$errormsg = 'Fehler beim Ermitteln der LVA';
}
$qry = "SELECT studiengang_kz FROM public.tbl_student WHERE student_uid=".$db->db_add_param($_POST['student_uid']);
$qry = "SELECT studiengang_kz FROM public.tbl_student WHERE student_uid=".$db->db_add_param($student_uid);
if($result = $db->db_query($qry))
{
if($row = $db->db_fetch_object($result))
@@ -2494,11 +2497,28 @@ if(!$error)
else
{
if($noten->load($_POST['lehrveranstaltung_id'], $_POST['student_uid'], $_POST['studiensemester_kurzbz']))
if($noten->load($lehrveranstaltung_id, $student_uid, $studiensemester_kurzbz))
{
$noten->new = false;
$noten->updateamum = date('Y-m-d H:i:s');
$noten->updatevon = $user;
$log = new log();
$log->executetime = date('Y-m-d H:i:s');
$log->mitarbeiter_uid = $user;
$log->beschreibung = "Ändern der Note ".$noten->note." bei ".$noten->student_uid;
$log->sql = 'UPDATE lehre.tbl_zeugnisnote SET '.
'note='.$db->db_add_param($noten->note).', '.
'punkte='.$db->db_add_param($noten->punkte).','.
'uebernahmedatum='.$db->db_add_param($noten->uebernahmedatum).', '.
'benotungsdatum='.$db->db_add_param($noten->benotungsdatum).', '.
'bemerkung='.$db->db_add_param($noten->bemerkung).', '.
'updateamum= '.$db->db_add_param($noten->updateamum).', '.
'updatevon='.$db->db_add_param($noten->updatevon).' '.
'WHERE lehrveranstaltung_id='.$db->db_add_param($noten->lehrveranstaltung_id, FHC_INTEGER).' '.
'AND student_uid='.$db->db_add_param($noten->student_uid).' '.
'AND studiensemester_kurzbz='.$db->db_add_param($noten->studiensemester_kurzbz).';';
$log->sqlundo = $noten->getUndo('update');
$log->save(true);
}
else
{
@@ -2789,11 +2809,14 @@ if(!$error)
//Loescht einen Noteneintrag
$noten = new zeugnisnote();
$lehrveranstaltung_id = filter_input(INPUT_POST, 'lehrveranstaltung_id');
$student_uid = filter_input(INPUT_POST, 'student_uid');
$studiensemester_kurzbz = filter_input(INPUT_POST, 'studiensemester_kurzbz');
if(isset($_POST['lehrveranstaltung_id']) && isset($_POST['student_uid']) && isset($_POST['studiensemester_kurzbz']))
if(!is_null($lehrveranstaltung_id) && !is_null($student_uid) && !is_null($studiensemester_kurzbz))
{
//Berechtigung pruefen
$qry = "SELECT studiengang_kz FROM lehre.tbl_lehrveranstaltung WHERE lehrveranstaltung_id=".$db->db_add_param($_POST['lehrveranstaltung_id'], FHC_INTEGER);
$qry = "SELECT studiengang_kz FROM lehre.tbl_lehrveranstaltung WHERE lehrveranstaltung_id=".$db->db_add_param($lehrveranstaltung_id, FHC_INTEGER);
if($result = $db->db_query($qry))
{
if($row = $db->db_fetch_object($result))
@@ -2814,7 +2837,7 @@ if(!$error)
$errormsg = 'Fehler beim Ermitteln der LVA';
}
$qry = "SELECT studiengang_kz FROM public.tbl_student WHERE student_uid=".$db->db_add_param($_POST['student_uid']);
$qry = "SELECT studiengang_kz FROM public.tbl_student WHERE student_uid=".$db->db_add_param($student_uid);
if($result = $db->db_query($qry))
{
if($row = $db->db_fetch_object($result))
@@ -2846,9 +2869,19 @@ if(!$error)
}
else
{
if($noten->delete($_POST['lehrveranstaltung_id'], $_POST['student_uid'], $_POST['studiensemester_kurzbz']))
$noten->load($lehrveranstaltung_id, $student_uid, $studiensemester_kurzbz);
if($noten->delete($lehrveranstaltung_id, $student_uid, $studiensemester_kurzbz))
{
$log = new log();
$log->executetime = date('Y-m-d H:i:s');
$log->mitarbeiter_uid = $user;
$log->beschreibung = "Löschen der Note ".$noten->note." bei ".$noten->student_uid;
$log->sql = "DELETE FROM lehre.tbl_zeugnisnote WHERE
lehrveranstaltung_id=".$db->db_add_param($lehrveranstaltung_id, FHC_INTEGER, false)." AND
student_uid=".$db->db_add_param($student_uid)." AND
studiensemester_kurzbz=".$db->db_add_param($studiensemester_kurzbz).";";
$log->sqlundo = $noten->getUndo('insert');
$log->save(true);
$return = true;
}
else
+18 -14
View File
@@ -90,10 +90,17 @@ function onLoad()
//wenn zb ein IFrame geladen wird
onLoad=function() {return false};
if(document.getElementById('statusbarpanel-ignore_kollision'))
{
// Anzeige von DBTable und Ignorekoll. aktualisieren
updateignorekollision();
updatedbstpltable();
}
//Notizen des Users laden
notiz = document.getElementById('box-notizen');
notiz.LoadNotizTree('','','','','','','', getUsername(),'');
if(notiz)
notiz.LoadNotizTree('','','','','','','', getUsername(),'');
}
catch(e)
{
@@ -234,7 +241,8 @@ function toggleIgnoreKollision()
// ****
function variableChange(variable, id, wert)
{
item = document.getElementById(id);
if(id!=null)
item = document.getElementById(id);
if(typeof(wert)==='undefined')
{
@@ -293,13 +301,15 @@ function updateignorekollision()
if(getvariable('ignore_kollision')=='true')
{
panel.label='Kollisionscheck AUS';
panel.style.backgroundColor='red';
panel.style.backgroundColor='#FF0000';
panel.style.MozAppearance = "none"
document.getElementById('menu-prefs-ignore_kollision').setAttribute('checked','true');
}
else
{
panel.label='Kollisionscheck AN';
panel.style.backgroundColor='';
panel.style.MozAppearance = "none"
document.getElementById('menu-prefs-ignore_kollision').setAttribute('checked','false');
}
}
@@ -314,11 +324,13 @@ function updatedbstpltable()
if(panel.label=='stundenplan')
{
panel.style.backgroundColor='red';
panel.style.backgroundColor='#FF0000';
panel.style.MozAppearance = "none"
}
else
{
panel.style.backgroundColor='transparent';
panel.style.backgroundColor='';
panel.style.MozAppearance = "none"
}
}
@@ -458,14 +470,6 @@ function UnDo(log_id, bezeichnung)
}
}
// ****
// * Oeffnet die ToDoListe fuers Tempus
// ****
function HelpOpenToDo()
{
window.open('ToDo_Tempus.html','ToDo');
}
// ****
// * Zeigt das Fenster zur Kollisionspruefung auf Studentenebene an
// ****
+1 -8
View File
@@ -79,7 +79,6 @@ echo '<?xml-stylesheet href="datepicker/datepicker.css" type="text/css"?>';
<command id="menu-extras-rescheck:command" oncommand="ResCheckShow();"/>
<command id="menu-extras-synclvplan:command" oncommand="SyncLVPlan();"/>
<command id="menu-help-about:command" oncommand="OpenAboutDialog()"/>
<command id="menu-help-todo:command" oncommand="HelpOpenToDo();"/>
<command id="menu-help-manual:command" oncommand="OpenManualTempus();"/>
</commandset>
@@ -264,12 +263,6 @@ echo '<?xml-stylesheet href="datepicker/datepicker.css" type="text/css"?>';
label = "&menu-help-manual.label;"
command = "menu-help-manual:command"
accesskey = "&menu-help-manual.accesskey;"/>
<menuitem
id = "menu-help-todo"
key = "&menu-help-todo.key;"
label = "&menu-help-todo.label;"
command = "menu-help-todo:command"
accesskey = "&menu-help-todo.accesskey;"/>
</menupopup>
</menu>
</menubar>
@@ -316,7 +309,7 @@ echo '<?xml-stylesheet href="datepicker/datepicker.css" type="text/css"?>';
?>
<statusbarpanel id="statusbarpanel-db_table" label="<?php echo $db_stpl_table; ?>"/>
<statusbarpanel>
<toolbarbutton id="statusbarpanel-ignore_kollision" label="Kollisionscheck <?php echo ($ignore_kollision=='true'?'AUS':'AN'); ?>" <?php echo ($ignore_kollision=='true'?'style="background-color: RED;"':'');?> oncommand="updateignorekollision()"/>
<toolbarbutton id="statusbarpanel-ignore_kollision" label="Kollisionscheck <?php echo ($ignore_kollision=='true'?'AUS':'AN'); ?>" <?php echo ($ignore_kollision=='true'?'style="background-color: red;"':'');?> oncommand="updateignorekollision()"/>
</statusbarpanel>
<statusbarpanel id="statusbarpanel-text" label="<?php echo htmlspecialchars($error_msg); ?>" flex="4" crop="right" />
<statusbarpanel id="progress-panel" class="statusbarpanel-progress">
+83 -4
View File
@@ -220,6 +220,9 @@ class dms extends basis_db
*/
public function deleteVersion($dms_id, $version)
{
$dms = new dms();
$dms->load($dms_id, $version);
$qry ="DELETE FROM campus.tbl_dms_version WHERE dms_id = ".$this->db_add_param($dms_id, FHC_INTEGER)." and version =".$this->db_add_param($version, FHC_INTEGER).';';
if($this->db_query($qry))
@@ -227,13 +230,20 @@ class dms extends basis_db
$qry_anzahl ="SELECT 1 FROM campus.tbl_dms_version WHERE dms_id =".$this->db_add_param($dms_id, FHC_INTEGER).';';
if($result = $this->db_query($qry_anzahl))
{
// Wenn letzte Version gelöscht wurde -> lösche gesamten Eintrag
// File der Version im Filesystem löschen
if(is_file(DMS_PATH.$dms->filename) && !unlink(DMS_PATH.$dms->filename))
{
$this->errormsg = "Fehler beim Löschen des Dokuments aufgetreten";
return false;
}
// Wenn letzte Version gelöscht wurde -> lösche gesamten Eintrag
if($this->db_num_rows($result) == 0 )
{
if(!$this->deleteDms($dms_id))
{
$this->errormsg = "Fehler beim Löschen aufgetreten";
return false;
return false;
}
else
return true;
@@ -254,6 +264,10 @@ class dms extends basis_db
*/
public function deleteDms($dms_id)
{
$this->load($dms_id);
$this->getAllVersions($dms_id);
$error = false;
// lösche Versionen
$qry ="BEGIN;DELETE FROM campus.tbl_dms_version WHERE dms_id =".$this->db_add_param($dms_id, FHC_INTEGER)."; ";
$qry.="DELETE FROM fue.tbl_projekt_dokument WHERE dms_id=".$this->db_add_param($dms_id, FHC_INTEGER)."; ";
@@ -261,12 +275,28 @@ class dms extends basis_db
if($this->db_query($qry))
{
$this->db_query('COMMIT;');
return true;
// Alle Versionen der Datei im Filesystem löschen
foreach($this->result as $obj)
{
if(is_file(DMS_PATH.$obj->filename) && !unlink(DMS_PATH.$obj->filename))
$error = true;
}
if($error)
{
$this->errormsg = "Fehler beim Löschen des Dokuments aufgetreten";
return false;
}
else
{
return true;
}
}
else
{
$this->db_query('ROLLBACK;');
$this->errormsg = "Fehler beim Löschen des Eintrages aufgetreten";
$this->errormsg = "Fehler beim Löschen des Eintrages aufgetreten";
return false;
}
}
@@ -841,6 +871,55 @@ class dms extends basis_db
return false;
}
}
/**
* Gibt die Dokumente einer Notiz zurück
* @param int $notiz_id
* @return boolean
*/
public function getDokumenteNotiz($notiz_id)
{
$qry = "SELECT *
FROM
campus.tbl_dms
JOIN campus.tbl_dms_version USING(dms_id)
JOIN public.tbl_notiz_dokument USING(dms_id)
WHERE (dms_id, version) in(
SELECT dms_id, max(version)
FROM campus.tbl_dms_version
GROUP BY dms_id)
AND tbl_notiz_dokument.notiz_id=".$this->db_add_param($notiz_id)."
ORDER BY name;";
if($result = $this->db_query($qry))
{
while($row = $this->db_fetch_object($result))
{
$obj = new dms();
$obj->dms_id = $row->dms_id;
$obj->version = $row->version;
$obj->oe_kurzbz = $row->oe_kurzbz;
$obj->dokument_kurzbz = $row->dokument_kurzbz;
$obj->kategorie_kurzbz = $row->kategorie_kurzbz;
$obj->filename = $row->filename;
$obj->mimetype = $row->mimetype;
$obj->name = $row->name;
$obj->beschreibung = $row->beschreibung;
$obj->letzterzugriff = $row->letzterzugriff;
$obj->insertamum = $row->insertamum;
$obj->insertvon = $row->insertvon;
$obj->updateamum = $row->updateamum;
$this->result[] = $obj;
}
}
else
{
$this->errormsg = 'Fehler beim Laden der Daten';
return false;
}
}
/**
* Laedt die Dokumente einer Projektphase
+63
View File
@@ -563,5 +563,68 @@ class gebiet extends basis_db
return false;
}
}
/**
* Prueft ob das Gebiet bereits gestartet wurde. Wahlweise pruefling_id oder prestudent_id
*
* @param $pruefling_id Wahlweise pruefling_id oder
* @param $prestudent_id prestudent_id des Prueflings.
* @param $gebiet_id Gebiet_id des Gebiets, dessen Start gefprueft werden soll
* @return true wenn das Gebiet bereits gestartet wurde, false wenn nicht.
*/
public function isGestartet($gebiet_id, $pruefling_id=null, $prestudent_id=null)
{
$this->errormsg='';
if(!is_numeric($gebiet_id) || $gebiet_id=='')
{
$this->errormsg = 'Gebiet_id muss eine gueltige Zahl sein';
return false;
}
if(!is_null($pruefling_id) && (!is_numeric($pruefling_id) || $pruefling_id==''))
{
$this->errormsg = 'Pruefling_id muss eine gueltige Zahl sein';
return false;
}
if(!is_null($prestudent_id) && (!is_numeric($prestudent_id) || $prestudent_id==''))
{
$this->errormsg = 'Prestudent_id muss eine gueltige Zahl sein';
return false;
}
$qry = ' SELECT
begintime
FROM
testtool.tbl_pruefling_frage
JOIN
testtool.tbl_pruefling USING (pruefling_id)
JOIN
testtool.tbl_frage USING (frage_id)
WHERE ';
if (!is_null($pruefling_id))
$qry.=' pruefling_id='.$this->db_add_param($pruefling_id, FHC_INTEGER);
else
$qry.=' prestudent_id='.$this->db_add_param($prestudent_id, FHC_INTEGER);
$qry.=' AND
gebiet_id='.$this->db_add_param($gebiet_id, FHC_INTEGER).'
AND
begintime IS NOT NULL';
if($result = $this->db_query($qry))
{
if($this->db_fetch_object($result))
return true;
else
{
return false;
}
}
else
{
$this->errormsg = 'Fehler bei der Abfrage aufgetreten';
return false;
}
}
}
?>
+3 -1
View File
@@ -14,6 +14,7 @@
*/
//Singleton SOAP Client
var SOAPClient = {
AjaxAsync: true,
Proxy: "",
SOAPServer: "",
ContentType: "text/xml",
@@ -44,7 +45,8 @@ var SOAPClient = {
}
}
$.ajax({
type: "POST",
async: SOAPClient.AjaxAsync,
type: "POST",
url: SOAPClient.Proxy,
dataType: "xml",
processData: false,
+13 -3
View File
@@ -20,6 +20,7 @@
* Rudolf Hangl <rudolf.hangl@technikum-wien.at>.
*/
require_once(dirname(__FILE__).'/basis_db.class.php');
require_once(dirname(__FILE__).'/sprache.class.php');
class lehrform extends basis_db
{
@@ -30,6 +31,8 @@ class lehrform extends basis_db
public $lehrform_kurbz; // varchar(8)
public $bezeichnung; // varchar (256)
public $verplanen; // boolean
public $bezeichnung_kurz;
public $bezeichnung_lang;
/**
* Konstruktor - Laedt optional eine Lehrform
@@ -49,7 +52,8 @@ class lehrform extends basis_db
*/
public function load($lehrform_kurzbz)
{
$qry = "SELECT * FROM lehre.tbl_lehrform WHERE lehrform_kurzbz=".$this->db_add_param($lehrform_kurzbz).";";
$sprache = new sprache();
$qry = "SELECT *,".$sprache->getSprachQuery('bezeichnung_kurz').",".$sprache->getSprachQuery('bezeichnung_lang')." FROM lehre.tbl_lehrform WHERE lehrform_kurzbz=".$this->db_add_param($lehrform_kurzbz).";";
if(!$this->db_query($qry))
{
@@ -62,6 +66,8 @@ class lehrform extends basis_db
$this->lehrform_kurzbz = $row->lehrform_kurzbz;
$this->bezeichnung = $row->bezeichnung;
$this->verplanen = $this->db_parse_bool($row->verplanen);
$this->bezeichnung_kurz=$this->parseSprachResult('bezeichnung_kurz',$row);
$this->bezeichnung_lang=$this->parseSprachResult('bezeichnung_lang',$row);
}
else
{
@@ -79,7 +85,9 @@ class lehrform extends basis_db
*/
public function getAll()
{
$qry = "SELECT * FROM lehre.tbl_lehrform ORDER BY lehrform_kurzbz;";
$sprache = new sprache();
$qry = "SELECT *,".$sprache->getSprachQuery('bezeichnung_kurz').",".$sprache->getSprachQuery('bezeichnung_lang')." FROM lehre.tbl_lehrform ORDER BY lehrform_kurzbz;";
if(!$this->db_query($qry))
{
@@ -94,6 +102,8 @@ class lehrform extends basis_db
$lf->lehrform_kurzbz = $row->lehrform_kurzbz;
$lf->bezeichnung = $row->bezeichnung;
$lf->verplanen = $this->db_parse_bool($row->verplanen);
$lf->bezeichnung_kurz=$sprache->parseSprachResult('bezeichnung_kurz',$row);
$lf->bezeichnung_lang=$sprache->parseSprachResult('bezeichnung_lang',$row);
$this->lehrform[] = $lf;
}
@@ -166,4 +176,4 @@ class lehrform extends basis_db
}
}
}
?>
?>
+1 -2
View File
@@ -2088,8 +2088,7 @@ class lehrveranstaltung extends basis_db
$qry.=" AND tbl_studienplan_lehrveranstaltung.semester=" . $this->db_add_param($semester, FHC_INTEGER);
}
$qry.=" ORDER BY bezeichnung;";
//TODO
$this->errormsg = $qry;
$this->lehrveranstaltungen = array();
if ($result = $this->db_query($qry))
{
+520 -458
View File
@@ -1,458 +1,520 @@
<?php
/* Copyright (C) 2011 FH Technikum-Wien
*
* 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.
*
* Authors: Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at> and
*/
require_once(dirname(__FILE__).'/basis_db.class.php');
class notiz extends basis_db
{
public $new;
public $result=array();
//Tabellenspalten
public $notiz_id;
public $titel;
public $text;
public $verfasser_uid;
public $bearbeiter_uid;
public $start;
public $ende;
public $erledigt;
public $insertamum;
public $insertvon;
public $updateamum;
public $updatevon;
public $projekt_kurzbz;
public $projektphase_id;
public $projekttask_id;
public $uid;
public $person_id;
public $prestudent_id;
public $bestellung_id;
public $lehreinheit_id;
public $anrechnung_id;
/**
* Konstruktor
* @param $notiz_id
*/
public function __construct($notiz_id = null)
{
parent::__construct();
if($notiz_id != null)
$this->load($notiz_id);
}
/**
* Laedt eine Notiz
* @param $notiz_id
* @return true wenn ok, false im Fehlerfall
*/
public function load($notiz_id)
{
if(!is_numeric($notiz_id))
{
$this->errormsg = 'NotizID ist ungueltig';
return false;
}
$qry = "SELECT * FROM public.tbl_notiz WHERE notiz_id=".$this->db_add_param($notiz_id, FHC_INTEGER);
if($this->db_query($qry))
{
if($row = $this->db_fetch_object())
{
$this->notiz_id=$row->notiz_id;
$this->titel=$row->titel;
$this->text=$row->text;
$this->verfasser_uid=$row->verfasser_uid;
$this->bearbeiter_uid=$row->bearbeiter_uid;
$this->start=$row->start;
$this->ende=$row->ende;
$this->erledigt=$this->db_parse_bool($row->erledigt);
$this->insertamum=$row->insertamum;
$this->insertvon=$row->insertvon;
$this->updateamum=$row->updateamum;
$this->updatevon=$row->updatevon;
return true;
}
else
{
$this->errormsg = 'Datensatz wurde nicht gefunden';
return false;
}
}
else
{
$this->errormsg = 'Fehler beim Laden der Daten';
return false;
}
}
/**
* Löscht eine Notiz
* @param $notiz_id
* @return true wenn ok, false im Fehlerfall
*/
public function delete($notiz_id)
{
if(!is_numeric($notiz_id))
{
$this->errormsg = 'NotizID ist ungueltig';
return false;
}
$qry = "Delete FROM public.tbl_notiz WHERE notiz_id=".$this->db_add_param($notiz_id, FHC_INTEGER);
if(!$this->db_query($qry))
{
$this->errormsg = 'Fehler beim Loeschen der Daten';
return false;
}
return true;
}
/**
* Prueft die Daten vor dem Speichern
* auf Gueltigkeit
*/
public function validate()
{
return true;
}
/**
* Speichert den aktuellen Datensatz in die Datenbank
* Wenn $neu auf true gesetzt ist wird ein neuer Datensatz angelegt
* andernfalls wird der Datensatz mit der ID in $notiz_id aktualisiert
* @return true wenn ok, false im Fehlerfall
*/
public function save($new=null)
{
if($new==null)
$new=$this->new;
if(!$this->validate())
return false;
if($new)
{
//Neuen Datensatz einfuegen
$qry='BEGIN;INSERT INTO public.tbl_notiz (titel, text, verfasser_uid,
bearbeiter_uid, start, ende, erledigt, insertamum, insertvon,
updateamum, updatevon) VALUES('.
$this->db_add_param($this->titel).', '.
$this->db_add_param($this->text).', '.
$this->db_add_param($this->verfasser_uid).','.
$this->db_add_param($this->bearbeiter_uid).','.
$this->db_add_param($this->start).','.
$this->db_add_param($this->ende).','.
$this->db_add_param($this->erledigt,FHC_BOOLEAN).','.
$this->db_add_param($this->insertamum).','.
$this->db_add_param($this->insertvon).','.
$this->db_add_param($this->updateamum).','.
$this->db_add_param($this->updatevon).');';
}
else
{
$qry='UPDATE public.tbl_notiz SET '.
'titel='.$this->db_add_param($this->titel).', '.
'text='.$this->db_add_param($this->text).', '.
'verfasser_uid='.$this->db_add_param($this->verfasser_uid).', '.
'bearbeiter_uid='.$this->db_add_param($this->bearbeiter_uid).', '.
'start='.$this->db_add_param($this->start).', '.
'ende='.$this->db_add_param($this->ende).', '.
'erledigt='.$this->db_add_param($this->erledigt,FHC_BOOLEAN).', '.
'updateamum='.$this->db_add_param($this->updateamum).', '.
'updatevon='.$this->db_add_param($this->updatevon).' '.
'WHERE notiz_id='.$this->db_add_param($this->notiz_id,FHC_INTEGER).';';
}
if($this->db_query($qry))
{
if($new)
{
$qry="SELECT currval('seq_notiz_notiz_id') as id;";
if($result = $this->db_query($qry))
{
if($row = $this->db_fetch_object($result))
{
$this->notiz_id = $row->id;
$this->db_query('COMMIT;');
return true;
}
else
{
$this->errormsg = 'Fehler beim Lesen der Sequence';
$this->db_query('ROLLBACK');
return false;
}
}
else
{
$this->errormsg = 'Fehler beim Lesen der Sequence';
$this->db_query('ROLLBACK');
return false;
}
}
return true;
}
else
{
$this->errormsg = 'Fehler beim Speichern des Datensatzes';
return false;
}
}
/**
* Speichert die Zuordnung einer Notiz
*
*/
public function saveZuordnung()
{
$qry = "INSERT INTO public.tbl_notizzuordnung(notiz_id, projekt_kurzbz, projektphase_id, projekttask_id,
uid, person_id, prestudent_id, bestellung_id, lehreinheit_id, anrechnung_id) VALUES(".
$this->db_add_param($this->notiz_id, FHC_INTEGER).','.
$this->db_add_param($this->projekt_kurzbz).','.
$this->db_add_param($this->projektphase_id, FHC_INTEGER).','.
$this->db_add_param($this->projekttask_id, FHC_INTEGER).','.
$this->db_add_param($this->uid).','.
$this->db_add_param($this->person_id, FHC_INTEGER).','.
$this->db_add_param($this->prestudent_id, FHC_INTEGER).','.
$this->db_add_param($this->bestellung_id, FHC_INTEGER).','.
$this->db_add_param($this->lehreinheit_id, FHC_INTEGER).','.
$this->db_add_param($this->anrechnung_id, FHC_INTEGER).');';
if($this->db_query($qry))
{
return true;
}
else
{
$this->errormsg = 'Fehler beim Speichern der Daten';
return false;
}
}
/**
*
* Laedt die Notizen
* @param $erledigt
* @param $projekt_kurzbz
* @param $projektphase_id
* @param $projekttask_id
* @param $uid
* @param $person_id
* @param $prestudent_id
* @param $bestellung_id
* @param $user
* @param $lehreinheit_id
* @param $anrechnung_id
* @return boolean
*/
public function getNotiz($erledigt=null, $projekt_kurzbz=null, $projektphase_id=null, $projekttask_id=null, $uid=null, $person_id=null, $prestudent_id=null, $bestellung_id=null, $user=null, $lehreinheit_id=null, $stundenplandev_id=null, $anrechnung_id=null)
{
$qry = "SELECT
*
FROM
public.tbl_notiz
LEFT JOIN public.tbl_notizzuordnung USING(notiz_id)
WHERE 1=1";
if(!is_null($erledigt))
{
if($erledigt)
$qry.=" AND erledigt=true";
else
$qry.=" AND erledigt=false";
}
if($projekt_kurzbz!='')
$qry.=" AND projekt_kurzbz=".$this->db_add_param($projekt_kurzbz);
if($projektphase_id!='')
$qry.=" AND projektphase_id=".$this->db_add_param($projektphase_id, FHC_INTEGER);
if($projekttask_id!='')
$qry.=" AND projekttask_id=".$this->db_add_param($projekttask_id, FHC_INTEGER);
if($uid!='')
$qry.=" AND uid=".$this->db_add_param($uid);
if($person_id!='')
$qry.=" AND person_id=".$this->db_add_param($person_id, FHC_INTEGER);
if($prestudent_id!='')
$qry.=" AND prestudent_id=".$this->db_add_param($prestudent_id, FHC_INTEGER);
if($bestellung_id!='')
$qry.=" AND bestellung_id=".$this->db_add_param($bestellung_id, FHC_INTEGER);
if($user!='')
$qry.=" AND (verfasser_uid=".$this->db_add_param($user)." OR bearbeiter_uid=".$this->db_add_param($user).")";
if($lehreinheit_id!='')
$qry.=" AND lehreinheit_id=".$this->db_add_param($lehreinheit_id, FHC_INTEGER);
if($anrechnung_id!='')
$qry.=" AND anrechnung_id=".$this->db_add_param($anrechnung_id, FHC_INTEGER);
$qry.=' ORDER BY start, ende, titel';
if($result = $this->db_query($qry))
{
while($row = $this->db_fetch_object($result))
{
$obj = new notiz();
$obj->notiz_id=$row->notiz_id;
$obj->titel=$row->titel;
$obj->text=$row->text;
$obj->verfasser_uid=$row->verfasser_uid;
$obj->bearbeiter_uid=$row->bearbeiter_uid;
$obj->start=$row->start;
$obj->ende=$row->ende;
$obj->erledigt=$this->db_parse_bool($row->erledigt);
$obj->insertamum=$row->insertamum;
$obj->insertvon=$row->insertvon;
$obj->updateamum=$row->updateamum;
$obj->updatevon=$row->updatevon;
$this->result[] = $obj;
}
return true;
}
else
{
$this->errormsg = 'Fehler beim Laden der Daten';
return false;
}
}
/**
*
* Laedt die Notizen vom Bewerbungstool
* @param $person_id int
* @return boolean
*/
public function getBewerbungstoolNotizen($person_id)
{
$qry = 'SELECT
*
FROM
public.tbl_notiz
LEFT JOIN public.tbl_notizzuordnung USING(notiz_id)
WHERE person_id = ' . $this->db_add_param($person_id, FHC_INTEGER) .
' AND insertvon = ' . $this->db_add_param('Bewerbungstool') .
' ORDER BY notiz_id';
if($result = $this->db_query($qry))
{
while($row = $this->db_fetch_object($result))
{
$obj = new notiz();
$obj->notiz_id=$row->notiz_id;
$obj->titel=$row->titel;
$obj->text=$row->text;
$obj->verfasser_uid=$row->verfasser_uid;
$obj->bearbeiter_uid=$row->bearbeiter_uid;
$obj->start=$row->start;
$obj->ende=$row->ende;
$obj->erledigt=$this->db_parse_bool($row->erledigt);
$obj->insertamum=$row->insertamum;
$obj->insertvon=$row->insertvon;
$obj->updateamum=$row->updateamum;
$obj->updatevon=$row->updatevon;
$this->result[] = $obj;
}
return true;
}
else
{
$this->errormsg = 'Fehler beim Laden der Daten';
return false;
}
}
/**
*
* Laedt die Notizen
* @param $erledigt
* @param $projekt_kurzbz
* @param $projektphase_id
* @param $projekttask_id
* @param $uid
* @param $person_id
* @param $prestudent_id
* @param $bestellung_id
* @param $user
* @param $lehreinheit_id
* @param $anrechnung_id
* @return boolean
*/
public function getAnzahlNotizen($erledigt=null, $projekt_kurzbz=null, $projektphase_id=null, $projekttask_id=null, $uid=null, $person_id=null, $prestudent_id=null, $bestellung_id=null, $user=null, $lehreinheit_id=null, $anrechnung_id=null)
{
$qry = "SELECT
count(*) as anzahl
FROM
public.tbl_notiz
LEFT JOIN public.tbl_notizzuordnung USING(notiz_id)
WHERE 1=1";
if(!is_null($erledigt))
{
if($erledigt)
$qry.=" AND erledigt=true";
else
$qry.=" AND erledigt=false";
}
if($projekt_kurzbz!='')
$qry.=" AND projekt_kurzbz=".$this->db_add_param($projekt_kurzbz);
if($projektphase_id!='')
$qry.=" AND projektphase_id=".$this->db_add_param($projektphase_id, FHC_INTEGER);
if($projekttask_id!='')
$qry.=" AND projekttask_id=".$this->db_add_param($projekttask_id, FHC_INTEGER);
if($uid!='')
$qry.=" AND uid=".$this->db_add_param($uid);
if($person_id!='')
$qry.=" AND person_id=".$this->db_add_param($person_id, FHC_INTEGER);
if($prestudent_id!='')
$qry.=" AND prestudent_id=".$this->db_add_param($prestudent_id, FHC_INTEGER);
if($bestellung_id!='')
$qry.=" AND bestellung_id=".$this->db_add_param($bestellung_id, FHC_INTEGER);
if($user!='')
$qry.=" AND (verfasser_uid=".$this->db_add_param($user)." OR bearbeiter_uid=".$this->db_add_param($user).")";
if($lehreinheit_id!='')
$qry.=" AND lehreinheit_id=".$this->db_add_param($lehreinheit_id, FHC_INTEGER);
if($anrechnung_id!='')
$qry.=" AND anrechnung_id=".$this->db_add_param($anrechnung_id, FHC_INTEGER);
if($result = $this->db_query($qry))
{
if($row = $this->db_fetch_object($result))
return $row->anzahl;
else
{
$this->errormsg='Fehler beim Laden der Daten';
return false;
}
}
else
{
$this->errormsg = 'Fehler beim Laden der Daten';
return false;
}
}
}
<?php
/* Copyright (C) 2011 FH Technikum-Wien
*
* 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.
*
* Authors: Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at> and
*/
require_once(dirname(__FILE__).'/basis_db.class.php');
require_once(dirname(__FILE__).'/dms.class.php');
class notiz extends basis_db
{
public $new;
public $result=array();
public $dokumente=array();
//Tabellenspalten
public $notiz_id;
public $titel;
public $text;
public $verfasser_uid;
public $bearbeiter_uid;
public $start;
public $ende;
public $erledigt;
public $insertamum;
public $insertvon;
public $updateamum;
public $updatevon;
public $projekt_kurzbz;
public $projektphase_id;
public $projekttask_id;
public $uid;
public $person_id;
public $prestudent_id;
public $bestellung_id;
public $lehreinheit_id;
public $anrechnung_id;
/**
* Konstruktor
* @param $notiz_id
*/
public function __construct($notiz_id = null)
{
parent::__construct();
if($notiz_id != null)
$this->load($notiz_id);
}
/**
* Laedt eine Notiz
* @param $notiz_id
* @return true wenn ok, false im Fehlerfall
*/
public function load($notiz_id)
{
if(!is_numeric($notiz_id))
{
$this->errormsg = 'NotizID ist ungueltig';
return false;
}
$qry = "SELECT * FROM public.tbl_notiz WHERE notiz_id=".$this->db_add_param($notiz_id, FHC_INTEGER);
if($this->db_query($qry))
{
if($row = $this->db_fetch_object())
{
$this->notiz_id=$row->notiz_id;
$this->titel=$row->titel;
$this->text=$row->text;
$this->verfasser_uid=$row->verfasser_uid;
$this->bearbeiter_uid=$row->bearbeiter_uid;
$this->start=$row->start;
$this->ende=$row->ende;
$this->erledigt=$this->db_parse_bool($row->erledigt);
$this->insertamum=$row->insertamum;
$this->insertvon=$row->insertvon;
$this->updateamum=$row->updateamum;
$this->updatevon=$row->updatevon;
$this->getDokumente($row->notiz_id);
return true;
}
else
{
$this->errormsg = 'Datensatz wurde nicht gefunden';
return false;
}
}
else
{
$this->errormsg = 'Fehler beim Laden der Daten';
return false;
}
}
/**
* Löscht eine Notiz
* @param $notiz_id
* @return true wenn ok, false im Fehlerfall
*/
public function delete($notiz_id)
{
if(!is_numeric($notiz_id))
{
$this->errormsg = 'NotizID ist ungueltig';
return false;
}
// Dokumente der Notiz löschen
$this->getDokumente($notiz_id);
if(!empty($this->dokumente))
{
$dms = new dms();
foreach($this->dokumente as $dms_id)
{
$dms->deleteDms($dms_id);
}
}
$qry = "Delete FROM public.tbl_notiz WHERE notiz_id=".$this->db_add_param($notiz_id, FHC_INTEGER);
if(!$this->db_query($qry))
{
$this->errormsg = 'Fehler beim Loeschen der Daten';
return false;
}
return true;
}
/**
* Prueft die Daten vor dem Speichern
* auf Gueltigkeit
*/
public function validate()
{
return true;
}
/**
* Speichert den aktuellen Datensatz in die Datenbank
* Wenn $neu auf true gesetzt ist wird ein neuer Datensatz angelegt
* andernfalls wird der Datensatz mit der ID in $notiz_id aktualisiert
* @return true wenn ok, false im Fehlerfall
*/
public function save($new=null)
{
if($new==null)
$new=$this->new;
if(!$this->validate())
return false;
if($new)
{
//Neuen Datensatz einfuegen
$qry='BEGIN;INSERT INTO public.tbl_notiz (titel, text, verfasser_uid,
bearbeiter_uid, start, ende, erledigt, insertamum, insertvon,
updateamum, updatevon) VALUES('.
$this->db_add_param($this->titel).', '.
$this->db_add_param($this->text).', '.
$this->db_add_param($this->verfasser_uid).','.
$this->db_add_param($this->bearbeiter_uid).','.
$this->db_add_param($this->start).','.
$this->db_add_param($this->ende).','.
$this->db_add_param($this->erledigt,FHC_BOOLEAN).','.
$this->db_add_param($this->insertamum).','.
$this->db_add_param($this->insertvon).','.
$this->db_add_param($this->updateamum).','.
$this->db_add_param($this->updatevon).');';
}
else
{
$qry='UPDATE public.tbl_notiz SET '.
'titel='.$this->db_add_param($this->titel).', '.
'text='.$this->db_add_param($this->text).', '.
'verfasser_uid='.$this->db_add_param($this->verfasser_uid).', '.
'bearbeiter_uid='.$this->db_add_param($this->bearbeiter_uid).', '.
'start='.$this->db_add_param($this->start).', '.
'ende='.$this->db_add_param($this->ende).', '.
'erledigt='.$this->db_add_param($this->erledigt,FHC_BOOLEAN).', '.
'updateamum='.$this->db_add_param($this->updateamum).', '.
'updatevon='.$this->db_add_param($this->updatevon).' '.
'WHERE notiz_id='.$this->db_add_param($this->notiz_id,FHC_INTEGER).';';
}
if($this->db_query($qry))
{
if($new)
{
$qry="SELECT currval('seq_notiz_notiz_id') as id;";
if($result = $this->db_query($qry))
{
if($row = $this->db_fetch_object($result))
{
$this->notiz_id = $row->id;
$this->db_query('COMMIT;');
return true;
}
else
{
$this->errormsg = 'Fehler beim Lesen der Sequence';
$this->db_query('ROLLBACK');
return false;
}
}
else
{
$this->errormsg = 'Fehler beim Lesen der Sequence';
$this->db_query('ROLLBACK');
return false;
}
}
return true;
}
else
{
$this->errormsg = 'Fehler beim Speichern des Datensatzes';
return false;
}
}
/**
* Speichert die Zuordnung einer Notiz
*
*/
public function saveZuordnung()
{
$qry = "INSERT INTO public.tbl_notizzuordnung(notiz_id, projekt_kurzbz, projektphase_id, projekttask_id,
uid, person_id, prestudent_id, bestellung_id, lehreinheit_id, anrechnung_id) VALUES(".
$this->db_add_param($this->notiz_id, FHC_INTEGER).','.
$this->db_add_param($this->projekt_kurzbz).','.
$this->db_add_param($this->projektphase_id, FHC_INTEGER).','.
$this->db_add_param($this->projekttask_id, FHC_INTEGER).','.
$this->db_add_param($this->uid).','.
$this->db_add_param($this->person_id, FHC_INTEGER).','.
$this->db_add_param($this->prestudent_id, FHC_INTEGER).','.
$this->db_add_param($this->bestellung_id, FHC_INTEGER).','.
$this->db_add_param($this->lehreinheit_id, FHC_INTEGER).','.
$this->db_add_param($this->anrechnung_id, FHC_INTEGER).');';
if($this->db_query($qry))
{
return true;
}
else
{
$this->errormsg = 'Fehler beim Speichern der Daten';
return false;
}
}
/**
* Speichert ein Dokument zur Notiz
* @param int $dms_id
* @return boolean
*/
public function saveDokument($dms_id)
{
$qry = "INSERT INTO public.tbl_notiz_dokument(notiz_id, dms_id) VALUES(".
$this->db_add_param($this->notiz_id, FHC_INTEGER).','.
$this->db_add_param($dms_id, FHC_INTEGER).');';
if($this->db_query($qry))
{
return true;
}
else
{
$this->errormsg = 'Fehler beim Speichern der Daten';
return false;
}
}
/**
*
* Laedt die Notizen
* @param $erledigt
* @param $projekt_kurzbz
* @param $projektphase_id
* @param $projekttask_id
* @param $uid
* @param $person_id
* @param $prestudent_id
* @param $bestellung_id
* @param $user
* @param $lehreinheit_id
* @param $anrechnung_id
* @return boolean
*/
public function getNotiz($erledigt=null, $projekt_kurzbz=null, $projektphase_id=null, $projekttask_id=null, $uid=null, $person_id=null, $prestudent_id=null, $bestellung_id=null, $user=null, $lehreinheit_id=null, $stundenplandev_id=null, $anrechnung_id=null)
{
$qry = "SELECT
*
FROM
public.tbl_notiz
LEFT JOIN public.tbl_notizzuordnung USING(notiz_id)
WHERE 1=1";
if(!is_null($erledigt))
{
if($erledigt)
$qry.=" AND erledigt=true";
else
$qry.=" AND erledigt=false";
}
if($projekt_kurzbz!='')
$qry.=" AND projekt_kurzbz=".$this->db_add_param($projekt_kurzbz);
if($projektphase_id!='')
$qry.=" AND projektphase_id=".$this->db_add_param($projektphase_id, FHC_INTEGER);
if($projekttask_id!='')
$qry.=" AND projekttask_id=".$this->db_add_param($projekttask_id, FHC_INTEGER);
if($uid!='')
$qry.=" AND uid=".$this->db_add_param($uid);
if($person_id!='')
$qry.=" AND person_id=".$this->db_add_param($person_id, FHC_INTEGER);
if($prestudent_id!='')
$qry.=" AND prestudent_id=".$this->db_add_param($prestudent_id, FHC_INTEGER);
if($bestellung_id!='')
$qry.=" AND bestellung_id=".$this->db_add_param($bestellung_id, FHC_INTEGER);
if($user!='')
$qry.=" AND (verfasser_uid=".$this->db_add_param($user)." OR bearbeiter_uid=".$this->db_add_param($user).")";
if($lehreinheit_id!='')
$qry.=" AND lehreinheit_id=".$this->db_add_param($lehreinheit_id, FHC_INTEGER);
if($anrechnung_id!='')
$qry.=" AND anrechnung_id=".$this->db_add_param($anrechnung_id, FHC_INTEGER);
$qry.=' ORDER BY start, ende, titel';
if($result = $this->db_query($qry))
{
while($row = $this->db_fetch_object($result))
{
$obj = new notiz();
$obj->notiz_id=$row->notiz_id;
$obj->titel=$row->titel;
$obj->text=$row->text;
$obj->verfasser_uid=$row->verfasser_uid;
$obj->bearbeiter_uid=$row->bearbeiter_uid;
$obj->start=$row->start;
$obj->ende=$row->ende;
$obj->erledigt=$this->db_parse_bool($row->erledigt);
$obj->insertamum=$row->insertamum;
$obj->insertvon=$row->insertvon;
$obj->updateamum=$row->updateamum;
$obj->updatevon=$row->updatevon;
$obj->getDokumente($row->notiz_id);
$this->result[] = $obj;
}
return true;
}
else
{
$this->errormsg = 'Fehler beim Laden der Daten';
return false;
}
}
/**
*
* Laedt die Notizen vom Bewerbungstool
* @param $person_id int
* @return boolean
*/
public function getBewerbungstoolNotizen($person_id)
{
$qry = 'SELECT
*
FROM
public.tbl_notiz
LEFT JOIN public.tbl_notizzuordnung USING(notiz_id)
WHERE person_id = ' . $this->db_add_param($person_id, FHC_INTEGER) .
' AND insertvon = ' . $this->db_add_param('Bewerbungstool') .
' ORDER BY notiz_id';
if($result = $this->db_query($qry))
{
while($row = $this->db_fetch_object($result))
{
$obj = new notiz();
$obj->notiz_id=$row->notiz_id;
$obj->titel=$row->titel;
$obj->text=$row->text;
$obj->verfasser_uid=$row->verfasser_uid;
$obj->bearbeiter_uid=$row->bearbeiter_uid;
$obj->start=$row->start;
$obj->ende=$row->ende;
$obj->erledigt=$this->db_parse_bool($row->erledigt);
$obj->insertamum=$row->insertamum;
$obj->insertvon=$row->insertvon;
$obj->updateamum=$row->updateamum;
$obj->updatevon=$row->updatevon;
$this->result[] = $obj;
}
return true;
}
else
{
$this->errormsg = 'Fehler beim Laden der Daten';
return false;
}
}
/**
*
* Laedt die Notizen
* @param $erledigt
* @param $projekt_kurzbz
* @param $projektphase_id
* @param $projekttask_id
* @param $uid
* @param $person_id
* @param $prestudent_id
* @param $bestellung_id
* @param $user
* @param $lehreinheit_id
* @param $anrechnung_id
* @return boolean
*/
public function getAnzahlNotizen($erledigt=null, $projekt_kurzbz=null, $projektphase_id=null, $projekttask_id=null, $uid=null, $person_id=null, $prestudent_id=null, $bestellung_id=null, $user=null, $lehreinheit_id=null, $anrechnung_id=null)
{
$qry = "SELECT
count(*) as anzahl
FROM
public.tbl_notiz
LEFT JOIN public.tbl_notizzuordnung USING(notiz_id)
WHERE 1=1";
if(!is_null($erledigt))
{
if($erledigt)
$qry.=" AND erledigt=true";
else
$qry.=" AND erledigt=false";
}
if($projekt_kurzbz!='')
$qry.=" AND projekt_kurzbz=".$this->db_add_param($projekt_kurzbz);
if($projektphase_id!='')
$qry.=" AND projektphase_id=".$this->db_add_param($projektphase_id, FHC_INTEGER);
if($projekttask_id!='')
$qry.=" AND projekttask_id=".$this->db_add_param($projekttask_id, FHC_INTEGER);
if($uid!='')
$qry.=" AND uid=".$this->db_add_param($uid);
if($person_id!='')
$qry.=" AND person_id=".$this->db_add_param($person_id, FHC_INTEGER);
if($prestudent_id!='')
$qry.=" AND prestudent_id=".$this->db_add_param($prestudent_id, FHC_INTEGER);
if($bestellung_id!='')
$qry.=" AND bestellung_id=".$this->db_add_param($bestellung_id, FHC_INTEGER);
if($user!='')
$qry.=" AND (verfasser_uid=".$this->db_add_param($user)." OR bearbeiter_uid=".$this->db_add_param($user).")";
if($lehreinheit_id!='')
$qry.=" AND lehreinheit_id=".$this->db_add_param($lehreinheit_id, FHC_INTEGER);
if($anrechnung_id!='')
$qry.=" AND anrechnung_id=".$this->db_add_param($anrechnung_id, FHC_INTEGER);
if($result = $this->db_query($qry))
{
if($row = $this->db_fetch_object($result))
return $row->anzahl;
else
{
$this->errormsg='Fehler beim Laden der Daten';
return false;
}
}
else
{
$this->errormsg = 'Fehler beim Laden der Daten';
return false;
}
}
/**
* Laedt die Dokumente der Notiz
* @return boolean
*/
public function getDokumente($notiz_id)
{
$qry = "SELECT dms_id FROM public.tbl_notiz_dokument WHERE notiz_id=".$this->db_add_param($notiz_id, FHC_INTEGER);
if($this->db_query($qry))
{
while($row = $this->db_fetch_object())
{
$this->dokumente[] = $row->dms_id;
}
return true;
}
else
{
$this->errormsg = 'Fehler beim Laden der Daten';
return false;
}
}
}
+19
View File
@@ -848,5 +848,24 @@ class person extends basis_db
}
public function getFullName($allFirstnames=FALSE)
{
$fullname = "";
if((!is_null($this->titelpre)) && ($this->titelpre!=""))
$fullname .= $this->titelpre." ";
$fullname .= $this->vorname." ";
if(($allFirstnames) && ($this->vornamen != "") && (!is_null($this->vornamen)))
$fullname .= $this->vornamen." ";
$fullname .= $this->nachname;
if((!is_null($this->titelpost)) && ($this->titelpost!=""))
$fullname .= " ".$this->titelpost;
return $fullname;
}
}
?>
+1 -1
View File
@@ -146,7 +146,7 @@ class preinteressent extends basis_db
$this->db_add_param($row->aufmerksamdurch_kurzbz).', '.
$this->db_add_param($row->firma_id, FHC_INTEGER).', '.
$this->db_add_param($row->erfassungsdatum).', '.
$this->db_add_param($row->einverstaendnis, FHC_BOOLEAN).', '.
$this->db_add_param($this->db_parse_bool($row->einverstaendnis), FHC_BOOLEAN).', '.
$this->db_add_param($row->absagedatum).', '.
$this->db_add_param($row->anmerkung).', '.
$this->db_add_param($row->insertamum).', '.
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -260,7 +260,7 @@ class studiengang extends basis_db
. 'USING (studienordnung_id) '
. 'WHERE aktiv '
. 'AND studiengang_kz = ' . $this->db_add_param($studiengang_kz, FHC_INTEGER)
. ' AND orgform_kurzbz NOT IN (' . $this->db_add_param('DDP') . ', ' . $this->db_add_param('DL') . ')';
. ' AND orgform_kurzbz!='. $this->db_add_param('DDP');
if($result = $this->db_query($qry))
{
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -25,7 +25,7 @@
*/
echo '
<table class="tabcontent">
<table class="tabcontent" id="lvmenue">
<tr>';
$eintraegeprozeile=0;
+4 -1
View File
@@ -2438,6 +2438,8 @@ class wochenplan extends basis_db
'Description'=>$description,
'dtstart'=>$start_date_time_ical,
'dtend'=>$end_date_time_ical,
'reservierung'=>$this->std_plan[$i][$j][$idx]->reservierung,
'reservierung_id'=>($this->std_plan[$i][$j][$idx]->reservierung?$this->std_plan[$i][$j][$idx]->stundenplan_id:''),
'updateamum'=>$this->std_plan[$i][$j][$idx]->updateamum,
'data'=>'BEGIN:VEVENT'.$this->crlf
.'UID:'.$UID.$this->crlf
@@ -2488,7 +2490,8 @@ class wochenplan extends basis_db
$lektor1 = $this->std_plan[$tag][$stunde][$idx]->lektor;
$lektor2 = $this->std_plan[$tag][$stunde][$idx1]->lektor;
if($unr1==$unr2 && ($ort1==$ort2 || $lektor1==$lektor2))
if($unr1==$unr2 && ($ort1==$ort2 || $lektor1==$lektor2)
&& !$this->std_plan[$tag][$stunde][$idx]->reservierung && !$this->std_plan[$tag][$stunde][$idx1]->reservierung)
return true;
else
return false;
+511 -466
View File
@@ -1,466 +1,511 @@
<?php
/* Copyright (C) 2007 Technikum-Wien
*
* 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.
*
* Authors: Christian Paminger <christian.paminger@technikum-wien.at>,
* Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at> and
* Rudolf Hangl <rudolf.hangl@technikum-wien.at>.
*/
/**
* Klasse Zeugnisnote
* @create 2007-06-06
*/
require_once(dirname(__FILE__).'/basis_db.class.php');
class zeugnisnote extends basis_db
{
public $new; // boolean
public $result=array();
//Tabellenspalten
public $lehrveranstaltung_id; /// serial
public $student_uid; // varchar(16)
public $studiensemester_kurzbz; // varchar(16)
public $note; // smalint
public $uebernahmedatum; // date
public $benotungsdatum; // date
public $updateamum; // timestamp
public $updatevon; // varchar(16)
public $insertamum; // timestamp
public $insertvon; // varchar(16)
public $ext_id; // bigint
public $bemerkung; // text
public $punkte; // numeric(8,4)
public $lehrveranstaltung_bezeichung;
public $note_bezeichnung;
public $zeugnis;
public $lv_lehrform_kurzbz;
/**
* Konstruktor
* Laedt optional eine Zeugnisnote
*
* @param $lehrveranstaltung_id
* @param $student_uid
* @param $studiensemester_kurzbz
*/
public function __construct($lehrveranstaltung_id=null, $student_uid=null, $studiensemester_kurzbz=null)
{
parent::__construct();
if($lehrveranstaltung_id!=null && $student_uid!=null && $studiensemester_kurzbz!=null)
$this->load($lehrveranstaltung_id, $student_uid, $studiensemester_kurzbz);
}
/**
* Laedt eine Zeugnisnote
*
* @param $lehrveranstaltung_id
* @param $student_uid
* @param $studiensemester_kurzbz
* @return true wenn ok, false im Fehlerfall
*/
public function load($lehrveranstaltung_id, $student_uid, $studiensemester_kurzbz)
{
if(!is_numeric($lehrveranstaltung_id))
{
$this->errormsg = 'Lehrveranstaltung_id ist ungueltig';
return false;
}
$qry = "SELECT
*
FROM
lehre.tbl_zeugnisnote
WHERE
lehrveranstaltung_id=".$this->db_add_param($lehrveranstaltung_id, FHC_INTEGER)."
AND student_uid=".$this->db_add_param($student_uid)."
AND studiensemester_kurzbz=".$this->db_add_param($studiensemester_kurzbz);
if($this->db_query($qry))
{
if($row = $this->db_fetch_object())
{
$this->lehrveranstaltung_id = $row->lehrveranstaltung_id;
$this->student_uid = $row->student_uid;
$this->studiensemester_kurzbz = $row->studiensemester_kurzbz;
$this->note = $row->note;
$this->uebernahmedatum = $row->uebernahmedatum;
$this->benotungsdatum = $row->benotungsdatum;
$this->updateamum = $row->updateamum;
$this->updatevon = $row->updatevon;
$this->insertamum = $row->insertamum;
$this->insertvon = $row->insertvon;
$this->ext_id = $row->ext_id;
$this->bemerkung = $row->bemerkung;
$this->punkte = $row->punkte;
return true;
}
else
{
$this->errormsg = 'Datensatz wurde nicht gefunden';
return false;
}
}
else
{
$this->errormsg = 'Fehler beim Laden der Daten';
return false;
}
}
/**
* Prueft die Daten vor dem Speichern
* auf Gueltigkeit
*/
protected function validate()
{
if(!is_numeric($this->lehrveranstaltung_id))
{
$this->errormsg = 'Lehrveranstaltung_id ist ungueltig';
return false;
}
if($this->student_uid=='')
{
$this->errormsg = 'UID muss angegeben werden';
return false;
}
if($this->studiensemester_kurzbz=='')
{
$this->errormsg = 'Studiensemester muss angegeben werden';
return false;
}
if($this->note!='' && !is_numeric($this->note))
{
$this->errormsg = 'Note ist ungueltig';
return false;
}
if($this->uebernahmedatum!='' && !mb_ereg("([0-9]{4})-([0-9]{2})-([0-9]{2})",$this->uebernahmedatum))
{
$this->errormsg = 'Uebernahmedatum ist ungueltig';
return false;
}
if($this->benotungsdatum!='' && !mb_ereg("([0-9]{4})-([0-9]{2})-([0-9]{2})",$this->benotungsdatum))
{
$this->errormsg = 'Benotungsdatum ist ungueltig';
return false;
}
return true;
}
/**
* Speichert den aktuellen Datensatz in die Datenbank
* Wenn $neu auf true gesetzt ist wird ein neuer Datensatz angelegt
* andernfalls wird der Datensatz mit der ID in $betriebsmittel_id aktualisiert
* @return true wenn ok, false im Fehlerfall
*/
public function save($new=null)
{
if($new==null)
$new=$this->new;
if(!$this->validate())
return false;
if($new)
{
//Neuen Datensatz einfuegen
$qry='INSERT INTO lehre.tbl_zeugnisnote (lehrveranstaltung_id, student_uid,
studiensemester_kurzbz, note, uebernahmedatum, benotungsdatum, bemerkung,
updateamum, updatevon, insertamum, insertvon, ext_id, punkte) VALUES('.
$this->db_add_param($this->lehrveranstaltung_id, FHC_INTEGER).', '.
$this->db_add_param($this->student_uid).', '.
$this->db_add_param($this->studiensemester_kurzbz).', '.
$this->db_add_param($this->note).', '.
$this->db_add_param($this->uebernahmedatum).', '.
$this->db_add_param($this->benotungsdatum).', '.
$this->db_add_param($this->bemerkung).', '.
$this->db_add_param($this->updateamum).', '.
$this->db_add_param($this->updatevon).', '.
$this->db_add_param($this->insertamum).', '.
$this->db_add_param($this->insertvon).', '.
$this->db_add_param($this->ext_id).','.
$this->db_add_param($this->punkte).');';
}
else
{
$qry='UPDATE lehre.tbl_zeugnisnote SET '.
'note='.$this->db_add_param($this->note).', '.
'punkte='.$this->db_add_param($this->punkte).','.
'uebernahmedatum='.$this->db_add_param($this->uebernahmedatum).', '.
'benotungsdatum='.$this->db_add_param($this->benotungsdatum).', '.
'bemerkung='.$this->db_add_param($this->bemerkung).', '.
'updateamum= '.$this->db_add_param($this->updateamum).', '.
'updatevon='.$this->db_add_param($this->updatevon).' '.
'WHERE lehrveranstaltung_id='.$this->db_add_param($this->lehrveranstaltung_id, FHC_INTEGER).' '.
'AND student_uid='.$this->db_add_param($this->student_uid).' '.
'AND studiensemester_kurzbz='.$this->db_add_param($this->studiensemester_kurzbz).';';
}
if($this->db_query($qry))
{
return true;
}
else
{
$this->errormsg='Fehler beim Speichern der Zeugnisnote';
return false;
}
}
/**
* Loescht den Datenensatz mit der ID die uebergeben wird
* @param $lehrveranstaltung_id
* $student_uid
* $studiensemester_kurzbz
* @return true wenn ok, false im Fehlerfall
*/
public function delete($lehrveranstaltung_id, $student_uid, $studiensemester_kurzbz)
{
$qry = "DELETE FROM lehre.tbl_zeugnisnote WHERE
lehrveranstaltung_id=".$this->db_add_param($lehrveranstaltung_id, FHC_INTEGER, false)." AND
student_uid=".$this->db_add_param($student_uid)." AND
studiensemester_kurzbz=".$this->db_add_param($studiensemester_kurzbz);
if($this->db_query($qry))
return true;
else
{
$this->errormsg = 'Fehler beim Loeschen der Daten';
return false;
}
}
/**
* Laedt die Noten
* @param $lehrveranstaltung_id
* $student_uid
* $studiensemester_kurzbz
* @return true wenn ok, false wenn Fehler
*/
public function getZeugnisnoten($lehrveranstaltung_id, $student_uid, $studiensemester_kurzbz)
{
$where='';
if($lehrveranstaltung_id!=null)
$where.=" AND vw_student_lehrveranstaltung.lehrveranstaltung_id=".$this->db_add_param($lehrveranstaltung_id);
if($student_uid!=null)
$where.=" AND uid=".$this->db_add_param($student_uid);
if($studiensemester_kurzbz!=null)
$where.=" AND vw_student_lehrveranstaltung.studiensemester_kurzbz=".$this->db_add_param($studiensemester_kurzbz);
$where2='';
if($lehrveranstaltung_id!=null)
$where2.=" AND lehrveranstaltung_id=".$this->db_add_param($lehrveranstaltung_id, FHC_INTEGER);
if($student_uid!=null)
$where2.=" AND student_uid=".$this->db_add_param($student_uid);
if($studiensemester_kurzbz!=null)
$where2.=" AND studiensemester_kurzbz=".$this->db_add_param($studiensemester_kurzbz);
$qry = "SELECT vw_student_lehrveranstaltung.lehrveranstaltung_id, uid,
vw_student_lehrveranstaltung.studiensemester_kurzbz, note, punkte, uebernahmedatum, benotungsdatum,
vw_student_lehrveranstaltung.ects, vw_student_lehrveranstaltung.semesterstunden,
tbl_zeugnisnote.updateamum, tbl_zeugnisnote.updatevon, tbl_zeugnisnote.insertamum,
tbl_zeugnisnote.insertvon, tbl_zeugnisnote.ext_id,
vw_student_lehrveranstaltung.bezeichnung as lehrveranstaltung_bezeichnung,
vw_student_lehrveranstaltung.bezeichnung_english as lehrveranstaltung_bezeichnung_english,
tbl_note.bezeichnung as note_bezeichnung,
tbl_zeugnisnote.bemerkung as bemerkung,
vw_student_lehrveranstaltung.sort,
vw_student_lehrveranstaltung.zeugnis,
vw_student_lehrveranstaltung.studiengang_kz,
vw_student_lehrveranstaltung.lv_lehrform_kurzbz
FROM
(
campus.vw_student_lehrveranstaltung LEFT JOIN lehre.tbl_zeugnisnote
ON(uid=student_uid
AND vw_student_lehrveranstaltung.studiensemester_kurzbz=tbl_zeugnisnote.studiensemester_kurzbz
AND vw_student_lehrveranstaltung.lehrveranstaltung_id=tbl_zeugnisnote.lehrveranstaltung_id
)
) LEFT JOIN lehre.tbl_note USING(note)
WHERE true $where
UNION
SELECT lehre.tbl_lehrveranstaltung.lehrveranstaltung_id,student_uid AS uid,studiensemester_kurzbz, note, punkte,
uebernahmedatum, benotungsdatum,lehre.tbl_lehrveranstaltung.ects,lehre.tbl_lehrveranstaltung.semesterstunden, tbl_zeugnisnote.updateamum, tbl_zeugnisnote.updatevon, tbl_zeugnisnote.insertamum,
tbl_zeugnisnote.insertvon, tbl_zeugnisnote.ext_id, lehre.tbl_lehrveranstaltung.bezeichnung as lehrveranstaltung_bezeichnung, lehre.tbl_lehrveranstaltung.bezeichnung_english as lehrveranstaltung_bezeichnung_english,
tbl_note.bezeichnung as note_bezeichnung, tbl_zeugnisnote.bemerkung as bemerkung, tbl_lehrveranstaltung.sort, tbl_lehrveranstaltung.zeugnis, tbl_lehrveranstaltung.studiengang_kz,
tbl_lehrveranstaltung.lehrform_kurzbz as lv_lehrform_kurzbz
FROM
lehre.tbl_zeugnisnote
JOIN lehre.tbl_lehrveranstaltung USING (lehrveranstaltung_id)
JOIN lehre.tbl_note USING(note)
WHERE true $where2
ORDER BY sort";
if($this->db_query($qry))
{
while($row = $this->db_fetch_object())
{
$obj = new zeugnisnote();
$obj->lehrveranstaltung_id = $row->lehrveranstaltung_id;
$obj->student_uid = $row->uid;
$obj->studiensemester_kurzbz = $row->studiensemester_kurzbz;
$obj->note = $row->note;
$obj->punkte = $row->punkte;
$obj->uebernahmedatum = $row->uebernahmedatum;
$obj->benotungsdatum = $row->benotungsdatum;
$obj->updateamum = $row->updateamum;
$obj->updatevon = $row->updatevon;
$obj->insertamum = $row->insertamum;
$obj->insertvon = $row->insertvon;
$obj->ext_id = $row->ext_id;
$obj->note_bezeichnung = $row->note_bezeichnung;
$obj->lehrveranstaltung_bezeichnung = $row->lehrveranstaltung_bezeichnung;
$obj->lehrveranstaltung_bezeichnung_english = $row->lehrveranstaltung_bezeichnung_english;
$obj->bemerkung = $row->bemerkung;
$obj->semesterstunden = $row->semesterstunden;
$obj->ects = $row->ects;
$obj->sort = $row->sort;
$obj->studiengang_kz = $row->studiengang_kz;
$obj->zeugnis = $this->db_parse_bool($row->zeugnis);
$obj->lv_lehrform_kurzbz = $row->lv_lehrform_kurzbz;
$this->result[] = $obj;
}
return true;
}
else
{
$this->errormsg = 'Fehler beim Laden der Daten';
return false;
}
}
/**
* Laedt die Noten Studienjahr
* @param $lehrveranstaltung_id
* $student_uid
* $studiensemester_kurzbz
* @return true wenn ok, false wenn Fehler
*/
public function getZeugnisnotenStudienplan($student_uid, $studiensemester_arr, $studienplan_id)
{
$stsem = $this->db_implode4SQL($studiensemester_arr);
/*
* Alle Lehrveranstaltungen holen zu denen eine Note eingetragen ist und alle zu denen der Studierende zugeteilt ist.
* Danach wird im Studienplan gesucht und eventuell darbueberliegenden Module zusaetzlich geladen
*/
$qry = "
WITH RECURSIVE data(lvid, studienplan_lehrveranstaltung_id, studienplan_lehrveranstaltung_id_parent) as
(
SELECT
vw_student_lehrveranstaltung.lehrveranstaltung_id,
tbl_studienplan_lehrveranstaltung.studienplan_lehrveranstaltung_id,
tbl_studienplan_lehrveranstaltung.studienplan_lehrveranstaltung_id_parent
FROM
(
campus.vw_student_lehrveranstaltung LEFT JOIN lehre.tbl_zeugnisnote
ON(uid=student_uid
AND vw_student_lehrveranstaltung.studiensemester_kurzbz=tbl_zeugnisnote.studiensemester_kurzbz
AND vw_student_lehrveranstaltung.lehrveranstaltung_id=tbl_zeugnisnote.lehrveranstaltung_id
)
)
LEFT JOIN lehre.tbl_note USING(note)
LEFT JOIN lehre.tbl_studienplan_lehrveranstaltung ON(vw_student_lehrveranstaltung.lehrveranstaltung_id=tbl_studienplan_lehrveranstaltung.lehrveranstaltung_id)
WHERE
uid=".$this->db_add_param($student_uid)."
AND vw_student_lehrveranstaltung.studiensemester_kurzbz IN(".$stsem.")
AND tbl_studienplan_lehrveranstaltung.studienplan_id=".$this->db_add_param($studienplan_id, FHC_INTEGER)."
UNION
SELECT lehre.tbl_lehrveranstaltung.lehrveranstaltung_id,
tbl_studienplan_lehrveranstaltung.studienplan_lehrveranstaltung_id,
tbl_studienplan_lehrveranstaltung.studienplan_lehrveranstaltung_id_parent
FROM
lehre.tbl_zeugnisnote
JOIN lehre.tbl_lehrveranstaltung USING (lehrveranstaltung_id)
JOIN lehre.tbl_note USING(note)
LEFT JOIN lehre.tbl_studienplan_lehrveranstaltung USING(lehrveranstaltung_id)
WHERE
student_uid=".$this->db_add_param($student_uid)."
AND studiensemester_kurzbz IN(".$stsem.")
AND tbl_studienplan_lehrveranstaltung.studienplan_id=".$this->db_add_param($studienplan_id, FHC_INTEGER)."
UNION ALL
SELECT stpllv.lehrveranstaltung_id, stpllv.studienplan_lehrveranstaltung_id, stpllv.studienplan_lehrveranstaltung_id_parent
FROM lehre.tbl_studienplan_lehrveranstaltung stpllv, data
WHERE stpllv.studienplan_lehrveranstaltung_id=data.studienplan_lehrveranstaltung_id_parent
)
SELECT
tbl_studienplan_lehrveranstaltung.studienplan_lehrveranstaltung_id,
tbl_studienplan_lehrveranstaltung.studienplan_lehrveranstaltung_id_parent, tbl_studienplan_lehrveranstaltung.semester,
tbl_lehrveranstaltung.lehrveranstaltung_id,tbl_lehrveranstaltung.bezeichnung as lehrveranstaltung_bezeichnung, tbl_lehrveranstaltung.bezeichnung_english as lehrveranstaltung_bezeichnung_english,
tbl_lehrveranstaltung.semesterstunden, tbl_lehrveranstaltung.ects, tbl_lehrveranstaltung.sort, tbl_lehrveranstaltung.studiengang_kz, tbl_lehrveranstaltung.zeugnis,
tbl_lehrveranstaltung.lehrform_kurzbz as lv_lehrform_kurzbz,
tbl_zeugnisnote.studiensemester_kurzbz, tbl_zeugnisnote.uebernahmedatum, tbl_zeugnisnote.benotungsdatum,
tbl_zeugnisnote.note, tbl_zeugnisnote.updateamum, tbl_zeugnisnote.updatevon, tbl_zeugnisnote.insertamum, tbl_zeugnisnote.insertvon,
tbl_note.bezeichnung as note_bezeichnung, tbl_zeugnisnote.bemerkung, tbl_lehrveranstaltung.lvnr, tbl_studienplan_lehrveranstaltung.sort as studienplan_lehrveranstaltung_sort
FROM
lehre.tbl_lehrveranstaltung
LEFT JOIN lehre.tbl_zeugnisnote ON(tbl_lehrveranstaltung.lehrveranstaltung_id=tbl_zeugnisnote.lehrveranstaltung_id AND tbl_zeugnisnote.student_uid=".$this->db_add_param($student_uid)." AND tbl_zeugnisnote.studiensemester_kurzbz IN(".$stsem."))
LEFT JOIN lehre.tbl_studienplan_lehrveranstaltung ON(tbl_lehrveranstaltung.lehrveranstaltung_id=tbl_studienplan_lehrveranstaltung.lehrveranstaltung_id AND tbl_studienplan_lehrveranstaltung.studienplan_id=".$this->db_add_param($studienplan_id).")
LEFT JOIN lehre.tbl_note USING(note)
WHERE
(tbl_zeugnisnote.studiensemester_kurzbz IN(".$stsem.") OR tbl_zeugnisnote.studiensemester_kurzbz is null)
AND tbl_lehrveranstaltung.lehrveranstaltung_id in(SELECT lvid FROM data)
ORDER BY studienplan_lehrveranstaltung_id_parent desc, studienplan_lehrveranstaltung_id
";
if($this->db_query($qry))
{
while($row = $this->db_fetch_object())
{
$obj = new zeugnisnote();
$obj->lehrveranstaltung_id = $row->lehrveranstaltung_id;
$obj->student_uid = $student_uid;
$obj->studiensemester_kurzbz = $row->studiensemester_kurzbz;
$obj->note = $row->note;
$obj->uebernahmedatum = $row->uebernahmedatum;
$obj->benotungsdatum = $row->benotungsdatum;
$obj->updateamum = $row->updateamum;
$obj->updatevon = $row->updatevon;
$obj->insertamum = $row->insertamum;
$obj->insertvon = $row->insertvon;
$obj->note_bezeichnung = $row->note_bezeichnung;
$obj->lehrveranstaltung_bezeichnung = $row->lehrveranstaltung_bezeichnung;
$obj->lehrveranstaltung_bezeichnung_english = $row->lehrveranstaltung_bezeichnung_english;
$obj->bemerkung = $row->bemerkung;
$obj->semesterstunden = $row->semesterstunden;
$obj->ects = $row->ects;
$obj->sort = $row->sort;
$obj->studiengang_kz = $row->studiengang_kz;
$obj->zeugnis = $this->db_parse_bool($row->zeugnis);
$obj->lv_lehrform_kurzbz = $row->lv_lehrform_kurzbz;
$obj->lehrveranstaltung_lvnr = $row->lvnr;
$obj->studienplan_lehrveranstaltung_id = $row->studienplan_lehrveranstaltung_id;
$obj->studienplan_lehrveranstaltung_id_parent = $row->studienplan_lehrveranstaltung_id_parent;
$obj->studienplan_lehrveranstaltung_semester = $row->semester;
$obj->studienplan_lehrveranstaltung_sort = $row->studienplan_lehrveranstaltung_sort;
$this->result[] = $obj;
}
return true;
}
else
{
$this->errormsg = 'Fehler beim Laden der Daten';
return false;
}
}
}
?>
<?php
/* Copyright (C) 2007 Technikum-Wien
*
* 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.
*
* Authors: Christian Paminger <christian.paminger@technikum-wien.at>,
* Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at> and
* Rudolf Hangl <rudolf.hangl@technikum-wien.at>.
*/
/**
* Klasse Zeugnisnote
* @create 2007-06-06
*/
require_once(dirname(__FILE__).'/basis_db.class.php');
class zeugnisnote extends basis_db
{
public $new; // boolean
public $result=array();
//Tabellenspalten
public $lehrveranstaltung_id; /// serial
public $student_uid; // varchar(16)
public $studiensemester_kurzbz; // varchar(16)
public $note; // smalint
public $uebernahmedatum; // date
public $benotungsdatum; // date
public $updateamum; // timestamp
public $updatevon; // varchar(16)
public $insertamum; // timestamp
public $insertvon; // varchar(16)
public $ext_id; // bigint
public $bemerkung; // text
public $punkte; // numeric(8,4)
public $lehrveranstaltung_bezeichung;
public $note_bezeichnung;
public $zeugnis;
public $lv_lehrform_kurzbz;
/**
* Konstruktor
* Laedt optional eine Zeugnisnote
*
* @param $lehrveranstaltung_id
* @param $student_uid
* @param $studiensemester_kurzbz
*/
public function __construct($lehrveranstaltung_id=null, $student_uid=null, $studiensemester_kurzbz=null)
{
parent::__construct();
if($lehrveranstaltung_id!=null && $student_uid!=null && $studiensemester_kurzbz!=null)
$this->load($lehrveranstaltung_id, $student_uid, $studiensemester_kurzbz);
}
/**
* Laedt eine Zeugnisnote
*
* @param $lehrveranstaltung_id
* @param $student_uid
* @param $studiensemester_kurzbz
* @return true wenn ok, false im Fehlerfall
*/
public function load($lehrveranstaltung_id, $student_uid, $studiensemester_kurzbz)
{
if(!is_numeric($lehrveranstaltung_id))
{
$this->errormsg = 'Lehrveranstaltung_id ist ungueltig';
return false;
}
$qry = "SELECT
*
FROM
lehre.tbl_zeugnisnote
WHERE
lehrveranstaltung_id=".$this->db_add_param($lehrveranstaltung_id, FHC_INTEGER)."
AND student_uid=".$this->db_add_param($student_uid)."
AND studiensemester_kurzbz=".$this->db_add_param($studiensemester_kurzbz);
if($this->db_query($qry))
{
if($row = $this->db_fetch_object())
{
$this->lehrveranstaltung_id = $row->lehrveranstaltung_id;
$this->student_uid = $row->student_uid;
$this->studiensemester_kurzbz = $row->studiensemester_kurzbz;
$this->note = $row->note;
$this->uebernahmedatum = $row->uebernahmedatum;
$this->benotungsdatum = $row->benotungsdatum;
$this->updateamum = $row->updateamum;
$this->updatevon = $row->updatevon;
$this->insertamum = $row->insertamum;
$this->insertvon = $row->insertvon;
$this->ext_id = $row->ext_id;
$this->bemerkung = $row->bemerkung;
$this->punkte = $row->punkte;
return true;
}
else
{
$this->errormsg = 'Datensatz wurde nicht gefunden';
return false;
}
}
else
{
$this->errormsg = 'Fehler beim Laden der Daten';
return false;
}
}
/**
* Prueft die Daten vor dem Speichern
* auf Gueltigkeit
*/
protected function validate()
{
if(!is_numeric($this->lehrveranstaltung_id))
{
$this->errormsg = 'Lehrveranstaltung_id ist ungueltig';
return false;
}
if($this->student_uid=='')
{
$this->errormsg = 'UID muss angegeben werden';
return false;
}
if($this->studiensemester_kurzbz=='')
{
$this->errormsg = 'Studiensemester muss angegeben werden';
return false;
}
if($this->note!='' && !is_numeric($this->note))
{
$this->errormsg = 'Note ist ungueltig';
return false;
}
if($this->uebernahmedatum!='' && !mb_ereg("([0-9]{4})-([0-9]{2})-([0-9]{2})",$this->uebernahmedatum))
{
$this->errormsg = 'Uebernahmedatum ist ungueltig';
return false;
}
if($this->benotungsdatum!='' && !mb_ereg("([0-9]{4})-([0-9]{2})-([0-9]{2})",$this->benotungsdatum))
{
$this->errormsg = 'Benotungsdatum ist ungueltig';
return false;
}
return true;
}
/**
* Speichert den aktuellen Datensatz in die Datenbank
* Wenn $neu auf true gesetzt ist wird ein neuer Datensatz angelegt
* andernfalls wird der Datensatz mit der ID in $betriebsmittel_id aktualisiert
* @return true wenn ok, false im Fehlerfall
*/
public function save($new=null)
{
if($new==null)
$new=$this->new;
if(!$this->validate())
return false;
if($new)
{
//Neuen Datensatz einfuegen
$qry='INSERT INTO lehre.tbl_zeugnisnote (lehrveranstaltung_id, student_uid,
studiensemester_kurzbz, note, uebernahmedatum, benotungsdatum, bemerkung,
updateamum, updatevon, insertamum, insertvon, ext_id, punkte) VALUES('.
$this->db_add_param($this->lehrveranstaltung_id, FHC_INTEGER).', '.
$this->db_add_param($this->student_uid).', '.
$this->db_add_param($this->studiensemester_kurzbz).', '.
$this->db_add_param($this->note).', '.
$this->db_add_param($this->uebernahmedatum).', '.
$this->db_add_param($this->benotungsdatum).', '.
$this->db_add_param($this->bemerkung).', '.
$this->db_add_param($this->updateamum).', '.
$this->db_add_param($this->updatevon).', '.
$this->db_add_param($this->insertamum).', '.
$this->db_add_param($this->insertvon).', '.
$this->db_add_param($this->ext_id).','.
$this->db_add_param($this->punkte).');';
}
else
{
$qry='UPDATE lehre.tbl_zeugnisnote SET '.
'note='.$this->db_add_param($this->note).', '.
'punkte='.$this->db_add_param($this->punkte).','.
'uebernahmedatum='.$this->db_add_param($this->uebernahmedatum).', '.
'benotungsdatum='.$this->db_add_param($this->benotungsdatum).', '.
'bemerkung='.$this->db_add_param($this->bemerkung).', '.
'updateamum= '.$this->db_add_param($this->updateamum).', '.
'updatevon='.$this->db_add_param($this->updatevon).' '.
'WHERE lehrveranstaltung_id='.$this->db_add_param($this->lehrveranstaltung_id, FHC_INTEGER).' '.
'AND student_uid='.$this->db_add_param($this->student_uid).' '.
'AND studiensemester_kurzbz='.$this->db_add_param($this->studiensemester_kurzbz).';';
}
if($this->db_query($qry))
{
return true;
}
else
{
$this->errormsg='Fehler beim Speichern der Zeugnisnote';
return false;
}
}
/**
* Loescht den Datenensatz mit der ID die uebergeben wird
* @param $lehrveranstaltung_id
* $student_uid
* $studiensemester_kurzbz
* @return true wenn ok, false im Fehlerfall
*/
public function delete($lehrveranstaltung_id, $student_uid, $studiensemester_kurzbz)
{
$qry = "DELETE FROM lehre.tbl_zeugnisnote WHERE
lehrveranstaltung_id=".$this->db_add_param($lehrveranstaltung_id, FHC_INTEGER, false)." AND
student_uid=".$this->db_add_param($student_uid)." AND
studiensemester_kurzbz=".$this->db_add_param($studiensemester_kurzbz);
if($this->db_query($qry))
return true;
else
{
$this->errormsg = 'Fehler beim Loeschen der Daten';
return false;
}
}
/**
* Laedt die Noten
* @param $lehrveranstaltung_id
* $student_uid
* $studiensemester_kurzbz
* @return true wenn ok, false wenn Fehler
*/
public function getZeugnisnoten($lehrveranstaltung_id, $student_uid, $studiensemester_kurzbz)
{
$where='';
if($lehrveranstaltung_id!=null)
$where.=" AND vw_student_lehrveranstaltung.lehrveranstaltung_id=".$this->db_add_param($lehrveranstaltung_id);
if($student_uid!=null)
$where.=" AND uid=".$this->db_add_param($student_uid);
if($studiensemester_kurzbz!=null)
$where.=" AND vw_student_lehrveranstaltung.studiensemester_kurzbz=".$this->db_add_param($studiensemester_kurzbz);
$where2='';
if($lehrveranstaltung_id!=null)
$where2.=" AND lehrveranstaltung_id=".$this->db_add_param($lehrveranstaltung_id, FHC_INTEGER);
if($student_uid!=null)
$where2.=" AND student_uid=".$this->db_add_param($student_uid);
if($studiensemester_kurzbz!=null)
$where2.=" AND studiensemester_kurzbz=".$this->db_add_param($studiensemester_kurzbz);
$qry = "SELECT vw_student_lehrveranstaltung.lehrveranstaltung_id, uid,
vw_student_lehrveranstaltung.studiensemester_kurzbz, note, punkte, uebernahmedatum, benotungsdatum,
vw_student_lehrveranstaltung.ects, vw_student_lehrveranstaltung.semesterstunden,
tbl_zeugnisnote.updateamum, tbl_zeugnisnote.updatevon, tbl_zeugnisnote.insertamum,
tbl_zeugnisnote.insertvon, tbl_zeugnisnote.ext_id,
vw_student_lehrveranstaltung.bezeichnung as lehrveranstaltung_bezeichnung,
vw_student_lehrveranstaltung.bezeichnung_english as lehrveranstaltung_bezeichnung_english,
tbl_note.bezeichnung as note_bezeichnung,
tbl_zeugnisnote.bemerkung as bemerkung,
vw_student_lehrveranstaltung.sort,
vw_student_lehrveranstaltung.zeugnis,
vw_student_lehrveranstaltung.studiengang_kz,
vw_student_lehrveranstaltung.lv_lehrform_kurzbz
FROM
(
campus.vw_student_lehrveranstaltung LEFT JOIN lehre.tbl_zeugnisnote
ON(uid=student_uid
AND vw_student_lehrveranstaltung.studiensemester_kurzbz=tbl_zeugnisnote.studiensemester_kurzbz
AND vw_student_lehrveranstaltung.lehrveranstaltung_id=tbl_zeugnisnote.lehrveranstaltung_id
)
) LEFT JOIN lehre.tbl_note USING(note)
WHERE true $where
UNION
SELECT lehre.tbl_lehrveranstaltung.lehrveranstaltung_id,student_uid AS uid,studiensemester_kurzbz, note, punkte,
uebernahmedatum, benotungsdatum,lehre.tbl_lehrveranstaltung.ects,lehre.tbl_lehrveranstaltung.semesterstunden, tbl_zeugnisnote.updateamum, tbl_zeugnisnote.updatevon, tbl_zeugnisnote.insertamum,
tbl_zeugnisnote.insertvon, tbl_zeugnisnote.ext_id, lehre.tbl_lehrveranstaltung.bezeichnung as lehrveranstaltung_bezeichnung, lehre.tbl_lehrveranstaltung.bezeichnung_english as lehrveranstaltung_bezeichnung_english,
tbl_note.bezeichnung as note_bezeichnung, tbl_zeugnisnote.bemerkung as bemerkung, tbl_lehrveranstaltung.sort, tbl_lehrveranstaltung.zeugnis, tbl_lehrveranstaltung.studiengang_kz,
tbl_lehrveranstaltung.lehrform_kurzbz as lv_lehrform_kurzbz
FROM
lehre.tbl_zeugnisnote
JOIN lehre.tbl_lehrveranstaltung USING (lehrveranstaltung_id)
JOIN lehre.tbl_note USING(note)
WHERE true $where2
ORDER BY sort";
if($this->db_query($qry))
{
while($row = $this->db_fetch_object())
{
$obj = new zeugnisnote();
$obj->lehrveranstaltung_id = $row->lehrveranstaltung_id;
$obj->student_uid = $row->uid;
$obj->studiensemester_kurzbz = $row->studiensemester_kurzbz;
$obj->note = $row->note;
$obj->punkte = $row->punkte;
$obj->uebernahmedatum = $row->uebernahmedatum;
$obj->benotungsdatum = $row->benotungsdatum;
$obj->updateamum = $row->updateamum;
$obj->updatevon = $row->updatevon;
$obj->insertamum = $row->insertamum;
$obj->insertvon = $row->insertvon;
$obj->ext_id = $row->ext_id;
$obj->note_bezeichnung = $row->note_bezeichnung;
$obj->lehrveranstaltung_bezeichnung = $row->lehrveranstaltung_bezeichnung;
$obj->lehrveranstaltung_bezeichnung_english = $row->lehrveranstaltung_bezeichnung_english;
$obj->bemerkung = $row->bemerkung;
$obj->semesterstunden = $row->semesterstunden;
$obj->ects = $row->ects;
$obj->sort = $row->sort;
$obj->studiengang_kz = $row->studiengang_kz;
$obj->zeugnis = $this->db_parse_bool($row->zeugnis);
$obj->lv_lehrform_kurzbz = $row->lv_lehrform_kurzbz;
$this->result[] = $obj;
}
return true;
}
else
{
$this->errormsg = 'Fehler beim Laden der Daten';
return false;
}
}
/**
* Laedt die Noten Studienjahr
* @param $lehrveranstaltung_id
* $student_uid
* $studiensemester_kurzbz
* @return true wenn ok, false wenn Fehler
*/
public function getZeugnisnotenStudienplan($student_uid, $studiensemester_arr, $studienplan_id)
{
$stsem = $this->db_implode4SQL($studiensemester_arr);
/*
* Alle Lehrveranstaltungen holen zu denen eine Note eingetragen ist und alle zu denen der Studierende zugeteilt ist.
* Danach wird im Studienplan gesucht und eventuell darbueberliegenden Module zusaetzlich geladen
*/
$qry = "
WITH RECURSIVE data(lvid, studienplan_lehrveranstaltung_id, studienplan_lehrveranstaltung_id_parent) as
(
SELECT
vw_student_lehrveranstaltung.lehrveranstaltung_id,
tbl_studienplan_lehrveranstaltung.studienplan_lehrveranstaltung_id,
tbl_studienplan_lehrveranstaltung.studienplan_lehrveranstaltung_id_parent
FROM
(
campus.vw_student_lehrveranstaltung LEFT JOIN lehre.tbl_zeugnisnote
ON(uid=student_uid
AND vw_student_lehrveranstaltung.studiensemester_kurzbz=tbl_zeugnisnote.studiensemester_kurzbz
AND vw_student_lehrveranstaltung.lehrveranstaltung_id=tbl_zeugnisnote.lehrveranstaltung_id
)
)
LEFT JOIN lehre.tbl_note USING(note)
LEFT JOIN lehre.tbl_studienplan_lehrveranstaltung ON(vw_student_lehrveranstaltung.lehrveranstaltung_id=tbl_studienplan_lehrveranstaltung.lehrveranstaltung_id)
WHERE
uid=".$this->db_add_param($student_uid)."
AND vw_student_lehrveranstaltung.studiensemester_kurzbz IN(".$stsem.")
AND tbl_studienplan_lehrveranstaltung.studienplan_id=".$this->db_add_param($studienplan_id, FHC_INTEGER)."
UNION
SELECT lehre.tbl_lehrveranstaltung.lehrveranstaltung_id,
tbl_studienplan_lehrveranstaltung.studienplan_lehrveranstaltung_id,
tbl_studienplan_lehrveranstaltung.studienplan_lehrveranstaltung_id_parent
FROM
lehre.tbl_zeugnisnote
JOIN lehre.tbl_lehrveranstaltung USING (lehrveranstaltung_id)
JOIN lehre.tbl_note USING(note)
LEFT JOIN lehre.tbl_studienplan_lehrveranstaltung USING(lehrveranstaltung_id)
WHERE
student_uid=".$this->db_add_param($student_uid)."
AND studiensemester_kurzbz IN(".$stsem.")
AND tbl_studienplan_lehrveranstaltung.studienplan_id=".$this->db_add_param($studienplan_id, FHC_INTEGER)."
UNION ALL
SELECT stpllv.lehrveranstaltung_id, stpllv.studienplan_lehrveranstaltung_id, stpllv.studienplan_lehrveranstaltung_id_parent
FROM lehre.tbl_studienplan_lehrveranstaltung stpllv, data
WHERE stpllv.studienplan_lehrveranstaltung_id=data.studienplan_lehrveranstaltung_id_parent
)
SELECT
tbl_studienplan_lehrveranstaltung.studienplan_lehrveranstaltung_id,
tbl_studienplan_lehrveranstaltung.studienplan_lehrveranstaltung_id_parent, tbl_studienplan_lehrveranstaltung.semester,
tbl_lehrveranstaltung.lehrveranstaltung_id,tbl_lehrveranstaltung.bezeichnung as lehrveranstaltung_bezeichnung, tbl_lehrveranstaltung.bezeichnung_english as lehrveranstaltung_bezeichnung_english,
tbl_lehrveranstaltung.semesterstunden, tbl_lehrveranstaltung.ects, tbl_lehrveranstaltung.sort, tbl_lehrveranstaltung.studiengang_kz, tbl_lehrveranstaltung.zeugnis,
tbl_lehrveranstaltung.lehrform_kurzbz as lv_lehrform_kurzbz,
tbl_zeugnisnote.studiensemester_kurzbz, tbl_zeugnisnote.uebernahmedatum, tbl_zeugnisnote.benotungsdatum,
tbl_zeugnisnote.note, tbl_zeugnisnote.updateamum, tbl_zeugnisnote.updatevon, tbl_zeugnisnote.insertamum, tbl_zeugnisnote.insertvon,
tbl_note.bezeichnung as note_bezeichnung, tbl_zeugnisnote.bemerkung, tbl_lehrveranstaltung.lvnr, tbl_studienplan_lehrveranstaltung.sort as studienplan_lehrveranstaltung_sort
FROM
lehre.tbl_lehrveranstaltung
LEFT JOIN lehre.tbl_zeugnisnote ON(tbl_lehrveranstaltung.lehrveranstaltung_id=tbl_zeugnisnote.lehrveranstaltung_id AND tbl_zeugnisnote.student_uid=".$this->db_add_param($student_uid)." AND tbl_zeugnisnote.studiensemester_kurzbz IN(".$stsem."))
LEFT JOIN lehre.tbl_studienplan_lehrveranstaltung ON(tbl_lehrveranstaltung.lehrveranstaltung_id=tbl_studienplan_lehrveranstaltung.lehrveranstaltung_id AND tbl_studienplan_lehrveranstaltung.studienplan_id=".$this->db_add_param($studienplan_id).")
LEFT JOIN lehre.tbl_note USING(note)
WHERE
(tbl_zeugnisnote.studiensemester_kurzbz IN(".$stsem.") OR tbl_zeugnisnote.studiensemester_kurzbz is null)
AND tbl_lehrveranstaltung.lehrveranstaltung_id in(SELECT lvid FROM data)
ORDER BY studienplan_lehrveranstaltung_id_parent desc, studienplan_lehrveranstaltung_id
";
if($this->db_query($qry))
{
while($row = $this->db_fetch_object())
{
$obj = new zeugnisnote();
$obj->lehrveranstaltung_id = $row->lehrveranstaltung_id;
$obj->student_uid = $student_uid;
$obj->studiensemester_kurzbz = $row->studiensemester_kurzbz;
$obj->note = $row->note;
$obj->uebernahmedatum = $row->uebernahmedatum;
$obj->benotungsdatum = $row->benotungsdatum;
$obj->updateamum = $row->updateamum;
$obj->updatevon = $row->updatevon;
$obj->insertamum = $row->insertamum;
$obj->insertvon = $row->insertvon;
$obj->note_bezeichnung = $row->note_bezeichnung;
$obj->lehrveranstaltung_bezeichnung = $row->lehrveranstaltung_bezeichnung;
$obj->lehrveranstaltung_bezeichnung_english = $row->lehrveranstaltung_bezeichnung_english;
$obj->bemerkung = $row->bemerkung;
$obj->semesterstunden = $row->semesterstunden;
$obj->ects = $row->ects;
$obj->sort = $row->sort;
$obj->studiengang_kz = $row->studiengang_kz;
$obj->zeugnis = $this->db_parse_bool($row->zeugnis);
$obj->lv_lehrform_kurzbz = $row->lv_lehrform_kurzbz;
$obj->lehrveranstaltung_lvnr = $row->lvnr;
$obj->studienplan_lehrveranstaltung_id = $row->studienplan_lehrveranstaltung_id;
$obj->studienplan_lehrveranstaltung_id_parent = $row->studienplan_lehrveranstaltung_id_parent;
$obj->studienplan_lehrveranstaltung_semester = $row->semester;
$obj->studienplan_lehrveranstaltung_sort = $row->studienplan_lehrveranstaltung_sort;
$this->result[] = $obj;
}
return true;
}
else
{
$this->errormsg = 'Fehler beim Laden der Daten';
return false;
}
}
/**
* Generiert den SQL-Befehl für eine UNDO-Aktion
* @param type $crud gewünschter Typ der UNDO-Aktion
*/
public function getUndo($crud)
{
if(strtoupper($crud) === 'INSERT')
{
return 'INSERT INTO lehre.tbl_zeugnisnote (lehrveranstaltung_id, student_uid,
studiensemester_kurzbz, note, uebernahmedatum, benotungsdatum, bemerkung,
updateamum, updatevon, insertamum, insertvon, ext_id, punkte) VALUES('.
$this->db_add_param($this->lehrveranstaltung_id, FHC_INTEGER).', '.
$this->db_add_param($this->student_uid).', '.
$this->db_add_param($this->studiensemester_kurzbz).', '.
$this->db_add_param($this->note).', '.
$this->db_add_param($this->uebernahmedatum).', '.
$this->db_add_param($this->benotungsdatum).', '.
$this->db_add_param($this->bemerkung).', '.
$this->db_add_param($this->updateamum).', '.
$this->db_add_param($this->updatevon).', '.
$this->db_add_param($this->insertamum).', '.
$this->db_add_param($this->insertvon).', '.
$this->db_add_param($this->ext_id).','.
$this->db_add_param($this->punkte).');';
}
else if(strtoupper($crud) === 'UPDATE')
{
return 'UPDATE lehre.tbl_zeugnisnote SET '.
'note='.$this->db_add_param($this->note).', '.
'punkte='.$this->db_add_param($this->punkte).','.
'uebernahmedatum='.$this->db_add_param($this->uebernahmedatum).', '.
'benotungsdatum='.$this->db_add_param($this->benotungsdatum).', '.
'bemerkung='.$this->db_add_param($this->bemerkung).', '.
'updateamum= '.$this->db_add_param($this->updateamum).', '.
'updatevon='.$this->db_add_param($this->updatevon).' '.
'WHERE lehrveranstaltung_id='.$this->db_add_param($this->lehrveranstaltung_id, FHC_INTEGER).' '.
'AND student_uid='.$this->db_add_param($this->student_uid).' '.
'AND studiensemester_kurzbz='.$this->db_add_param($this->studiensemester_kurzbz).';';
}
else
{
return NULL;
}
}
}
?>
+1
View File
@@ -37,6 +37,7 @@ $this->phrasen['bewerbung/egal']='egal';
$this->phrasen['bewerbung/orgform']='Organisationsform';
$this->phrasen['bewerbung/orgform/berufsbegleitend']='Berufsbegleitend';
$this->phrasen['bewerbung/orgform/vollzeit']='Vollzeit';
$this->phrasen['bewerbung/orgform/distance']='Fernstudium';
$this->phrasen['bewerbung/sprache']='Sprache';
$this->phrasen['bewerbung/sprache/deutsch']='Deutsch';
$this->phrasen['bewerbung/sprache/englisch']='Englisch';
+74 -73
View File
@@ -1,73 +1,74 @@
<?php
//Dokumente
$this->phrasen['tools/dokumente']='Dokumente';
$this->phrasen['tools/inskriptionsbestaetigung']='Inskriptionsbestätigung';
$this->phrasen['tools/studienbeitragFuerSSBezahltAmDatum']='Studienbeitrag für das %1$s bezahlt am %2$s';
$this->phrasen['tools/studienbeitragFuerSSNochNichtBezahlt']='Studienbeitrag für das %1$s noch nicht bezahlt';
$this->phrasen['tools/studienerfolgsbestaetigung']='Studienerfolgsbestätigung';
$this->phrasen['tools/studiensemesterAuswaehlen']='Bitte wählen Sie das entsprechende Studiensemester aus';
$this->phrasen['tools/vorlageWohnsitzfinanzamt']='zur Vorlage beim Wohnsitzfinanzamt';
//Leistungsbeurteilung
$this->phrasen['tools/leistungsbeurteilung']='Leistungsbeurteilung';
$this->phrasen['tools/studentWurdeNichtGefunden']='Student wurde nicht gefunden';
$this->phrasen['tools/mussAlsStudentEingeloggtSein']='Sie müssen als Student eingeloggt sein um ihre Noten abzufragen!';
$this->phrasen['tools/nochKeineBeurteilungEingetragen']='Es wurden noch keine Beurteilungen eingetragen';
$this->phrasen['tools/fehlerBeimAuslesenDerNoten']='Fehler beim Auslesen der Noten';
$this->phrasen['tools/benotungsdatumDerZeugnisnote']='Benotungsdatum der Zeugnisnote';
//Zahlungen
$this->phrasen['tools/zahlungen']='Zahlungen';
$this->phrasen['tools/zahlungstyp']='Typ';
$this->phrasen['tools/buchungstext']='Buchungstext';
$this->phrasen['tools/betrag']='Betrag';
$this->phrasen['tools/zahlungsbestaetigung']='Zahlungsbestätigung';
$this->phrasen['tools/bestaetigungDrucken']='Bestaetigung drucken';
$this->phrasen['tools/offen']='offen';
$this->phrasen['tools/keineZahlungenVorhanden']='Derzeit sind keine Zahlungen vorhanden';
//Ampeln
$this->phrasen['tools/ampelsystem']='Ampelsystem';
$this->phrasen['tools/ampel']='Ampel';
$this->phrasen['tools/nichtZugeteilt']='Sie sind nicht zu dieser Ampel zugeteilt';
$this->phrasen['tools/ampelNichtGefunden']='Die angegeben Ampel wurde nicht gefunden';
$this->phrasen['tools/ampelStatus']='Status';
$this->phrasen['tools/ampelBeschreibung']='Beschreibung';
$this->phrasen['tools/ampelKurzbz']='Kurzbezeichnung';
$this->phrasen['tools/ampelDeadline']='Deadline';
$this->phrasen['tools/ampelAktion']='Aktion';
$this->phrasen['tools/ampelErledigt']='Erledigt';
$this->phrasen['tools/ampelBestaetigen']='bestätigen';
$this->phrasen['tools/ampelBestaetigt']='bestätigt';
$this->phrasen['tools/ampelMitarbeiter']='Mitarbeiter';
$this->phrasen['tools/ampelRestdauer']='Restdauer in Tagen';
$this->phrasen['tools/ampelBestaetigtAm']='Bestätigt am';
$this->phrasen['tools/ampelBereitsBestaetigt']='Diese Ampel wurde bereits bestätigt';
$this->phrasen['tools/dasAmpelsystemIstEinErinnerungsystem']='Das Ampelsystem ist ein ERINNERUNGS- und BESTÄTIGUNGSSYSTEM, welches Sie auf ausstehende Aufgaben aufmerksam machen soll.<br/>Die Ampel überprüft NICHT, ob die Aufgabe tatsächlich erledigt wurde. Weitere Details entnehmen Sie bitte dem CIS-Handbuch';
$this->phrasen['tools/waehlenSieEineOEoderAmpel']='Bitte wählen Sie ein Organisationseinheit und/oder eine Ampel aus dem Dropdown';
$this->phrasen['tools/uebersichtLeitung']='Ampel-Übersicht für LeiterInnen';
//Software fuer Lehre -> Softgrid
$this->phrasen['tools/applikationsliste']='Applikationsliste';
$this->phrasen['tools/naehereInformationenfindenSieUnter']='Nähere Informationen zu Softgrid sowie eine Installationsanleitung finden Sie unter "Infrastruktur - SoftGrid"';
$this->phrasen['tools/einzelanwendung']='Einzelanwendung';
$this->phrasen['tools/softwarepaket']='Softwarepaket';
$this->phrasen['tools/datei']='Datei ';
$this->phrasen['tools/wurdeNichtGefunden']=' wurde nicht gefunden!';
$this->phrasen['tools/fehlerBeimLesenDerDatei']='Fehler beim Lesen der Datei ';
$this->phrasen['tools/keineDatenGefunden']='Keine Daten gefunden';
//Suche
$this->phrasen['tools/suche']='Globale Suche';
$this->phrasen['tools/content']='Content';
$this->phrasen['tools/suchbegriff']='Suchbegriff';
$this->phrasen['tools/esWurdenMehrAlsXDokumenteGefunden']='Es wurden mehr als 40 Dokumente zu Ihrem Suchbegriff gefunden. Bitte spezifizieren Sie Ihre Suche.';
$this->phrasen['tools/esWurdenMehrAlsXPersonenGefunden']='Es wurden mehr als 20 Personen zu Ihrem Suchbegriff gefunden. Bitte spezifizieren Sie Ihre Suche.';
$this->phrasen['tools/esWurdenMehrAlsXInhalteGefunden']='Es wurden mehr als 20 Seiten zu Ihrem Suchbegriff gefunden. Bitte spezifizieren Sie Ihre Suche.';
$this->phrasen['tools/aktuelleVersion']='Aktuelle Version';
$this->phrasen['tools/telefonklappe']='Telefonklappe';
$this->phrasen['tools/reservieren']='Reservieren';
$this->phrasen['tools/maxPersonen']='Max. Personen';
$this->phrasen['tools/esWurdenKeineErgebnisseGefunden']='Es wurden keine Ergebnisse gefunden.';
?>
<?php
//Dokumente
$this->phrasen['tools/dokumente']='Dokumente';
$this->phrasen['tools/inskriptionsbestaetigung']='Inskriptionsbestätigung';
$this->phrasen['tools/studienbeitragFuerSSBezahltAmDatum']='Studienbeitrag für das %1$s bezahlt am %2$s';
$this->phrasen['tools/studienbeitragFuerSSNochNichtBezahlt']='Studienbeitrag für das %1$s noch nicht bezahlt';
$this->phrasen['tools/studienerfolgsbestaetigung']='Studienerfolgsbestätigung';
$this->phrasen['tools/studiensemesterAuswaehlen']='Bitte wählen Sie das entsprechende Studiensemester aus';
$this->phrasen['tools/vorlageWohnsitzfinanzamt']='zur Vorlage beim Wohnsitzfinanzamt';
$this->phrasen['tools/studienbuchblatt']='Studienbuchblatt';
//Leistungsbeurteilung
$this->phrasen['tools/leistungsbeurteilung']='Leistungsbeurteilung';
$this->phrasen['tools/studentWurdeNichtGefunden']='Student wurde nicht gefunden';
$this->phrasen['tools/mussAlsStudentEingeloggtSein']='Sie müssen als Student eingeloggt sein um ihre Noten abzufragen!';
$this->phrasen['tools/nochKeineBeurteilungEingetragen']='Es wurden noch keine Beurteilungen eingetragen';
$this->phrasen['tools/fehlerBeimAuslesenDerNoten']='Fehler beim Auslesen der Noten';
$this->phrasen['tools/benotungsdatumDerZeugnisnote']='Benotungsdatum der Zeugnisnote';
//Zahlungen
$this->phrasen['tools/zahlungen']='Zahlungen';
$this->phrasen['tools/zahlungstyp']='Typ';
$this->phrasen['tools/buchungstext']='Buchungstext';
$this->phrasen['tools/betrag']='Betrag';
$this->phrasen['tools/zahlungsbestaetigung']='Zahlungsbestätigung';
$this->phrasen['tools/bestaetigungDrucken']='Bestaetigung drucken';
$this->phrasen['tools/offen']='offen';
$this->phrasen['tools/keineZahlungenVorhanden']='Derzeit sind keine Zahlungen vorhanden';
//Ampeln
$this->phrasen['tools/ampelsystem']='Ampelsystem';
$this->phrasen['tools/ampel']='Ampel';
$this->phrasen['tools/nichtZugeteilt']='Sie sind nicht zu dieser Ampel zugeteilt';
$this->phrasen['tools/ampelNichtGefunden']='Die angegeben Ampel wurde nicht gefunden';
$this->phrasen['tools/ampelStatus']='Status';
$this->phrasen['tools/ampelBeschreibung']='Beschreibung';
$this->phrasen['tools/ampelKurzbz']='Kurzbezeichnung';
$this->phrasen['tools/ampelDeadline']='Deadline';
$this->phrasen['tools/ampelAktion']='Aktion';
$this->phrasen['tools/ampelErledigt']='Erledigt';
$this->phrasen['tools/ampelBestaetigen']='bestätigen';
$this->phrasen['tools/ampelBestaetigt']='bestätigt';
$this->phrasen['tools/ampelMitarbeiter']='Mitarbeiter';
$this->phrasen['tools/ampelRestdauer']='Restdauer in Tagen';
$this->phrasen['tools/ampelBestaetigtAm']='Bestätigt am';
$this->phrasen['tools/ampelBereitsBestaetigt']='Diese Ampel wurde bereits bestätigt';
$this->phrasen['tools/dasAmpelsystemIstEinErinnerungsystem']='Das Ampelsystem ist ein ERINNERUNGS- und BESTÄTIGUNGSSYSTEM, welches Sie auf ausstehende Aufgaben aufmerksam machen soll.<br/>Die Ampel überprüft NICHT, ob die Aufgabe tatsächlich erledigt wurde. Weitere Details entnehmen Sie bitte dem CIS-Handbuch';
$this->phrasen['tools/waehlenSieEineOEoderAmpel']='Bitte wählen Sie ein Organisationseinheit und/oder eine Ampel aus dem Dropdown';
$this->phrasen['tools/uebersichtLeitung']='Ampel-Übersicht für LeiterInnen';
//Software fuer Lehre -> Softgrid
$this->phrasen['tools/applikationsliste']='Applikationsliste';
$this->phrasen['tools/naehereInformationenfindenSieUnter']='Nähere Informationen zu Softgrid sowie eine Installationsanleitung finden Sie unter "Infrastruktur - SoftGrid"';
$this->phrasen['tools/einzelanwendung']='Einzelanwendung';
$this->phrasen['tools/softwarepaket']='Softwarepaket';
$this->phrasen['tools/datei']='Datei ';
$this->phrasen['tools/wurdeNichtGefunden']=' wurde nicht gefunden!';
$this->phrasen['tools/fehlerBeimLesenDerDatei']='Fehler beim Lesen der Datei ';
$this->phrasen['tools/keineDatenGefunden']='Keine Daten gefunden';
//Suche
$this->phrasen['tools/suche']='Globale Suche';
$this->phrasen['tools/content']='Content';
$this->phrasen['tools/suchbegriff']='Suchbegriff';
$this->phrasen['tools/esWurdenMehrAlsXDokumenteGefunden']='Es wurden mehr als 40 Dokumente zu Ihrem Suchbegriff gefunden. Bitte spezifizieren Sie Ihre Suche.';
$this->phrasen['tools/esWurdenMehrAlsXPersonenGefunden']='Es wurden mehr als 20 Personen zu Ihrem Suchbegriff gefunden. Bitte spezifizieren Sie Ihre Suche.';
$this->phrasen['tools/esWurdenMehrAlsXInhalteGefunden']='Es wurden mehr als 20 Seiten zu Ihrem Suchbegriff gefunden. Bitte spezifizieren Sie Ihre Suche.';
$this->phrasen['tools/aktuelleVersion']='Aktuelle Version';
$this->phrasen['tools/telefonklappe']='Telefonklappe';
$this->phrasen['tools/reservieren']='Reservieren';
$this->phrasen['tools/maxPersonen']='Max. Personen';
$this->phrasen['tools/esWurdenKeineErgebnisseGefunden']='Es wurden keine Ergebnisse gefunden.';
?>
+5
View File
@@ -44,6 +44,11 @@ elseif(isset($_GET['filter']))
$filter = $_GET['filter'];
$dms->search($filter);
}
elseif(isset($_GET['notiz_id']))
{
$notiz_id = $_GET['notiz_id'];
$dms->getDokumenteNotiz($notiz_id);
}
else
die('projekt_kurzbz oder projektphase_id muss uebergeben werden');
+1
View File
@@ -93,6 +93,7 @@ foreach($notiz->result as $row)
<NOTIZ:startISO><![CDATA['.$row->start.']]></NOTIZ:startISO>
<NOTIZ:endeISO><![CDATA['.$row->ende.']]></NOTIZ:endeISO>
<NOTIZ:erledigt><![CDATA['.($row->erledigt?'true':'false').']]></NOTIZ:erledigt>
<NOTIZ:dokumente><![CDATA['.count($row->dokumente).']]></NOTIZ:dokumente>
<NOTIZ:insertamum><![CDATA['.$row->insertamum.']]></NOTIZ:insertamum>
<NOTIZ:insertvon><![CDATA['.$row->insertvon.']]></NOTIZ:insertvon>
<NOTIZ:updateamum><![CDATA['.$datum_obj->formatDatum($row->updateamum,'d.m.Y H:i:s').']]></NOTIZ:updateamum>
+3 -3
View File
@@ -207,7 +207,7 @@ foreach($uid_arr as $uid)
$zgv = new zgv($prestudent->zgv_code);
echo "\t\t<schulform_zgv>".$zgv->zgv_kurzbz."</schulform_zgv>\n";
echo "\t\t<studienplan_bezeichnung>".$studienplan->bezeichnung."</studienplan_bezeichnung>\n";
echo "\t\t<anmerkungpre>".$prestudent->anmerkung."</anmerkungpre>\n";
echo "\t\t<anmerkungpre><![CDATA[$prestudent->anmerkung]]></anmerkungpre>\n";
$titel_kurzbz = '';
switch($studiengang->typ)
@@ -276,7 +276,7 @@ foreach($uid_arr as $uid)
{
if($row_adresse->zustelladresse)
{
echo "\t\t<strasse>".$row_adresse->strasse."</strasse>\n";
echo "\t\t<strasse><![CDATA[$row_adresse->strasse]]></strasse>\n";
echo "\t\t<plz>".$row_adresse->plz." ".$row_adresse->ort."</plz>\n";
echo "\t\t<nation>".$row_adresse->nation."</nation>\n";
break;
@@ -286,7 +286,7 @@ foreach($uid_arr as $uid)
{
if($row_adresse->heimatadresse)
{
echo "\t\t<heimat_strasse>".$row_adresse->strasse."</heimat_strasse>\n";
echo "\t\t<heimat_strasse><![CDATA[$row_adresse->strasse]]></heimat_strasse>\n";
echo "\t\t<heimat_plz>".$row_adresse->plz." ".$row_adresse->ort."</heimat_plz>\n";
echo "\t\t<heimat_nation>".$row_adresse->nation."</heimat_nation>\n";
break;
Binary file not shown.
+25
View File
@@ -30,10 +30,12 @@ require_once('../include/notiz.class.php');
require_once('../include/datum.class.php');
require_once('../include/functions.inc.php');
require_once('../include/benutzerberechtigung.class.php');
require_once('../include/dms.class.php');
$SOAPServer = new SoapServer(APP_ROOT."/soap/notiz.wsdl.php?".microtime());
$SOAPServer->addFunction("saveNotiz");
$SOAPServer->addFunction("deleteNotiz");
$SOAPServer->addFunction("deleteDokument");
$SOAPServer->addFunction("setErledigt");
$SOAPServer->handle();
@@ -133,6 +135,29 @@ function deleteNotiz($username, $passwort, $notiz_id)
return new SoapFault("Server", $projekttask->errormsg);
}
/**
*
* Löscht das Dokument mit der vom Webservice übergebenen DMS-ID
* @param $dms_id
*/
function deleteDokument($username, $passwort, $dms_id)
{
if(!$user = check_user($username, $passwort))
return new SoapFault("Server", "Invalid Credentials");
$rechte = new benutzerberechtigung();
$rechte->getBerechtigungen($user);
if(!$rechte->isBerechtigt('basis/notiz', null, 'suid'))
return new SoapFault("Server", "Sie haben keine Berechtigung zum Loeschen von Dokumenten");
$dms = new dms();
if($dms->deleteDms($dms_id))
return "OK";
else
return new SoapFault("Server", $dms->errormsg);
}
/**
*
* Setzt den erledigt Status
+21
View File
@@ -49,6 +49,14 @@ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<wsdl:message name="deleteNotizResponse">
<wsdl:part name="message" type="xsd:string"></wsdl:part>
</wsdl:message>
<wsdl:message name="deleteDokumentRequest">
<wsdl:part name="username" type="xsd:string" minOccurs="0"></wsdl:part>
<wsdl:part name="passwort" type="xsd:string" minOccurs="0"></wsdl:part>
<wsdl:part name="dms_id" type="xsd:string"></wsdl:part>
</wsdl:message>
<wsdl:message name="deleteDokumentResponse">
<wsdl:part name="message" type="xsd:string"></wsdl:part>
</wsdl:message>
<wsdl:message name="setErledigtRequest">
<wsdl:part name="notiz_id" type="xsd:string"></wsdl:part>
<wsdl:part name="erledigt" type="xsd:boolean"></wsdl:part>
@@ -66,6 +74,10 @@ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<wsdl:input message="tns:deleteNotizRequest"></wsdl:input>
<wsdl:output message="tns:deleteNotizResponse"></wsdl:output>
</wsdl:operation>
<wsdl:operation name="deleteDokument">
<wsdl:input message="tns:deleteDokumentRequest"></wsdl:input>
<wsdl:output message="tns:deleteDokumentResponse"></wsdl:output>
</wsdl:operation>
<wsdl:operation name="setErledigt">
<wsdl:input message="tns:setErledigtRequest"></wsdl:input>
<wsdl:output message="tns:setErledigtResponse"></wsdl:output>
@@ -92,6 +104,15 @@ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<soap:body use="encoded" namespace="http://www.technikum-wien.at/soap/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="deleteDokument">
<soap:operation soapAction="<?php echo APP_ROOT."soap/deleteDokument";?>" />
<wsdl:input>
<soap:body use="encoded" namespace="http://www.technikum-wien.at/soap/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</wsdl:input>
<wsdl:output>
<soap:body use="encoded" namespace="http://www.technikum-wien.at/soap/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="setErledigt">
<soap:operation soapAction="<?php echo APP_ROOT."soap/setErledigt";?>" />
<wsdl:input>
+3600 -316
View File
File diff suppressed because it is too large Load Diff
+71 -4
View File
@@ -2621,7 +2621,7 @@ if(!$result = @$db->db_query("SELECT pflicht FROM public.tbl_dokumentstudiengang
}
// Spalten zgvnation, zgvmanation, zgvdoktornation in public.tbl_prestudent
if(!$result = @$db->db_query("SELECT pflicht FROM public.tbl_prestudent LIMIT 1"))
if(!$result = @$db->db_query("SELECT zgvnation FROM public.tbl_prestudent LIMIT 1"))
{
$qry = "ALTER TABLE public.tbl_prestudent ADD COLUMN zgvnation character varying(3);
ALTER TABLE public.tbl_prestudent ADD COLUMN zgvmanation character varying(3) ;
@@ -2826,6 +2826,72 @@ if($result = @$db->db_query("SELECT * FROM information_schema.role_table_grants
}
}
// Dokumentenupload für Notizen
if(!$result = @$db->db_query("SELECT 1 FROM public.tbl_notiz_dokument LIMIT 1;"))
{
$qry = "
CREATE TABLE public.tbl_notiz_dokument
(
notiz_id integer NOT NULL,
dms_id integer NOT NULL
);
ALTER TABLE public.tbl_notiz_dokument ADD CONSTRAINT pk_notiz_dokument PRIMARY KEY (notiz_id, dms_id);
ALTER TABLE public.tbl_notiz_dokument ADD CONSTRAINT fk_notiz_dokument_notiz FOREIGN KEY (notiz_id) REFERENCES public.tbl_notiz (notiz_id) ON UPDATE CASCADE ON DELETE CASCADE;
ALTER TABLE public.tbl_notiz_dokument ADD CONSTRAINT fk_notiz_dokument_dms FOREIGN KEY (dms_id) REFERENCES campus.tbl_dms (dms_id) ON UPDATE CASCADE ON DELETE CASCADE;
GRANT SELECT, INSERT, UPDATE, DELETE ON public.tbl_notiz_dokument TO vilesci;
GRANT SELECT, INSERT, UPDATE, DELETE ON public.tbl_notiz_dokument TO web;
";
if(!$db->db_query($qry))
echo '<strong>Dokumentenupload fuer Notizen: '.$db->db_last_error().'</strong><br>';
else
echo ' Tabellen fuer Dokumentenupload fuer Notizen hinzugefuegt!<br>';
}
// Fehlende Foreign Keys fuer ZGV Nation und Ausstellungsstaat auf ZGVNation kopieren
if($result = @$db->db_query("SELECT * FROM information_schema.table_constraints WHERE constraint_name='fk_prestudent_zgv_zgvnation'"))
{
if($db->db_num_rows($result)==0)
{
$qry = 'ALTER TABLE public.tbl_prestudent ADD CONSTRAINT fk_prestudent_zgv_zgvnation FOREIGN KEY (zgvnation) REFERENCES bis.tbl_nation(nation_code) ON DELETE RESTRICT ON UPDATE CASCADE;
ALTER TABLE public.tbl_prestudent ADD CONSTRAINT fk_prestudent_zgv_zgvmanation FOREIGN KEY (zgvmanation) REFERENCES bis.tbl_nation(nation_code) ON DELETE RESTRICT ON UPDATE CASCADE;
ALTER TABLE public.tbl_prestudent ADD CONSTRAINT fk_prestudent_zgv_zgvdoktornation FOREIGN KEY (zgvdoktornation) REFERENCES bis.tbl_nation(nation_code) ON DELETE RESTRICT ON UPDATE CASCADE;
UPDATE public.tbl_prestudent SET zgvnation=ausstellungsstaat WHERE zgvnation is null AND ausstellungsstaat is not null;
UPDATE public.tbl_prestudent SET zgvmanation=ausstellungsstaat WHERE zgvmanation is null AND ausstellungsstaat is not null AND zgvmas_code is not null;
';
if(!$db->db_query($qry))
echo '<strong>public.tbl_prestudent: '.$db->db_last_error().'</strong><br>';
else
echo '<br>public.tbl_prestudent: Fehlende Foreign Keys zu Nation hinzugefügt';
}
}
// Fehlende Foreign Keys fuer ZGV Nation und Ausstellungsstaat auf ZGVNation kopieren
if(!$result = @$db->db_query("SELECT bezeichnung_kurzbz FROM lehre.tbl_lehrform"))
{
$qry = 'ALTER TABLE lehre.tbl_lehrform ADD COLUMN bezeichnung_kurz varchar(32)[];
ALTER TABLE lehre.tbl_lehrform ADD COLUMN bezeichnung_lang varchar(256)[];
UPDATE lehre.tbl_lehrform SET bezeichnung_kurz[1]=lehrform_kurzbz;
UPDATE lehre.tbl_lehrform SET bezeichnung_kurz[2]=lehrform_kurzbz;
UPDATE lehre.tbl_lehrform SET bezeichnung_lang[1]=bezeichnung;
UPDATE lehre.tbl_lehrform SET bezeichnung_lang[2]=bezeichnung;
';
if(!$db->db_query($qry))
echo '<strong>lehre.tbl_lehrform: '.$db->db_last_error().'</strong><br>';
else
echo '<br>lehre.tbl_lehrform: neue Spalten fuer mehrsprachige Lehrformbezeichnungen hinzugefuegt';
}
echo '<br><br><br>';
$tabellen=array(
@@ -2931,7 +2997,7 @@ $tabellen=array(
"lehre.tbl_lehreinheitgruppe" => array("lehreinheitgruppe_id","lehreinheit_id","studiengang_kz","semester","verband","gruppe","gruppe_kurzbz","updateamum","updatevon","insertamum","insertvon","ext_id"),
"lehre.tbl_lehreinheitmitarbeiter" => array("lehreinheit_id","mitarbeiter_uid","lehrfunktion_kurzbz","semesterstunden","planstunden","stundensatz","faktor","anmerkung","bismelden","updateamum","updatevon","insertamum","insertvon","ext_id","standort_id","vertrag_id"),
"lehre.tbl_lehrfach" => array("lehrfach_id","studiengang_kz","fachbereich_kurzbz","kurzbz","bezeichnung","farbe","aktiv","semester","sprache","updateamum","updatevon","insertamum","insertvon","ext_id"),
"lehre.tbl_lehrform" => array("lehrform_kurzbz","bezeichnung","verplanen"),
"lehre.tbl_lehrform" => array("lehrform_kurzbz","bezeichnung","verplanen","bezeichnung_kurz","bezeichnung_lang"),
"lehre.tbl_lehrfunktion" => array("lehrfunktion_kurzbz","beschreibung","standardfaktor","sort"),
"lehre.tbl_lehrmittel" => array("lehrmittel_kurzbz","beschreibung","ort_kurzbz"),
"lehre.tbl_lehrtyp" => array("lehrtyp_kurzbz","bezeichnung"),
@@ -3003,7 +3069,8 @@ $tabellen=array(
"public.tbl_mitarbeiter" => array("mitarbeiter_uid","personalnummer","telefonklappe","kurzbz","lektor","fixangestellt","bismelden","stundensatz","ausbildungcode","ort_kurzbz","standort_id","anmerkung","insertamum","insertvon","updateamum","updatevon","ext_id","kleriker"),
"public.tbl_notiz" => array("notiz_id","titel","text","verfasser_uid","bearbeiter_uid","start","ende","erledigt","insertamum","insertvon","updateamum","updatevon","ext_id"),
"public.tbl_notizzuordnung" => array("notizzuordnung_id","notiz_id","projekt_kurzbz","projektphase_id","projekttask_id","uid","person_id","prestudent_id","bestellung_id","lehreinheit_id","ext_id","anrechnung_id"),
"public.tbl_ort" => array("ort_kurzbz","bezeichnung","planbezeichnung","max_person","lehre","reservieren","aktiv","lageplan","dislozierung","kosten","ausstattung","updateamum","updatevon","insertamum","insertvon","ext_id","stockwerk","standort_id","telefonklappe","content_id","m2","gebteil","oe_kurzbz"),
"public.tbl_notiz_dokument" => array("notiz_id","dms_id"),
"public.tbl_ort" => array("ort_kurzbz","bezeichnung","planbezeichnung","max_person","lehre","reservieren","aktiv","lageplan","dislozierung","kosten","ausstattung","updateamum","updatevon","insertamum","insertvon","ext_id","stockwerk","standort_id","telefonklappe","content_id","m2","gebteil","oe_kurzbz"),
"public.tbl_ortraumtyp" => array("ort_kurzbz","hierarchie","raumtyp_kurzbz"),
"public.tbl_organisationseinheit" => array("oe_kurzbz", "oe_parent_kurzbz", "bezeichnung","organisationseinheittyp_kurzbz", "aktiv","mailverteiler","freigabegrenze","kurzzeichen","lehre"),
"public.tbl_organisationseinheittyp" => array("organisationseinheittyp_kurzbz", "bezeichnung", "beschreibung"),
@@ -3019,7 +3086,7 @@ $tabellen=array(
"public.tbl_preoutgoing_lehrveranstaltung" => array("preoutgoing_lehrveranstaltung_id","preoutgoing_id","bezeichnung","ects","endversion","insertamum","insertvon","updateamum","updatevon","wochenstunden","unitcode"),
"public.tbl_preoutgoing_preoutgoing_status" => array("status_id","preoutgoing_status_kurzbz","preoutgoing_id","datum","insertamum","insertvon","updateamum","updatevon"),
"public.tbl_preoutgoing_status" => array("preoutgoing_status_kurzbz","bezeichnung"),
"public.tbl_prestudent" => array("prestudent_id","aufmerksamdurch_kurzbz","person_id","studiengang_kz","berufstaetigkeit_code","ausbildungcode","zgv_code","zgvort","zgvdatum","zgvmas_code","zgvmaort","zgvmadatum","aufnahmeschluessel","facheinschlberuf","reihungstest_id","anmeldungreihungstest","reihungstestangetreten","rt_gesamtpunkte","rt_punkte1","rt_punkte2","bismelden","anmerkung","dual","insertamum","insertvon","updateamum","updatevon","ext_id","ausstellungsstaat","rt_punkte3", "zgvdoktor_code", "zgvdoktorort", "zgvdoktordatum","mentor"),
"public.tbl_prestudent" => array("prestudent_id","aufmerksamdurch_kurzbz","person_id","studiengang_kz","berufstaetigkeit_code","ausbildungcode","zgv_code","zgvort","zgvdatum","zgvmas_code","zgvmaort","zgvmadatum","aufnahmeschluessel","facheinschlberuf","reihungstest_id","anmeldungreihungstest","reihungstestangetreten","rt_gesamtpunkte","rt_punkte1","rt_punkte2","bismelden","anmerkung","dual","insertamum","insertvon","updateamum","updatevon","ext_id","ausstellungsstaat","rt_punkte3", "zgvdoktor_code", "zgvdoktorort", "zgvdoktordatum","mentor","zgvnation","zgvmanation","zgvdoktornation"),
"public.tbl_prestudentstatus" => array("prestudent_id","status_kurzbz","studiensemester_kurzbz","ausbildungssemester","datum","orgform_kurzbz","insertamum","insertvon","updateamum","updatevon","ext_id","studienplan_id","bestaetigtam","bestaetigtvon","fgm","faktiv", "anmerkung"),
"public.tbl_raumtyp" => array("raumtyp_kurzbz","beschreibung"),
"public.tbl_reihungstest" => array("reihungstest_id","studiengang_kz","ort_kurzbz","anmerkung","datum","uhrzeit","updateamum","updatevon","insertamum","insertvon","ext_id","freigeschaltet","max_teilnehmer","oeffentlich"),
+10 -2
View File
@@ -211,7 +211,7 @@ class MySabre_CalDAV_Backend extends \Sabre\CalDAV\Backend\AbstractBackend
foreach($val as $row)
{
//einzelnen Eintrag holen
if($row['dtstart']==$dtstart && $row['unr'][0]==$unr)
if($row['dtstart']==$dtstart && ($row['unr'][0]==$unr) || $unr=='R'.$row['reservierung_id'])
{
return $row;
}
@@ -221,6 +221,7 @@ class MySabre_CalDAV_Backend extends \Sabre\CalDAV\Backend\AbstractBackend
$data=array_merge($data, $val);
}
$endtime = microtime(true);
//error_log("\n\nDATA".print_r($data,true));
//error_log("getCalendarData time:".($endtime-$starttime));
//$data.="\nEND:VCALENDAR";
return $data;
@@ -280,9 +281,16 @@ END:VTIMEZONE\n".$event."\nEND:VCALENDAR";
$return = array();
foreach($data as $row)
{
// Reservierungen werden mit einem R markiert und mit der ReservierungID da sonst
// Termine verloren gehen koennen wenn zur selben Zeit eine Reservierung und ein LVPlan Eintrag vorhanden ist
if($row['reservierung'])
$uri = $row['dtstart'].'-R'.$row['reservierung_id'];
else
$uri = $row['dtstart'].'-'.$row['unr'][0];
$return[] = array("id"=>$row['UID'],
"calendardata"=>$this->makeCal($row['data']),
"uri"=>$row['dtstart'].'-'.$row['unr'][0],
"uri"=>$uri,
"lastmodified"=>$row['updateamum'],
"etag"=>'"'.$row['UID'].'"',
"calendarid"=>$calendarId);