Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 11
Línea 12... Línea 12...
12
// GNU General Public License for more details.
12
// GNU General Public License for more details.
13
//
13
//
14
// You should have received a copy of the GNU General Public License
14
// You should have received a copy of the GNU General Public License
15
// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
15
// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
Línea 16... Línea -...
16
 
-
 
17
/**
-
 
18
 * Output the actionbar for this activity.
-
 
19
 *
-
 
20
 * @package   mod_assign
-
 
21
 * @copyright 2021 Adrian Greeve <adrian@moodle.com>
-
 
22
 * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
-
 
23
 */
-
 
24
 
16
 
Línea 25... Línea 17...
25
namespace mod_assign\output;
17
namespace mod_assign\output;
26
 
18
 
27
use templatable;
19
use templatable;
Línea 54... Línea 46...
54
     *
46
     *
55
     * @param  \renderer_base $output renderer base output.
47
     * @param  \renderer_base $output renderer base output.
56
     * @return array Data to be used for a template.
48
     * @return array Data to be used for a template.
57
     */
49
     */
58
    public function export_for_template(\renderer_base $output): array {
50
    public function export_for_template(\renderer_base $output): array {
59
        return [
-
 
60
            'submissionlink' => (new moodle_url('/mod/assign/view.php', ['id' => $this->cmid, 'action' => 'grading']))->out(false),
51
        $submissionlink = new moodle_url('/mod/assign/view.php', ['id' => $this->cmid, 'action' => 'grading']);
61
            'gradelink' => (new moodle_url('/mod/assign/view.php', ['id' => $this->cmid, 'action' => 'grader']))->out(false)
52
        $return = ['submissionlink' => $submissionlink->out(false)];
62
        ];
-
 
63
    }
-
 
Línea -... Línea 53...
-
 
53
 
-
 
54
        if (has_capability('mod/assign:grade', \context_module::instance($this->cmid))) {
-
 
55
            $gradelink = new moodle_url('/mod/assign/view.php', ['id' => $this->cmid, 'action' => 'grader']);
-
 
56
            $return['gradelink'] = $gradelink->out(false);
-
 
57
        }
-
 
58
 
-
 
59
        return $return;
64
 
60
    }