if ((isset($form->evaluation) ? $form->evaluation : '') == $fontop) {
         $prop->selected = "selected";
     }
     $opt .= wiki_option($fontop, $prop, true);
 }
 $prop = null;
 $prop->name = "font";
 $prop->size = "1";
 $prop->events = "onchange=\"javascript:view_evaluations(event)\"";
 wiki_select($opt, $prop);
 //}
 $prop = null;
 $prop->align = "right";
 wiki_change_row($prop);
 echo "<!-- SELECCIONAR TAMANY LLETRA -->" . "\n";
 wiki_b(get_string('pdfFontSize', 'wiki') . ':');
 $prop = null;
 $prop->class = "nwikileftnow";
 wiki_change_column($prop);
 if (isset($dfwiki)) {
     print_string($dfwiki->evaluation, 'wiki');
     //<!-- corregir -->
 } else {
     $size_font_default = '12';
     $size_fonts = array('8', '9', '10', '11', '12', '14', '16', '18', '20', '22', '24', '26', '28', '36');
     $opt = null;
     foreach ($size_fonts as $size_fontop) {
         $prop = null;
         $prop->value = $size_fontop;
         if ($size_fontop == $size_font_default) {
             $prop->selected = "selected";
     $um = new upload_manager('userfile', false, false, $course, false, 0);
     $dir = "{$basedir}{$wdir}";
     if ($um->process_file_uploads($dir)) {
         notify(get_string('uploadedfile'));
     }
     // um will take care of error reporting.
     displaydir($wdir);
 } else {
     $upload_max_filesize = get_max_upload_file_size($CFG->maxbytes);
     $filesize = display_size($upload_max_filesize);
     $struploadafile = get_string("uploadafile");
     $struploadthisfile = get_string("uploadthisfile");
     $strmaxsize = get_string("maxsize", "", $filesize);
     $strcancel = get_string("cancel");
     $out = $struploadafile . " (" . $strmaxsize . ") --> ";
     $out .= wiki_b($wdir, '', true);
     wiki_paragraph($out);
     $prop = null;
     $prop->colspantd = "2";
     wiki_table_start($prop);
     $prop = null;
     $prop->action = "index.php";
     $prop->method = "post";
     $prop->enctype = "multipart/form-data";
     wiki_form_start($prop);
     wiki_div_start();
     $prop = null;
     $prop->name = "choose";
     $prop->value = $choose;
     wiki_input_hidden($prop);
     $prop = null;
function wiki_navigator_content(&$WS)
{
    global $CFG;
    $table = new stdClass();
    $table->head = array(get_string('camefrom', 'wiki'), get_string('pagename', 'wiki'), get_string('goesto', 'wiki'));
    $ead = wiki_manager_get_instance();
    //new wiki_ead_tools();
    $camefroms = $ead->get_wiki_page_camefrom($WS->pagedata->pagename);
    $goestos = $ead->get_wiki_page_goesto($WS->pagedata->pagename);
    $out = wiki_b($WS->page, '', true);
    $prop = null;
    $prop->class = 'textcenter';
    $out2 = wiki_paragraph($out, $prop, true);
    $table->data[] = array("", $out2, "");
    $i = 0;
    foreach ($camefroms as $cpage) {
        $prop = null;
        $prop->href = $CFG->wwwroot . $WS->wikitype . $WS->linkid . '&amp;page=' . urlencode($cpage->pagename);
        $out = wiki_a($cpage->pagename, $prop, true);
        $prop = null;
        $prop->class = 'textcenter';
        $out2 = wiki_paragraph($out, $prop, true);
        $table->data[0][0] .= $out2;
    }
    foreach ($goestos as $gpage) {
        if (wiki_page_exists($WS, $gpage)) {
            $prop = null;
            $prop->href = $CFG->wwwroot . $WS->wikitype . $WS->linkid . '&amp;page=' . urlencode($gpage);
            $out = wiki_a($gpage, $prop, true);
            $prop = null;
            $prop->class = 'textcenter';
            $out2 = wiki_paragraph($out, $prop, true);
            $table->data[0][2] .= $out2;
        } else {
            $out = "";
            $prop = null;
            $prop->href = $CFG->wwwroot . $WS->wikitype . $WS->linkid . '&amp;page=' . urlencode($gpage);
            $out .= wiki_a($gpage, $prop, true);
            $prop = null;
            $prop->class = 'textcenter nwikiwanted';
            $out2 = wiki_paragraph($out, $prop, true);
            $table->data[0][2] .= $out2;
        }
    }
    $table->width = '100%';
    print_table($table);
}
function wiki_import_wiki(&$WS)
{
    global $file;
    //if the form is complete
    $sure = optional_param('dfformsure', NULL, PARAM_ALPHA);
    if (isset($sure)) {
        //import to xml
        wiki_import_wiki_XML($WS);
        $prop = null;
        $prop->class = 'textcenter';
        $info = wiki_size_text(get_string("importcorrectly", 'wiki'), 2, '', true);
        wiki_div($info, $prop);
        $prop = null;
        $prop->action = '../view.php?id=' . $WS->cm->id;
        $prop->method = 'post';
        $prop->id = 'form';
        wiki_form_start($prop);
        $prop = null;
        $prop->border = '0';
        $prop->class = 'boxaligncenter';
        $prop->classtd = 'nwikileftnow';
        wiki_table_start($prop);
        $prop = null;
        $prop->name = 'dfformcontinue';
        $prop->value = get_string('continue');
        $input = wiki_input_submit($prop, true);
        wiki_div($input);
        wiki_table_end();
        wiki_form_end();
    } else {
        if (isset($WS->dfform['import'])) {
            $extension = explode("/", $WS->path);
            $num = count($extension) - 1;
            $name = $extension[$num];
            $info = wiki_b(get_string("importcheckwarning", 'wiki'), '', true);
            $info .= '    ' . $name;
            $prop = null;
            $prop->class = 'textcenter';
            wiki_paragraph($info, $prop);
            switch ($WS->dfform['incase']) {
                case 0:
                    $name = get_string("always", 'diki');
                    break;
                case 1:
                    $name = get_string("never", 'wiki');
                    break;
                case 2:
                    $name = get_string("before", 'wiki');
                    break;
                case 3:
                    $name = get_string("after", 'wiki');
                    break;
                default:
                    break;
            }
            $info = wiki_b(get_string("incase", 'wiki'), '', true);
            $info .= '  ' . $name;
            $prop = null;
            $prop->class = 'textcenter';
            wiki_paragraph($info, $prop);
            switch ($WS->dfform['incaseatach']) {
                case 0:
                    $name = get_string("alwaysatach", 'wiki');
                    break;
                case 1:
                    $name = get_string("neveratach", 'wiki');
                    break;
                case 2:
                    $name = get_string("beforeatach", 'wiki');
                    break;
                case 3:
                    $name = get_string("afteratach", 'wiki');
                    break;
                case 4:
                    $name = get_string("bigeratach", 'wiki');
                    break;
                case 5:
                    $name = get_string("smalleratach", 'wiki');
                    break;
                default:
                    break;
            }
            $info = wiki_b(get_string("incaseatach", 'wiki'), '', true);
            $info .= '  ' . $name;
            $prop = null;
            $prop->class = 'textcenter';
            wiki_paragraph($info, $prop);
            wiki_br();
            $prop = null;
            $prop->class = 'textcenter';
            wiki_paragraph(get_string("importcheckfiles", 'wiki'), $prop);
            $prop = null;
            $prop->class = 'boxaligncenter';
            wiki_table_start($prop);
            $prop = null;
            $prop->action = 'exportxml.php?id=' . $WS->cm->id . '&amp;pageaction=importxml&amp;path=' . $WS->path;
            $prop->method = 'post';
            $prop->id = 'form1';
            wiki_form_start($prop);
            $prop = null;
            $prop->name = 'dfformincase';
            $prop->value = $WS->dfform['incase'];
            wiki_input_hidden($prop);
            $prop = null;
            $prop->name = 'dfformincaseatach';
            $prop->value = $WS->dfform['incaseatach'];
            wiki_input_hidden($prop);
            $prop = null;
            $prop->name = 'dfformsure';
            $prop->value = get_string('yes');
            wiki_input_submit($prop);
            wiki_form_end();
            wiki_change_column();
            $prop = null;
            $prop->action = 'exportxml.php?id=' . $WS->cm->id . '&amp;pageaction=importewiki&amp;path=' . $WS->path . '&amp;file=' . $file;
            $prop->method = 'post';
            $prop->id = 'form2';
            wiki_form_start($prop);
            $prop = null;
            $prop->name = 'dfformcancel';
            $prop->value = get_string('no');
            wiki_input_submit($prop);
            wiki_form_end();
            wiki_table_end();
        } else {
            //create the form to import
            $prop = null;
            $prop->action = 'exportxml.php?id=' . $WS->cm->id . '&amp;pageaction=importewiki&amp;type=' . $WS->type . '&amp;path=' . $WS->path . '&amp;file=' . $file;
            $prop->method = 'post';
            $prop->id = 'form';
            wiki_form_start($prop);
            $prop = null;
            $prop->border = '0';
            $prop->class = 'boxaligncenter';
            $prop->classtd = 'nwikileftnow';
            wiki_table_start($prop);
            wiki_b(get_string('incase', 'wiki'));
            wiki_table_start();
            $prop = null;
            $prop->name = 'dfformincase';
            $prop->value = '0';
            $prop->checked = 'checked';
            wiki_input_radio($prop);
            print_string('always', 'wiki');
            wiki_change_row();
            $prop = null;
            $prop->name = 'dfformincase';
            $prop->value = '1';
            wiki_input_radio($prop);
            print_string('never', 'wiki');
            wiki_change_row();
            $prop = null;
            $prop->name = 'dfformincase';
            $prop->value = '2';
            wiki_input_radio($prop);
            print_string('before', 'wiki');
            wiki_change_row();
            $prop = null;
            $prop->name = 'dfformincase';
            $prop->value = '3';
            wiki_input_radio($prop);
            print_string('after', 'wiki');
            wiki_table_end();
            wiki_br(2);
            $prop = null;
            $prop->class = "nwikileftnow";
            wiki_change_row($prop);
            wiki_b(get_string('incaseatach', 'wiki'));
            wiki_table_start();
            $prop = null;
            $prop->name = 'dfformincaseatach';
            $prop->value = '0';
            $prop->checked = 'checked';
            wiki_input_radio($prop);
            print_string('alwaysatach', 'wiki');
            wiki_change_row();
            $prop = null;
            $prop->name = 'dfformincaseatach';
            $prop->value = '1';
            wiki_input_radio($prop);
            print_string('neveratach', 'wiki');
            wiki_change_row();
            $prop = null;
            $prop->name = 'dfformincaseatach';
            $prop->value = '2';
            wiki_input_radio($prop);
            print_string('beforeatach', 'wiki');
            wiki_change_row();
            $prop = null;
            $prop->name = 'dfformincaseatach';
            $prop->value = '3';
            wiki_input_radio($prop);
            print_string('afteratach', 'wiki');
            wiki_change_row();
            $prop = null;
            $prop->name = 'dfformincaseatach';
            $prop->value = '4';
            wiki_input_radio($prop);
            print_string('bigeratach', 'wiki');
            wiki_change_row();
            $prop = null;
            $prop->name = 'dfformincaseatach';
            $prop->value = '5';
            wiki_input_radio($prop);
            print_string('smalleratach', 'wiki');
            wiki_table_end();
            wiki_br(2);
            $prop = null;
            $prop->class = "nwikicenternow";
            wiki_change_row($prop);
            $prop = null;
            $prop->name = 'dfformimport';
            $prop->value = get_string('import', 'wiki');
            wiki_input_submit($prop);
            wiki_table_end();
            wiki_form_end();
        }
    }
}
 wiki_change_row();
 wiki_paragraph(get_string('subtitle', 'wiki'));
 wiki_change_column();
 unset($prop);
 $prop->name = "doc_subtitle";
 $pro->size = 20;
 wiki_input_text($prop);
 wiki_table_end();
 //Table form information pdf
 wiki_change_row();
 // Table parameter
 unset($prop);
 $prop->class = "boxalignleft";
 wiki_table_start($prop);
 // Table font header
 wiki_b(get_string('wikibooks_font_header', 'wiki') . ':');
 unset($prop);
 $prop->class = "nwikileftnow";
 wiki_change_column($prop);
 $font = 'Vera';
 $fonts = array('Vera', 'Veramo', 'Freesans', 'Freeserif', 'Freemono');
 $opt = null;
 foreach ($fonts as $fontop) {
     unset($prop);
     $prop->value = $fontop;
     if ($font === $fontop) {
         $prop->selected = "selected";
     }
     $opt .= wiki_option($fontop, $prop, true);
 }
 $prop = null;
    echo wiki_grade_get_users_info($cid, $wiki->id);
}
////////// PRINT TABLE WIKI PAGES AND EDITIONS /////////////////////////////////////////////////////////////////
wiki_grade_print_tables($selectedgroup, $selecteduser, $wiki, $cmodule, $scale, $course);
///////// SECTION TO VALUE THE USERS //////////////////////////////////////////////////////////////////////////
echo '<h3 class="headingblock header outline">' . get_string('eval_user', 'wiki') . '</h3><br/>';
unset($prop);
$prop->class = "box boxaligncenter";
wiki_div_start($prop);
if (count($users) > 0) {
    unset($prop);
    $prop->id = "form_gradebook";
    $prop->method = "post";
    $prop->action = "{$CFG->wwwroot}/mod/wiki/grades/grades.evaluation.php?cid={$cid}&amp;cmid={$cmid}&amp;group={$selectedgroup}&amp;user={$key}";
    wiki_form_start($prop);
    wiki_b(get_string('user') . ':');
    if (isset($selecteduser)) {
        $opt = '';
        foreach ($users as $key => $user) {
            unset($prop);
            $prop->value = "{$key}";
            $prop->name = "{$user}";
            if ($selecteduser == $key) {
                $prop->selected = 'selected';
            }
            $opt .= wiki_option($user, $prop, true);
        }
        unset($prop);
        $prop->id = "select_users_grades";
        $prop->name = $prop->id;
        wiki_select($opt, $prop);