code: public function readModule($id, $type) {
          $model = $this->readObject($id, $type);
          $module = $this->readStoreRecord('modules', ['name' => $type]);
          $course_module = $this->readStoreRecord('course_modules', [
              'instance' => $id,
              'module' => $module->id,
              'course' => $model->course
          ]);
          $model->url = $this->cfg->wwwroot . '/mod/'.$type.'/view.php?id=' . $course_module->id;
          return $model;
      }
docs: Reads an object from the store with the given id.
  @param String $id
  @param String $type
  @return PhpObj