This looks like it's the contents of a file used for automated testing: blocks/activity_results/tests/behat/addunsupportedactivity.feature. It certainly shouldn't get displayed in any Moodle page.
Can you share a screenshot of where this appears? And can you share the path from the URL where this appears? We don't need the domain name of your site, just the bit after this.
line 10764 of /lib/moodlelib.php: call to debugging()
line 31 of /blocks/activity_results/settings.php: call to lang_string->__construct()
line 122 of /lib/classes/plugininfo/block.php: call to include()
line 81 of /admin/settings/plugins.php: call to core\plugininfo\block->load_settings()
line 8877 of /lib/adminlib.php: call to require()
line 9009 of /lib/adminlib.php: call to admin_get_root()
line 59 of /admin/settings.php: call to admin_write_settings()
String does not exist. Please check your string definition for defaulthighestgrades_desc/block_activity_results
line 10764 of /lib/moodlelib.php: call to debugging()
line 32 of /blocks/activity_results/settings.php: call to lang_string->__construct()
line 122 of /lib/classes/plugininfo/block.php: call to include()
line 81 of /admin/settings/plugins.php: call to core\plugininfo\block->load_settings()
line 8877 of /lib/adminlib.php: call to require()
line 9009 of /lib/adminlib.php: call to admin_get_root()
line 59 of /admin/settings.php: call to admin_write_settings()
String does not exist. Please check your string definition for defaultlowestgrades/block_activity_results
line 10764 of /lib/moodlelib.php: call to debugging()
line 38 of /blocks/activity_results/settings.php: call to lang_string->__construct()
line 122 of /lib/classes/plugininfo/block.php: call to include()
line 81 of /admin/settings/plugins.php: call to core\plugininfo\block->load_settings()
line 8877 of /lib/adminlib.php: call to require()
line 9009 of /lib/adminlib.php: call to admin_get_root()
line 59 of /admin/settings.php: call to admin_write_settings()
String does not exist. Please check your string definition for defaultlowestgrades_desc/block_activity_results
line 10764 of /lib/moodlelib.php: call to debugging()
line 39 of /blocks/activity_results/settings.php: call to lang_string->__construct()
line 122 of /lib/classes/plugininfo/block.php: call to include()
line 81 of /admin/settings/plugins.php: call to core\plugininfo\block->load_settings()
line 8877 of /lib/adminlib.php: call to require()
line 9009 of /lib/adminlib.php: call to admin_get_root()
line 59 of /admin/settings.php: call to admin_write_settings()
String does not exist. Please check your string definition for defaultshowgroups/block_activity_results
line 10764 of /lib/moodlelib.php: call to debugging()
line 46 of /blocks/activity_results/settings.php: call to lang_string->__construct()
line 122 of /lib/classes/plugininfo/block.php: call to include()
line 81 of /admin/settings/plugins.php: call to core\plugininfo\block->load_settings()
line 8877 of /lib/adminlib.php: call to require()
line 9009 of /lib/adminlib.php: call to admin_get_root()
line 59 of /admin/settings.php: call to admin_write_settings()
String does not exist. Please check your string definition for defaultshowgroups_desc/block_activity_results
line 10764 of /lib/moodlelib.php: call to debugging()
line 47 of /blocks/activity_results/settings.php: call to lang_string->__construct()
line 122 of /lib/classes/plugininfo/block.php: call to include()
line 81 of /admin/settings/plugins.php: call to core\plugininfo\block->load_settings()
line 8877 of /lib/adminlib.php: call to require()
line 9009 of /lib/adminlib.php: call to admin_get_root()
line 59 of /admin/settings.php: call to admin_write_settings()
String does not exist. Please check your string definition for defaultnameoptions/block_activity_results
line 10764 of /lib/moodlelib.php: call to debugging()
line 58 of /blocks/activity_results/settings.php: call to lang_string->__construct()
line 122 of /lib/classes/plugininfo/block.php: call to include()
line 81 of /admin/settings/plugins.php: call to core\plugininfo\block->load_settings()
line 8877 of /lib/adminlib.php: call to require()
line 9009 of /lib/adminlib.php: call to admin_get_root()
line 59 of /admin/settings.php: call to admin_write_settings()
String does not exist. Please check your string definition for defaultnameoptions_desc/block_activity_results
line 10764 of /lib/moodlelib.php: call to debugging()
line 59 of /blocks/activity_results/settings.php: call to lang_string->__construct()
line 122 of /lib/classes/plugininfo/block.php: call to include()
line 81 of /admin/settings/plugins.php: call to core\plugininfo\block->load_settings()
line 8877 of /lib/adminlib.php: call to require()
line 9009 of /lib/adminlib.php: call to admin_get_root()
line 59 of /admin/settings.php: call to admin_write_settings()
String does not exist. Please check your string definition for defaultgradedisplay/block_activity_results
line 10764 of /lib/moodlelib.php: call to debugging()
line 70 of /blocks/activity_results/settings.php: call to lang_string->__construct()
line 122 of /lib/classes/plugininfo/block.php: call to include()
line 81 of /admin/settings/plugins.php: call to core\plugininfo\block->load_settings()
line 8877 of /lib/adminlib.php: call to require()
line 9009 of /lib/adminlib.php: call to admin_get_root()
line 59 of /admin/settings.php: call to admin_write_settings()
String does not exist. Please check your string definition for defaultgradedisplay_desc/block_activity_results
line 10764 of /lib/moodlelib.php: call to debugging()
line 71 of /blocks/activity_results/settings.php: call to lang_string->__construct()
line 122 of /lib/classes/plugininfo/block.php: call to include()
line 81 of /admin/settings/plugins.php: call to core\plugininfo\block->load_settings()
line 8877 of /lib/adminlib.php: call to require()
line 9009 of /lib/adminlib.php: call to admin_get_root()
line 59 of /admin/settings.php: call to admin_write_settings()
String does not exist. Please check your string definition for defaultdecimalplaces/block_activity_results
line 10764 of /lib/moodlelib.php: call to debugging()
line 81 of /blocks/activity_results/settings.php: call to lang_string->__construct()
line 122 of /lib/classes/plugininfo/block.php: call to include()
line 81 of /admin/settings/plugins.php: call to core\plugininfo\block->load_settings()
line 8877 of /lib/adminlib.php: call to require()
line 9009 of /lib/adminlib.php: call to admin_get_root()
line 59 of /admin/settings.php: call to admin_write_settings()
String does not exist. Please check your string definition for defaultdecimalplaces_desc/block_activity_results
line 10764 of /lib/moodlelib.php: call to debugging()
line 82 of /blocks/activity_results/settings.php: call to lang_string->__construct()
line 122 of /lib/classes/plugininfo/block.php: call to include()
line 81 of /admin/settings/plugins.php: call to core\plugininfo\block->load_settings()
line 8877 of /lib/adminlib.php: call to require()
line 9009 of /lib/adminlib.php: call to admin_get_root()
line 59 of /admin/settings.php: call to admin_write_settings()
Zum Hauptinhalt
Änderungen gespeichert
(Weiter)
Fehleranzeige. Die automatische Weiterleitung ist deaktiviert.
There errors in the admin sections are gone. I uploaded all the data again via FTP. The bad news, I have a few new debug messages: (And the redirect URL seems to be disabled in the admin area, not by us!)
Fehler: Class 'mod_unilabel\factory' not found
Weitere Informationen über diesen Fehler
Debug-Info:
Error code: generalexceptionmessage
Stack trace:
line 135 of /mod/unilabel/lib.php: Error thrown
line 2482 of /lib/modinfolib.php: call to unilabel_cm_info_view()
line 2510 of /lib/modinfolib.php: call to cm_info->call_mod_function()
line 1724 of /lib/modinfolib.php: call to cm_info->obtain_view_data()
line 1537 of /lib/modinfolib.php: call to cm_info->get_extra_classes()
line 106 of /course/format/classes/output/local/content/section/cmitem.php: call to cm_info->__get()
line 122 of /course/format/classes/output/local/content/section/cmlist.php: call to core_courseformat\output\local\content\section\cmitem->export_for_template()
line 225 of /course/format/classes/output/local/content/section.php: call to core_courseformat\output\local\content\section\cmlist->export_for_template()
line 156 of /course/format/classes/output/local/content/section.php: call to core_courseformat\output\local\content\section->add_cm_data()
line 46 of /course/format/topics/classes/output/courseformat/content/section.php: call to core_courseformat\output\local\content\section->export_for_template()
line 161 of /course/format/classes/output/local/content.php: call to format_topics\output\courseformat\content\section->export_for_template()
line 86 of /course/format/classes/output/local/content.php: call to core_courseformat\output\local\content->export_sections()
line 504 of /lib/outputrenderers.php: call to core_courseformat\output\local\content->export_for_template()
line 108 of /course/format/classes/output/section_renderer.php: call to plugin_renderer_base->render()
line 60 of /course/format/topics/format.php: call to core_courseformat\output\section_renderer->render()
line 284 of /course/view.php: call to require()
@Visvanath
The update was from 4.16.xx to the latest 4.16 version.
Greets Andy
Is the file mod/unilabel/classes/factory.php present in your Moodle source code folder? Does it have the expected contents:
<?php
⋮
namespace mod_unilabel;
⋮
class factory {
⋮
Thx for reading and help. The file is present in \moodle\mod\unilabel\classes\factory.php
Content of this file is from line 1 to 185:
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see .
/**
* unilabel module
*
* @package mod_unilabel
* @author Andreas Grabs * @copyright 2018 onwards Grabs EDV {@link https://www.grabs-edv.de}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace mod_unilabel;
defined('MOODLE_INTERNAL') || die();
require_once($CFG->libdir.'/formslib.php');
/**
* Build a moodle form and uses the form elements given by the used content type.
* @package mod_unilabel
* @author Andreas Grabs * @copyright 2018 onwards Grabs EDV {@link https://www.grabs-edv.de}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class edit_content_form extends \moodleform {
/** @var \stdClass $_course */
private $_course;
/**
* Get an options array to use files in the editor.
*
* @param \context $context
* @return array
*/
public static function editor_options($context) {
return array(
'maxfiles' => EDITOR_UNLIMITED_FILES,
'noclean' => true,
'context' => $context,
'subdirs' => true);
}
/**
* Moodle form definition method to define all needed elements.
* It uses the elements needed by the current content type.
*
* @return void
*/
public function definition() {
$mform = $this->_form;
$this->unilabel = $this->_customdata['unilabel'];
$this->unilabeltype = $this->_customdata['unilabeltype'];
$this->cm = $this->_customdata['cm'];
$this->context = \context_module::instance($this->cm->id);
$this->_course = get_course($this->cm->course);
$mform->addElement('hidden', 'cmid');
$mform->setType('cmid', PARAM_INT);
$mform->addElement('hidden', 'id');
$mform->setType('id', PARAM_INT);
$mform->addElement('header', 'unilabelcontenthdr', get_string('editcontent', 'mod_unilabel'));
$this->add_intro_editor();
$this->add_plugin_form_elements();
$this->add_action_buttons();
$this->set_data((array) $this->unilabel);
}
/**
* Does the validation of the submitted values.
*
* @param array $data
* @param array $files
* @return array
*/
public function validation($data, $files) {
$errors = parent::validation($data, $files);
$errors = $this->unilabeltype->form_validation($errors, $data, $files);
return $errors;
}
/**
* Add the intro editor as form element.
*
* @return void
*/
private function add_intro_editor() {
$mform = $this->_form;
$mform->addElement('editor',
'introeditor',
get_string('unilabeltext', 'mod_unilabel'),
array('rows' => 10),
self::editor_options($this->context)
);
$mform->setType('introeditor', PARAM_RAW); // No XSS prevention here, users must be trusted.
}
/**
* Set all default data while loading the form.
*
* @param array $defaultvalues
* @return void
*/
public function set_data($defaultvalues) {
$defaultvalues['cmid'] = $this->cm->id;
$plugindefaultvalues = $this->get_plugin_defaultvalues();
$defaultvalues = $defaultvalues + $plugindefaultvalues;
$draftitemid = file_get_submitted_draft_itemid('introeditor');
$defaultvalues['introeditor']['text'] =
file_prepare_draft_area($draftitemid,
$this->context->id,
'mod_unilabel',
'intro',
false,
array('subdirs' => true),
$defaultvalues['intro']);
$defaultvalues['introeditor']['format'] = $defaultvalues['introformat'];
$defaultvalues['introeditor']['itemid'] = $draftitemid;
parent::set_data($defaultvalues);
}
/**
* Add all form elements needed by the current content type.
*
* @return void
*/
private function add_plugin_form_elements() {
$this->unilabeltype->add_form_fragment($this, $this->context);
}
/**
* Get all default values from the current content type.
*
* @return array
*/
private function get_plugin_defaultvalues() {
$data = array();
$data = $this->unilabeltype->get_form_default($data, $this->unilabel);
return $data;
}
/**
* Return the \MoodleQuickForm form so the current content type can use it.
*
* @return \MoodleQuickForm
*/
public function get_mform() {
return $this->_form;
}
/**
* Return the current course.
*
* @return \stdClass
*/
public function get_course() {
return $this->_course;
}
}
Greets Andy
The file you've shared is missing the definition class factory {.... It looks like the contents of mod/unilabel/classes/edit_content_form.php – the wrong file entirely. Try re-uploading the Unilabel plugin's source code into folder mod/unilabel.
For larger amounts of information one can attach files to a reply.
Errors are gone. Thx Leon, so i will investigate is something wrong with our ftp upload.
Greets Andy