Ejemplo n.º 1
0
<?php

require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/config.php';
//include simplehtml_form.php
require_once 'forms/create_activity.php';
//Código para setear contexto, url, layout
global $PAGE, $USER, $CFG, $OUTPUT, $DB;
$PAGE->set_pagelayout('embedded');
require_login();
$PAGE->set_context(context_system::instance());
$url = new moodle_url($CFG->wwwroot . '/mod/emarking/activities/create.php');
$PAGE->set_url($url);
echo $OUTPUT->header();
//Instantiate simplehtml_form
$mform = new local_ciae_create_activity();
//Form processing and displaying is done here
if ($mform->is_cancelled()) {
    //Handle form cancel operation, if cancel button is present on form
} else {
    if ($fromform = $mform->get_data()) {
        require 'generos.php';
        $course = $fromform->codigoOA['course'];
        $oaCode = "";
        $oaCode .= $course . '[';
        foreach ($fromform->codigoOA['oa'] as $data) {
            $oaCode .= $data . ',';
        }
        $oaCode .= ']';
        $instructions = $fromform->instructions['text'];
        $suggestion = $fromform->didacticSuggestions['text'];
        $genero = (int) $fromform->genre - 1;
Ejemplo n.º 2
0
<?php

require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/config.php';
//include simplehtml_form.php
require_once 'forms/create_activity.php';
//Código para setear contexto, url, layout
global $PAGE, $USER, $CFG, $OUTPUT, $DB;
$PAGE->set_pagelayout('embedded');
require_login();
$context = context_system::instance();
$PAGE->set_context($context);
$url = new moodle_url($CFG->wwwroot . '/mod/emarking/activities/create.php');
$PAGE->set_url($url);
echo $OUTPUT->header();
//Instantiate simplehtml_form
$mform = new local_ciae_create_activity();
//Form processing and displaying is done here
if ($mform->is_cancelled()) {
    //Handle form cancel operation, if cancel button is present on form
} else {
    if ($fromform = $mform->get_data()) {
        require 'generos.php';
        $course = $fromform->codigoOA['course'];
        $oaCode = "";
        $oaCode .= $course . '[';
        foreach ($fromform->codigoOA['oa'] as $data) {
            $oaCode .= $data . ',';
        }
        $oaCode .= ']';
        $instructions = $fromform->instructions['text'];
        $suggestion = $fromform->didacticSuggestions['text'];