Proyectos de Subversion Moodle

Rev

Rev 114 | Rev 116 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 114 Rev 115
Línea 31... Línea 31...
31
        require_once($CFG->dirroot . '/comment/lib.php');
31
        require_once($CFG->dirroot . '/comment/lib.php');
Línea 32... Línea 32...
32
 
32
 
33
        $this->title = get_string('pluginname', 'block_comments');
33
        $this->title = get_string('pluginname', 'block_comments');
Línea 34... Línea -...
34
    }
-
 
35
 
-
 
36
    /*function specialization()
-
 
37
    {
-
 
38
        // require js for commenting
-
 
39
        comment::init();
-
 
40
    }*/
-
 
41
 
-
 
42
    public function applicable_formats()
-
 
43
    {
-
 
44
 
-
 
45
        return [
-
 
46
            'all' => false,
-
 
47
            'my' => false,
-
 
48
            'admin' => false,
-
 
49
            'course' => false,
-
 
50
            'course-view' => true,
-
 
51
            'enrol' => true,
-
 
52
        ];
-
 
53
    }
34
    }
54
 
35
 
55
    function specialization()
36
    function specialization()
56
    {
37
    {
57
        global $CFG, $DB;
38
        global $CFG, $DB;
58
        if (empty($this->config)) {
39
        if (empty($this->config)) {
59
            $this->instance->defaultregion = 'bellow-content';
40
            $this->instance->defaultregion = 'side-pre';
Línea 60... Línea 41...
60
            $this->instance->region = 'bellow-content';
41
            $this->instance->region = 'side-pre';
61
            $DB->update_record('block_instances', $this->instance);
42
            $DB->update_record('block_instances', $this->instance);
62
 
43
 
63
            $this->title = 'Comments';
44
            $this->title = 'Students feedback';
-
 
45
        } else {
-
 
46
            $this->title = get_string('pluginname', 'block_comments');
64
        } else {
47
        }
Línea 65... Línea 48...
65
            $this->title = get_string('pluginname', 'comments');
48
 
66
        }
49
        comment::init();
67
    }
50
    }
68
 
51
 
Línea 69... Línea 52...
69
    /*function applicable_formats()
52
    function applicable_formats()
70
    {
53
    {
71
        return array('all' => true);
54
        return array('all' => true);
72
    }*/
55
    }