protected function prepare_module_data($draftitemid = null, $content = null) {
        $data = new stdClass();
        $data->type = $this->type;
        $data->course = $this->course;
        if ($draftitemid) {
            $data->draftitemid = $draftitemid;
        } else if ($content) {
            $data->content = $content;
        }
        $data->coursemodule = $this->cm->id;
        $data->displayname = $this->displayname;
        return $data;
    }
protected function prepare_module_data($draftitemid = null, $content = null) {
        $data = new stdClass();
        $data->type = $this->type;
        $data->course = $this->course;
        if ($draftitemid) {
            $data->draftitemid = $draftitemid;
        } else if ($content) {
            $data->content = $content;
        }
        $data->coursemodule = $this->cm->id;
        $data->displayname = $this->displayname;
        return $data;
    }
protected function prepare_module_data ( $ draftitemid = null , $ content = null ) { $ data = new stdClass ( ) ; $ data -> type = $ this -> type ; $ data -> course = $ this -> course ; if ( $ draftitemid ) { $ data -> draftitemid = $ draftitemid ; } else if ( $ content ) { $ data -> content = $ content ; } $ data -> coursemodule = $ this -> cm -> id ; $ data -> displayname = $ this -> displayname ; return $ data ; }
Gather together all the details to pass on to the mod, so that it can initialise it's
own database tables

@param int $draftitemid optional the id of the draft area containing the file (for file uploads)
@param string $content optional the content dropped onto the course (for non-file uploads)
@return object data to pass on to the mod, containing:
string $type the 'type' as registered with dndupload_handler (or 'Files')
object $course the course the upload was for
int $draftitemid optional the id of the draft area containing the files
int $coursemodule id of the course module that has already been created
string $displayname the name to use for this activity (can be overriden by the mod)
Gather together all the details to pass on to the mod so that it can initialise it s own database tables