19 declare(strict_types=1);
    28     protected \ilDBInterface 
$db;
    37         if (!$this->db->indexExistsByFields(
'exc_assignment', [
'exc_id'])) {
    38             $this->db->addIndex(
'exc_assignment', [
'exc_id'], 
'i1');
    44         if (!$this->db->indexExistsByFields(
'exc_members', [
'usr_id'])) {
    45             $this->db->addIndex(
'exc_members', [
'usr_id'], 
'i1');
    51         if (!$this->db->indexExistsByFields(
'exc_assignment', [
'deadline_mode', 
'exc_id'])) {
    52             $this->db->addIndex(
'exc_assignment', [
'deadline_mode', 
'exc_id'], 
'i2');
    58         if (!$this->db->indexExistsByFields(
'exc_ass_file_order', [
'assignment_id'])) {
    59             $this->db->addIndex(
'exc_ass_file_order', [
'assignment_id'], 
'i1');
    65         if (!$this->db->indexExistsByFields(
'il_exc_team', [
'id'])) {
    66             $this->db->addIndex(
'il_exc_team', [
'id'], 
'i1');
    72         if (!$this->db->tableColumnExists(
'exc_assignment', 
'if_rcid')) {
    73             $this->db->addTableColumn(
    88         if (!$this->db->tableColumnExists(
'exc_assignment_peer', 
'id')) {
    89             $this->db->addTableColumn(
'exc_assignment_peer', 
'id', array(
    95             $this->db->createSequence(
'exc_assignment_peer');
   101         $set = $this->db->queryF(
   102             "SELECT * FROM exc_assignment_peer ",
   106         while ($rec = $this->db->fetchAssoc($set)) {
   107             $next_id = $this->db->nextId(
"exc_assignment_peer");
   109                 "exc_assignment_peer",
   111                 "id" => [
"integer", $next_id]
   114                     "ass_id" => [
"integer", $rec[
"ass_id"]],
   115                     "giver_id" => [
"integer", $rec[
"giver_id"]],
   116                     "peer_id" => [
"integer", $rec[
"peer_id"]]
   124         $this->db->dropPrimaryKey(
"exc_assignment_peer");
   125         $this->db->addPrimaryKey(
"exc_assignment_peer", [
"id"]);
   130         $this->db->addUniqueConstraint(
"exc_assignment_peer", array(
'ass_id', 
'giver_id', 
'peer_id'), 
'c1');
   135         $this->db->addIndex(
"exc_assignment_peer", [
"ass_id"], 
"i1");
   140         if (!$this->db->tableColumnExists(
'exc_idl', 
'requested')) {
   141             $this->db->addTableColumn(
'exc_idl', 
'requested', array(
   152         if (!$this->db->tableColumnExists(
'exc_assignment', 
'solution_rid')) {
   153             $this->db->addTableColumn(
   168         if (!$this->db->tableColumnExists(
'exc_mem_ass_status', 
'feedback_rcid')) {
   169             $this->db->addTableColumn(
   170                 'exc_mem_ass_status',
   184         if (!$this->db->tableExists(
'exc_team_data')) {
   185             $this->db->createTable(
   202         $this->db->addPrimaryKey(
'exc_team_data', [
"id"]);
   207         $set = $this->db->queryF(
   208             "SELECT DISTINCT il_exc_team.id FROM il_exc_team LEFT JOIN exc_team_data ON il_exc_team.id = exc_team_data.id WHERE exc_team_data.id IS NULL",
   212         while ($rec = $this->db->fetchAssoc($set)) {
   213             $this->db->insert(
"exc_team_data", [
   214                 "id" => [
"integer", (
int) $rec[
"id"]],
   221         if (!$this->db->tableExists(
'exc_multi_feedback')) {
   222             $this->db->createTable(
   223                 'exc_multi_feedback',
   244         $this->db->addPrimaryKey(
'exc_multi_feedback', [
"tutor_id", 
"ass_id"]);
 
prepare(\ilDBInterface $db)
Prepare the execution of the steps. 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...