Hola,
m'he creat un block i des d'ell executo un fitxer php. Fins aqui cap problema, els resultats son els esperats(es mostren en una nova finestra de l'explorador). Però la meva intenció es que el resultat mostrat pel php es mostri dins un pagina moodle, com passa quan realitzes qualsevol accio amb moodle, que vas aprofundint en la seva estructura.
Us mostro el codi del block:
<?PHP //$Id: block_search_forums.php,v 1.10 2005/05/07 16:25:46 defacer Exp $
class block_cerca extends block_base {
function init() {
$this->title = get_string('cerca', 'block_cerca');
$this->version = 2005030900;
}
function get_content() {
global $CFG;
if($this->content !== NULL) {
return $this->content;
}
$this->content = new stdClass;
$this->content->footer = '';
if (empty($this->instance)) {
$this->content->text = '';
return $this->content;
}
$project = $CFG->wwwroot.'/../project_Xquery.php';
$this->content->text = '<FORM ACTION="'.$project.'" METHOD="POST">
<INPUT TYPE="text" NAME="nombre"><BR>
<INPUT TYPE="submit" VALUE="Enviar">
</FORM> ';
return $this->content;
}
function instance_allow_config() {
return true;
}
//permet canviar el titol
function specialization() {
$this->title = $this->config->title;
}
}
?>
Algu em pot ajudar?
Gracies.