mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-21 17:02:19 +00:00
- Checksystem: neue Tabelle tbl_paabgabe
- Moodle Globale Gast Accounts
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user