Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 1441
Línea 405... Línea 405...
405
            }
405
            }
406
        }
406
        }
407
        return '';
407
        return '';
408
    }
408
    }
Línea -... Línea 409...
-
 
409
 
-
 
410
 
-
 
411
    #[\Override]
-
 
412
    public function submission_summary_for_messages(stdClass $submission): array {
-
 
413
        global $PAGE;
-
 
414
 
-
 
415
        $onlinetextsubmission = $this->get_onlinetext_submission($submission->id);
-
 
416
        if (!$onlinetextsubmission || !$onlinetextsubmission->onlinetext) {
-
 
417
            return ['', ''];
-
 
418
        }
-
 
419
 
-
 
420
        $renderer = $PAGE->get_renderer('mod_assign');
-
 
421
        $templatecontext = ['wordcount' => count_words($onlinetextsubmission->onlinetext)];
-
 
422
        return [
-
 
423
            // Mustache strips off all trailing whitespace, but we want a newline at the end.
-
 
424
            $renderer->render_from_template(
-
 
425
               'assignsubmission_onlinetext/email_summary_text', $templatecontext) . "\n",
-
 
426
            $renderer->render_from_template(
-
 
427
               'assignsubmission_onlinetext/email_summary_html', $templatecontext),
-
 
428
        ];
-
 
429
    }
409
 
430
 
410
    /**
431
    /**
411
     * Produce a list of files suitable for export that represent this submission.
432
     * Produce a list of files suitable for export that represent this submission.
412
     *
433
     *
413
     * @param stdClass $submission - For this is the submission data
434
     * @param stdClass $submission - For this is the submission data