mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 12:32:08 +02:00
MDL-67262 core_course: integration review changes
This commit is contained in:
parent
ebdbe8736e
commit
b3fe33ac75
@ -62,7 +62,7 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
|
||||
)
|
||||
);
|
||||
$ADMIN->add('courses',
|
||||
new admin_externalpage('activitychooser', new lang_string('activitychooser', 'course'),
|
||||
new admin_externalpage('activitychooser', new lang_string('activitychooserrecommendations', 'course'),
|
||||
new moodle_url('/course/recommendations.php'),
|
||||
array('moodle/course:recommendactivity')
|
||||
)
|
||||
|
@ -51,4 +51,4 @@ export const init = () => {
|
||||
checkboxelements.forEach((checkbox) => {
|
||||
checkbox.addEventListener('change', toggleRecommendation);
|
||||
});
|
||||
};
|
||||
};
|
||||
|
@ -15,7 +15,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Contains renderers for the recommendations page.
|
||||
* Contains activity_list renderable used for the recommended activities page.
|
||||
*
|
||||
* @package core_course
|
||||
* @copyright 2020 Adrian Greeve
|
||||
@ -25,7 +25,7 @@
|
||||
namespace core_course\output\recommendations;
|
||||
|
||||
/**
|
||||
* Main renderer for the recommendations page.
|
||||
* Activity list renderable.
|
||||
*
|
||||
* @package core_course
|
||||
* @copyright 2020 Adrian Greeve
|
||||
@ -65,4 +65,4 @@ class activity_list implements \renderable, \templatable {
|
||||
|
||||
return ['categories' => ['categoryname' => get_string('activities'), 'categorydata' => $info]];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -43,4 +43,4 @@ class renderer extends \plugin_renderer_base {
|
||||
$data = $page->export_for_template($this);
|
||||
return parent::render_from_template('core_course/activity_list', $data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ $PAGE->set_context($context);
|
||||
$PAGE->set_url($url);
|
||||
$PAGE->set_pagelayout('admin');
|
||||
|
||||
$PAGE->set_title(get_string('activitychoosertitle', 'course'));
|
||||
$PAGE->set_title(get_string('activitychooserrecommendations', 'course'));
|
||||
$PAGE->set_heading($pageheading);
|
||||
|
||||
require_login();
|
||||
@ -42,7 +42,7 @@ require_capability('moodle/course:recommendactivity', $context);
|
||||
$renderer = $PAGE->get_renderer('core_course', 'recommendations');
|
||||
|
||||
echo $renderer->header();
|
||||
echo $renderer->heading(get_string('activitychooser', 'course'));
|
||||
echo $renderer->heading(get_string('activitychooserrecommendations', 'course'));
|
||||
|
||||
$manager = \core_course\local\factory\content_item_service_factory::get_content_item_service();
|
||||
$modules = $manager->get_all_content_items($USER);
|
||||
|
@ -53,4 +53,4 @@ require([
|
||||
], function(Recommendations) {
|
||||
Recommendations.init();
|
||||
});
|
||||
{{/js}}
|
||||
{{/js}}
|
||||
|
@ -22,8 +22,7 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
$string['activitychooser'] = 'Activity chooser';
|
||||
$string['activitychoosertitle'] = 'Recommendations for the activity chooser';
|
||||
$string['activitychooserrecommendations'] = 'Recommended activities';
|
||||
$string['aria:coursecategory'] = 'Course category';
|
||||
$string['aria:courseimage'] = 'Course image';
|
||||
$string['aria:courseshortname'] = 'Course short name';
|
||||
|
Loading…
x
Reference in New Issue
Block a user