Igor пре 2 година
родитељ
комит
736074711d
2 измењених фајлова са 2 додато и 3 уклоњено
  1. 1 2
      db/upgrade.php
  2. 1 1
      lib.php

+ 1 - 2
db/upgrade.php

@@ -493,6 +493,7 @@ function xmldb_iassign_upgrade ($oldversion) {
     $DB->update_record("iassign_ilm", $updateentry); // insert new iLM
     }
 
+  $strNot_installed = '';
   if ($oldversion < 2021122300) {
 
     // Update iHanoi
@@ -522,8 +523,6 @@ function xmldb_iassign_upgrade ($oldversion) {
       $newentry->evaluate = $record['evaluate'];
       $newentry->reevaluate = $record['reevaluate'];
 
-//parent
-//16 => NULL,
       $exists = 0;
       $last_id = -1;
       if ($iassign_ilm) { // Search if there is any previous installed iLM that is also in the current version of iAssign

+ 1 - 1
lib.php

@@ -173,7 +173,7 @@ function iassign_grade_item ($iassign) {
   $iassign->grade = 0;
   $grades = NULL;
 
-  if (array_key_exists('cmidnumber', $iassign)) { //it may not be always present
+  if (isset($iassign->cmidnumber)) { //it may not be always present
     $params = array('itemname' => $iassign->name, 'idnumber' => $iassign->cmidnumber);
     }
   else {