瀏覽代碼

Preenchidos os novos dos iLM campos no install

Igor 4 年之前
父節點
當前提交
383fb862ff
共有 1 個文件被更改,包括 22 次插入10 次删除
  1. 22 10
      db/install.php

+ 22 - 10
db/install.php

@@ -67,38 +67,48 @@ function xmldb_iassign_install () {
       array_combine( // iVProg 1.0.20200121 - HTML5
         array('name', 'url', 'version', 'type', 'description',
               'extension', 'file_jar', 'file_class', 'width', 'height',
-              'enable', 'evaluate', 'reevaluate', 'timemodified', 'author', 'timecreated'),
+              'enable', 'evaluate', 'reevaluate', 'timemodified', 'author', 'timecreated',
+              'editingbehavior', 'submissionbehavior'),
         array('iVProg', 'http://www.usp.br/line/ivprog/', '1.0.20200121', 'HTML5', '{"en":"Visual Interactive Programming on the Internet (HTML)","pt_br":"Programação visual interativa na Internet"}',
               'ivph', 'ilm/iVProg/1.0.20190717/ivprog/', 'index.html', 800, 600,
-              1, 1, 1, time(), $USER->id, time())),
+              1, 1, 1, time(), $USER->id, time(),
+              1, 0)),
       array_combine( // iHanoi 1.0.20200803 - HTML5
         array('name', 'url', 'version', 'type', 'description',
               'extension', 'file_jar', 'file_class', 'width', 'height',
-              'enable', 'evaluate', 'reevaluate', 'timemodified', 'author', 'timecreated'),
+              'enable', 'evaluate', 'reevaluate', 'timemodified', 'author', 'timecreated',
+              'editingbehavior', 'submissionbehavior'),
         array('iHanoi', 'http://www.matematica.br/ihanoi', '1.0.20200803', 'HTML5', '{"en":"interactive Tower os Hanoi (by LInE)", "pt_br":"Torres de Hanói (do LInE)"}',
               'ihn', 'ilm/iHanoi/1.0.20200803/ihanoi/', 'index.html', 1100, 500,
-              1, 1, 1, time(), $USER->id, time())),
+              1, 1, 1, time(), $USER->id, time(),
+              0, 0)),
       array_combine( // iFractions 0.1.20200221 - HTML5
         array('name', 'url', 'version', 'type', 'description',
               'extension', 'file_jar', 'file_class', 'width', 'height',
-              'enable', 'evaluate', 'reevaluate', 'timemodified', 'author', 'timecreated'),
+              'enable', 'evaluate', 'reevaluate', 'timemodified', 'author', 'timecreated',
+              'editingbehavior', 'submissionbehavior'),
         array('iFractions', 'http://www.matematica.br/ifractions', '0.1.20200221', 'HTML5', '{"en":"Interactive Fractions game","pt_br":"Jogo interativa de frações"}',
               'frc', 'ilm/iFractions/0.1.20200221/ifractions/', 'index.html', 1000, 600,
-              1, 1, 0, time(), $USER->id, time())),
+              1, 1, 0, time(), $USER->id, time(),
+              0, 0)),
       array_combine( // iGeom 5.9.22 - Java
         array('name', 'url', 'version', 'type', 'description',
               'extension', 'file_jar', 'file_class', 'width', 'height',
-              'enable', 'evaluate', 'reevaluate', 'timemodified', 'author', 'timecreated'),
+              'enable', 'evaluate', 'reevaluate', 'timemodified', 'author', 'timecreated',
+              'editingbehavior', 'submissionbehavior'),
         array('iGeom', 'http://www.matematica.br/igeom', '5.9.22', 'Java', '{"en":"Interactive Geometry on the Internet","pt_br":"Geometria Interativa na Internet"}',
               'geo', 'ilm/iGeom/5.9.22/iGeom.jar', 'IGeomApplet.class', 800, 600, 
-              1, 1, 0, time(), $USER->id, time())),
+              1, 1, 0, time(), $USER->id, time(),
+              0, 0)),
       array_combine( // Risco 2.2.23 - Java
         array('name', 'url', 'version', 'type', 'description',
               'extension', 'file_jar', 'file_class', 'width', 'height',
-              'enable', 'evaluate', 'reevaluate', 'timemodified', 'author', 'timecreated'),
+              'enable', 'evaluate', 'reevaluate', 'timemodified', 'author', 'timecreated',
+              'editingbehavior', 'submissionbehavior'),
         array('Risko', 'http://risko.pcc.usp.br/', '2.2.23', 'Java', '{"en":"Technical drawing with triangle and ruler","pt_br":"Desenho Geomẽtrico com esquadro"}',
               'rsk', 'ilm/Risko/2.2.23/Risko.jar', 'RiskoApplet.class', 800, 600,
-              1, 0, 0, time(), $USER->id, time()))
+              1, 0, 0, time(), $USER->id, time(),
+              1, 0))
       );
 
     $strInstalled_iLM = "";
@@ -121,6 +131,8 @@ function xmldb_iassign_install () {
       $newentry->timemodified = time();
       $newentry->author = $USER->id;
       $newentry->timecreated = time();
+      $newentry->editingbehavior = $record['editingbehavior'];
+      $newentry->submissionbehavior = $record['submissionbehavior'];
       try {
         $DB->insert_record("iassign_ilm", $newentry, false);
         $strInstalled_iLM .= "\n" . '  <li>' . $record['name'] . ';' . $record['type'] . ';' . $record['version'] . ' </li>' . "\n";