Studierende haben nun die Möglichkeit, die hochgeladene Arbeit im Abgabetool einzusehen und wieder herunterzuladen.

This commit is contained in:
Andreas Österreicher
2013-03-11 14:35:53 +00:00
parent ebc39d5b08
commit 113328df34
4 changed files with 102 additions and 23 deletions
+27 -23
View File
@@ -93,28 +93,6 @@ if($uid=='-1')
exit;
}
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>'.$p->t('abgabetool/ueberschrift').'</title>
<link rel="stylesheet" href="../../../skin/vilesci.css" type="text/css">
<link rel="stylesheet" href="../../../include/js/tablesort/table.css" type="text/css">
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<script src="../../../include/js/tablesort/table.js" type="text/javascript"></script>
<script type="text/javascript">
function checkEid()
{
if(document.projektabgabe.eiderklaerung.checked == false)
{
alert("'.$p->t('abgabetool/erklaerungNichtAkzeptiert').'!");
return false;
}
return true;
}
</script>
</head>
<body class="Background_main" style="background-color:#eeeeee;">';
if($uid!=$user)
{
$student = new student();
@@ -159,6 +137,29 @@ if($uid!=$user)
die($p->t('abgabetool/keineBerechtigungStudentenansicht'));
}
}
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>'.$p->t('abgabetool/ueberschrift').'</title>
<link rel="stylesheet" href="../../../skin/vilesci.css" type="text/css">
<link rel="stylesheet" href="../../../include/js/tablesort/table.css" type="text/css">
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<script src="../../../include/js/tablesort/table.js" type="text/javascript"></script>
<script type="text/javascript">
function checkEid()
{
if(document.projektabgabe.eiderklaerung.checked == false)
{
alert("'.$p->t('abgabetool/erklaerungNichtAkzeptiert').'!");
return false;
}
return true;
}
</script>
</head>
<body class="Background_main" style="background-color:#eeeeee;">';
$datum_obj = new datum();
$error='';
$neu = (isset($_GET['neu'])?true:false);
@@ -483,7 +484,10 @@ if($command!="add")
$row_typ=$db->db_fetch_object($result_typ);
$htmlstr .= " <td>$row_typ->bezeichnung</td>\n";
$htmlstr .= " <td width='250'>$row->kurzbz</td>\n";
$htmlstr .= " <td align='center'>".$datum_obj->formatDatum($row->abgabedatum,'d.m.Y')."</td>\n";
$htmlstr .= " <td align='center'>".$datum_obj->formatDatum($row->abgabedatum,'d.m.Y');
if($row->abgabedatum!='')
$htmlstr .= ' <a href="abgabe_student_file.php?abgabe_id='.$row->paabgabe_id.'&student_uid='.$uid.'" target="_blank" title="'.$p->t('abgabetool/downloadProjektarbeit').'"><img src="../../../skin/images/pdfpic.gif"></a>';
$htmlstr .= "</td>\n";
//Überschrittene Termine
if($row->paabgabetyp_kurzbz=='enda')
+73
View File
@@ -0,0 +1,73 @@
<?php
/* Copyright (C) 2013 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 >
*/
require_once('../../../config/cis.config.inc.php');
require_once('../../../include/functions.inc.php');
require_once('../../../include/benutzerberechtigung.class.php');
require_once('../../../include/phrasen.class.php');
require_once('../../../include/student.class.php');
$sprache = getSprache();
$p = new phrasen($sprache);
if (!$db = new basis_db())
die($p->t('global/fehlerBeimOeffnenDerDatenbankverbindung'));
$getuid=get_uid();
if(isset($_GET['student_uid']))
$uid = $_GET['student_uid'];
else
die($p->t('global/fehlerBeiDerParameteruebergabe'));
if(isset($_GET['abgabe_id']))
$id = $_GET['abgabe_id'];
else
die($p->t('global/fehlerBeiDerParameteruebergabe'));
if(!is_numeric($id) || $id=='')
die($p->t('global/fehlerBeiDerParameteruebergabe'));
$student = new student();
if(!$student->load($uid))
die('Student wurde nicht gefunden');
if($getuid!=$uid)
{
//Berechtigung ueber das Berechtigungssystem
$rechte = new benutzerberechtigung();
$rechte->getBerechtigungen($getuid);
if(!$rechte->isBerechtigt('lehre/abgabetool'))
die('Sie haben keine Berechtigung fuer diese Datei');
}
$file = $id.'_'.$uid.'.pdf';
$filename = PAABGABE_PATH.$file;
if(file_exists($filename))
{
header('Content-Type: application/octet-stream');
header('Content-disposition: attachment; filename="'.$file.'"');
readfile($filename);
exit;
}
else
echo 'Datei existiert nicht';
?>
+1
View File
@@ -68,4 +68,5 @@ $this->phrasen['abgabetool/dateiZuGross']='Die Datei ist zu groß! Maximale Date
$this->phrasen['abgabetool/eidesstattlicheErklaerung']='Ich erkläre hiermit an Eides statt, dass ich die vorliegende Arbeit selbständig angefertigt habe. Die aus fremden Quellen direkt oder indirekt übernommenen Gedanken sind als solche kenntlich gemacht. Die Arbeit wurde bisher weder in gleicher noch in ähnlicher Form einer anderen Prüfungsbehörde vorgelegt und auch noch nicht veröffentlicht.';
$this->phrasen['abgabetool/gelesenUndAkzeptiert']='Gelesen und akzeptiert';
$this->phrasen['abgabetool/erklaerungNichtAkzeptiert']='Erklärung nicht akzeptiert';
$this->phrasen['abgabetool/downloadProjektarbeit']='Dokument herunterladen';
?>
+1
View File
@@ -68,4 +68,5 @@ $this->phrasen['abgabetool/dateiZuGross']='The File is too big! Maximum File siz
$this->phrasen['abgabetool/eidesstattlicheErklaerung']='I confirm that this paper is entirely my own work. All sources and quotations have been fully acknowledged in the appropriate places with adequate footnotes and citations. Quotations have been properly acknowledged and marked with appropriate punctuation. The works consulted are listed in the bibliography. This paper has not been submitted to another examination panel in the same or a similar form, and has not been published.';
$this->phrasen['abgabetool/gelesenUndAkzeptiert']='Read and accepted';
$this->phrasen['abgabetool/erklaerungNichtAkzeptiert']='Declaration not accepted';
$this->phrasen['abgabetool/downloadProjektarbeit']='Download File';
?>