mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-18 23:42:17 +00:00
- Checksystem: neue Tabelle tbl_paabgabe
- Moodle Globale Gast Accounts
This commit is contained in:
@@ -296,8 +296,8 @@
|
||||
<table class="tabcontent">
|
||||
<tr>
|
||||
<td class="tdwidth10"> </td>
|
||||
<td><p>So wie das persönliche Homeverzeichnis, liegt auch das Lehre Verzeichnis auf einem UNIX Server, auf den SCP oder SSH aus dem Internet zugegriffen werden kann. Der Servername lautet "<strong>eid.technikum-wien.at</strong>", Nach dem Anmelden muß man in das Verzeichnis "<strong>/lehre</strong>" wechseln und schon befindet man sich im Lehre Verzeichnis, das im FH-LAN als Laufwerk <strong>L:\</strong> gemappt wird!</p>
|
||||
<p>Eine weitere Möglichkeit ist der Zugriff über HTTP(s) auf die Seite <a class="Item" href="http://lehre.technikum-wien.at/" target="_blank">http://lehre.technikum-wien.at</a></p></td>
|
||||
<td><p>So wie das persönliche Homeverzeichnis, liegt auch das Lehre Verzeichnis auf einem UNIX Server, auf den via SCP oder SSH aus dem Internet zugegriffen werden kann. Der Servername lautet "<strong>nestor.technikum-wien.at</strong>"
|
||||
<!--<p>Eine weitere Möglichkeit ist der Zugriff über HTTP(s) auf die Seite <a class="Item" href="http://lehre.technikum-wien.at/" target="_blank">http://lehre.technikum-wien.at</a></p></td>-->
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
||||
Binary file not shown.
@@ -376,9 +376,9 @@ class moodle_course
|
||||
$this->getContext(40, $id_sem);
|
||||
|
||||
//Eintrag in tbl_mdl_course
|
||||
$qry = "INSERT INTO public.mdl_course(category, sortorder, fullname, shortname, format, showgrades, newsitems, enrollable)
|
||||
$qry = "INSERT INTO public.mdl_course(category, sortorder, fullname, shortname, format, showgrades, newsitems, enrollable, guest)
|
||||
VALUES (".$this->addslashes($id_sem).", (SELECT max(sortorder)+1 FROM public.mdl_course), ".$this->addslashes($this->mdl_fullname).", ".
|
||||
$this->addslashes($this->mdl_shortname).",'topics', 1, 5, 0);";
|
||||
$this->addslashes($this->mdl_shortname).",'topics', 1, 5, 0, 1);";
|
||||
|
||||
if($result = pg_query($this->conn_moodle, $qry))
|
||||
{
|
||||
@@ -812,9 +812,9 @@ class moodle_course
|
||||
$this->getContext(40, $id_stsem);
|
||||
|
||||
//Eintrag in tbl_mdl_course
|
||||
$qry = "INSERT INTO public.mdl_course(category, sortorder, fullname, shortname, format, showgrades, newsitems, enrollable)
|
||||
$qry = "INSERT INTO public.mdl_course(category, sortorder, fullname, shortname, format, showgrades, newsitems, enrollable, guest)
|
||||
VALUES (".$this->addslashes($id_stsem).", (SELECT max(sortorder)+1 FROM public.mdl_course), ".$this->addslashes($this->mdl_fullname).", ".
|
||||
$this->addslashes($this->mdl_shortname).",'topics', 1, 5, 0);";
|
||||
$this->addslashes($this->mdl_shortname).",'topics', 1, 5, 0, 1);";
|
||||
|
||||
if($result = pg_query($this->conn_moodle, $qry))
|
||||
{
|
||||
|
||||
@@ -208,6 +208,7 @@ class moodle_user
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->createGlobaleGastrolle($this->mdl_user_id);
|
||||
}
|
||||
|
||||
//Lektoren loeschen die nicht mehr zugeordnet sind
|
||||
@@ -364,6 +365,9 @@ class moodle_user
|
||||
$this->errormsg = 'Fehler beim Auslesen der Rollen';
|
||||
return false;
|
||||
}
|
||||
|
||||
//globale Gastrolle anlegen
|
||||
$this->createGlobaleGastrolle($this->mdl_user_id);
|
||||
|
||||
//Gruppenzuteilung
|
||||
if($gruppensync)
|
||||
@@ -669,6 +673,43 @@ class moodle_user
|
||||
}
|
||||
}
|
||||
|
||||
// *********************************************
|
||||
// * Fuegt dem User die globale Gastrolle hinzu
|
||||
// * @param $mdl_user_id Moodle ID des Users der
|
||||
// * die GastRolle bekommt
|
||||
// * @return true wenn ok, false wenn Fehler
|
||||
// *********************************************
|
||||
function createGlobaleGastrolle($mdl_user_id)
|
||||
{
|
||||
|
||||
//Nachschauen ob diese Person bereits eine globale Gastrolle hat
|
||||
$qry = "SELECT 1 FROM public.mdl_role_assignments
|
||||
WHERE
|
||||
userid='".addslashes($mdl_user_id)."' AND
|
||||
contextid='1' AND
|
||||
roleid='6'";
|
||||
|
||||
if($result = pg_query($this->conn_moodle, $qry))
|
||||
{
|
||||
if(pg_num_rows($result)==0)
|
||||
{
|
||||
//noch nicht zugeteilt
|
||||
if($this->createZuteilung($mdl_user_id, 1, 6))
|
||||
{
|
||||
$this->log.="\n$this->mdl_user_firstname $this->mdl_user_lastname wurde die globale Gastrolle zugeteilt";
|
||||
$this->log_public.="\n$this->mdl_user_firstname $this->mdl_user_lastname wurde die globale Gastrolle zugeteilt";
|
||||
}
|
||||
else
|
||||
$this->log.="\nFehler beim Anlegen der Gast-Zuteilung: $this->errormsg";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Auslesen der Rollen';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// *************************************************
|
||||
// * Loescht die Zuteilung eines Users zu einem Kurs
|
||||
// * @param $mdl_user_id MoodleID des Users
|
||||
|
||||
@@ -386,6 +386,11 @@
|
||||
<td class="tdwidth10" nowrap> </td>
|
||||
<td class="tdwrap"><a class="Item" href="public/info/verordnungen/EDV_Richtlinien.doc" target="content"><img src="../skin/images/menu_item.gif" width="7" height="9"> EDV Richtlinien</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tdwidth10" nowrap> </td>
|
||||
<td class="tdwrap"><a class="Item" href="public/info/verordnungen/Datensicherung_und_Archivierung.doc" target="content"><img src="../skin/images/menu_item.gif" width="7" height="9"> Datensicherung und Archivierung</a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="tdwidth10" nowrap> </td>
|
||||
<td class="tdwrap"><a href="?Verordnungen" class="MenuItem" onClick="return(js_toggle_container('Laborordnung'));"><img src="../skin/images/menu_item.gif" width="7" height="9"> Laborordnung</a>
|
||||
|
||||
@@ -34,6 +34,69 @@ if (!$conn = pg_pconnect(CONN_STRING))
|
||||
|
||||
echo '<H1>Systemcheck!</H1>';
|
||||
echo '<H2>DB-Updates!</H2>';
|
||||
// ************** campus.tbl_paabgabetyp **************************************************
|
||||
if(!@pg_query($conn, 'SELECT * FROM campus.tbl_paabgabetyp LIMIT 1;'))
|
||||
{
|
||||
$sql =" ALTER TABLE lehre.tbl_projektarbeit ADD COLUMN seitenanzahl integer;
|
||||
ALTER TABLE lehre.tbl_projektarbeit ADD COLUMN abgabedatum date;
|
||||
ALTER TABLE lehre.tbl_projektarbeit ADD COLUMN kontrollschlagwoerter varchar(150);
|
||||
ALTER TABLE lehre.tbl_projektarbeit ADD COLUMN schlagwoerter varchar(150);
|
||||
ALTER TABLE lehre.tbl_projektarbeit ADD COLUMN schlagwoerter_de varchar(150);
|
||||
ALTER TABLE lehre.tbl_projektarbeit ADD COLUMN abstract text;
|
||||
ALTER TABLE lehre.tbl_projektarbeit ADD COLUMN abstract_en text;
|
||||
|
||||
CREATE TABLE campus.tbl_paabgabe
|
||||
(
|
||||
paabgabe_id Serial NOT NULL,
|
||||
projektarbeit_id integer NOT NULL,
|
||||
paabgabetyp_kurzbz Varchar(16) NOT NULL,
|
||||
fixtermin Boolean NOT NULL Default FALSE,
|
||||
datum Date NOT NULL,
|
||||
kurzbz Varchar(256),
|
||||
abgabedatum Date,
|
||||
insertvon Varchar(32),
|
||||
insertamum Timestamp,
|
||||
updatevon Varchar(32),
|
||||
updateamum Timestamp,
|
||||
constraint pk_paabgabe primary key (paabgabe_id)
|
||||
);
|
||||
|
||||
Create table campus.tbl_paabgabetyp
|
||||
(
|
||||
paabgabetyp_kurzbz Varchar(16) NOT NULL,
|
||||
bezeichnung Varchar(64),
|
||||
constraint pk_paabgabetyp primary key (paabgabetyp_kurzbz)
|
||||
);
|
||||
|
||||
Comment on column campus.tbl_paabgabe.fixtermin Is 'Gibt es eine harte oder weiche Deadline?';
|
||||
Comment on column campus.tbl_paabgabe.datum Is 'Wann soll abgegeben werden?';
|
||||
Comment on column campus.tbl_paabgabe.abgabedatum Is 'Wann wurde wirklich abgegeben?';
|
||||
|
||||
Alter table campus.tbl_paabgabe add Constraint projektarbeit_paabgabe foreign key (projektarbeit_id) references lehre.tbl_projektarbeit (projektarbeit_id) on update cascade on delete restrict;
|
||||
Alter table campus.tbl_paabgabe add Constraint paabgabetyp_paabgabe foreign key (paabgabetyp_kurzbz) references campus.tbl_paabgabetyp (paabgabetyp_kurzbz) on update cascade on delete restrict;
|
||||
|
||||
Grant select on lehre.tbl_projektarbeit to group web;
|
||||
Grant update on lehre.tbl_projektarbeit to group web;
|
||||
Grant select on campus.tbl_paabgabe to group admin;
|
||||
Grant update on campus.tbl_paabgabe to group admin;
|
||||
Grant delete on campus.tbl_paabgabe to group admin;
|
||||
Grant insert on campus.tbl_paabgabe to group admin;
|
||||
Grant select on campus.tbl_paabgabe to group web;
|
||||
Grant update on campus.tbl_paabgabe to group web;
|
||||
Grant delete on campus.tbl_paabgabe to group web;
|
||||
Grant insert on campus.tbl_paabgabe to group web;
|
||||
Grant select on campus.tbl_paabgabetyp to group admin;
|
||||
Grant update on campus.tbl_paabgabetyp to group admin;
|
||||
Grant delete on campus.tbl_paabgabetyp to group admin;
|
||||
Grant insert on campus.tbl_paabgabetyp to group admin;
|
||||
Grant select on campus.tbl_paabgabetyp to group web;
|
||||
";
|
||||
|
||||
if(!@pg_query($conn, $sql))
|
||||
echo '<strong>campus.tbl_paabgabe: '.pg_last_error($conn).' </strong><br>';
|
||||
else
|
||||
echo ' campus.tbl_paabgabe wurde hinzugefuegt!<br>';
|
||||
}
|
||||
|
||||
// ************** bis.tbl_orgform.rolle **********************************************
|
||||
if (!@pg_query($conn,'SELECT rolle FROM bis.tbl_orgform LIMIT 1;'))
|
||||
|
||||
Reference in New Issue
Block a user