MDL-27829 blocks: added some more page types to some _page_type_list() functions
This commit is contained in:
@@ -55,7 +55,7 @@ function completion_page_type_list($pagetype, $parentcontext, $currentcontext) {
|
||||
$array = array(
|
||||
'*' => get_string('page-x', 'pagetype'),
|
||||
'course-report-*' => get_string('page-course-report-x', 'pagetype'),
|
||||
'course-report-completion-*' => get_string('pluginpagetype', 'coursereport_completion')
|
||||
'course-report-completion-index' => get_string('pluginpagetype', 'coursereport_completion')
|
||||
);
|
||||
return $array;
|
||||
}
|
||||
|
||||
@@ -548,7 +548,8 @@ function log_page_type_list($pagetype, $parentcontext, $currentcontext) {
|
||||
$array = array(
|
||||
'*' => get_string('page-x', 'pagetype'),
|
||||
'course-report-*' => get_string('page-course-report-x', 'pagetype'),
|
||||
'course-report-log-*' => get_string('pluginpagetype', 'coursereport_log')
|
||||
'course-report-log-index' => get_string('pluginpagetype', 'coursereport_log')
|
||||
//course-report-log-live not included as theres no blocks on the live log page
|
||||
);
|
||||
return $array;
|
||||
}
|
||||
@@ -49,7 +49,7 @@ function outline_page_type_list($pagetype, $parentcontext, $currentcontext) {
|
||||
$array = array(
|
||||
'*' => get_string('page-x', 'pagetype'),
|
||||
'course-report-*' => get_string('page-course-report-x', 'pagetype'),
|
||||
'course-report-outline-*' => get_string('pluginpagetype', 'coursereport_outline')
|
||||
'course-report-outline-index' => get_string('pluginpagetype', 'coursereport_outline')
|
||||
);
|
||||
return $array;
|
||||
}
|
||||
@@ -49,7 +49,7 @@ function participation_page_type_list($pagetype, $parentcontext, $currentcontext
|
||||
$array = array(
|
||||
'*' => get_string('page-x', 'pagetype'),
|
||||
'course-report-*' => get_string('page-course-report-x', 'pagetype'),
|
||||
'course-report-participation-*' => get_string('pluginpagetype', 'coursereport_participation')
|
||||
'course-report-participation-index' => get_string('pluginpagetype', 'coursereport_participation')
|
||||
);
|
||||
return $array;
|
||||
}
|
||||
@@ -60,7 +60,7 @@ function progress_page_type_list($pagetype, $parentcontext, $currentcontext) {
|
||||
$array = array(
|
||||
'*' => get_string('page-x', 'pagetype'),
|
||||
'course-report-*' => get_string('page-course-report-x', 'pagetype'),
|
||||
'course-report-progress-*' => get_string('pluginpagetype', 'coursereport_progress')
|
||||
'course-report-progress-index' => get_string('pluginpagetype', 'coursereport_progress')
|
||||
);
|
||||
return $array;
|
||||
}
|
||||
@@ -102,7 +102,7 @@ function stats_page_type_list($pagetype, $parentcontext, $currentcontext) {
|
||||
$array = array(
|
||||
'*' => get_string('page-x', 'pagetype'),
|
||||
'course-report-*' => get_string('page-course-report-x', 'pagetype'),
|
||||
'course-report-stats-*' => get_string('pluginpagetype', 'coursereport_stats')
|
||||
'course-report-stats-index' => get_string('pluginpagetype', 'coursereport_stats')
|
||||
);
|
||||
return $array;
|
||||
}
|
||||
@@ -220,6 +220,8 @@ $string['notapproved'] = 'glossary entry is not approved yet.';
|
||||
$string['numberofentries'] = 'Number of entries';
|
||||
$string['onebyline'] = '(one per line)';
|
||||
$string['page-mod-glossary-x'] = 'Any glossary module page';
|
||||
$string['page-mod-glossary-edit'] = 'Glossary add/edit entry page';
|
||||
$string['page-mod-glossary-view'] = 'View glossary edit page';
|
||||
$string['pluginadministration'] = 'Glossary administration';
|
||||
$string['pluginname'] = 'Glossary';
|
||||
$string['popupformat'] = 'Popup format';
|
||||
|
||||
@@ -2864,6 +2864,9 @@ function glossary_comment_validate($comment_param) {
|
||||
* @param stdClass $currentcontext Current context of block
|
||||
*/
|
||||
function glossary_page_type_list($pagetype, $parentcontext, $currentcontext) {
|
||||
$module_pagetype = array('mod-glossary-*'=>get_string('page-mod-glossary-x', 'glossary'));
|
||||
$module_pagetype = array(
|
||||
'mod-glossary-*'=>get_string('page-mod-glossary-x', 'glossary'),
|
||||
'mod-glossary-view'=>get_string('page-mod-glossary-view', 'glossary'),
|
||||
'mod-glossary-edit'=>get_string('page-mod-glossary-edit', 'glossary'));
|
||||
return $module_pagetype;
|
||||
}
|
||||
|
||||
@@ -62,7 +62,6 @@ if ($tab == GLOSSARY_ADDENTRY_VIEW ) {
|
||||
}
|
||||
|
||||
/// setting the defaut number of entries per page if not set
|
||||
|
||||
if ( !$entriesbypage = $glossary->entbypage ) {
|
||||
$entriesbypage = $CFG->glossary_entbypage;
|
||||
}
|
||||
|
||||
@@ -48,6 +48,7 @@ if ($mode != get_user_preferences('lesson_view', 'collapsed') && $mode !== 'sing
|
||||
$lessonoutput = $PAGE->get_renderer('mod_lesson');
|
||||
$PAGE->navbar->add(get_string('edit'));
|
||||
echo $lessonoutput->header($lesson, $cm, $mode);
|
||||
|
||||
if (!$lesson->has_pages()) {
|
||||
// There are no pages; give teacher some options
|
||||
require_capability('mod/lesson:edit', $context);
|
||||
|
||||
@@ -307,7 +307,9 @@ $string['outof'] = 'Out of {$a}';
|
||||
$string['overview'] = 'Overview';
|
||||
$string['overview_help'] = 'A lesson is made up of a number of pages and optionally content pages. A page contains some content and usually ends with a question. Associated with each answer to the question is a jump. The jump can be relative, such as this page or next page, or absolute, specifying any one of the pages in the lesson. A content page is a page containing a set of links to other pages in the lesson, for example a Table of Contents.';
|
||||
$string['page'] = 'Page: {$a}';
|
||||
$string['page-mod-lesson-x'] = 'Any lesson module page';
|
||||
$string['page-mod-lesson-x'] = 'Any lesson page';
|
||||
$string['page-mod-lesson-view'] = 'View or preview lesson page';
|
||||
$string['page-mod-lesson-edit'] = 'Edit lesson page';
|
||||
$string['pagecontents'] = 'Page contents';
|
||||
$string['pages'] = 'Pages';
|
||||
$string['pagetitle'] = 'Page title';
|
||||
|
||||
+4
-1
@@ -997,6 +997,9 @@ function lesson_get_file_info($browser, $areas, $course, $cm, $context, $fileare
|
||||
* @param stdClass $currentcontext Current context of block
|
||||
*/
|
||||
function lesson_page_type_list($pagetype, $parentcontext, $currentcontext) {
|
||||
$module_pagetype = array('mod-lesson-*'=>get_string('page-mod-lesson-x', 'lesson'));
|
||||
$module_pagetype = array(
|
||||
'mod-lesson-*'=>get_string('page-mod-lesson-x', 'lesson'),
|
||||
'mod-lesson-view'=>get_string('page-mod-lesson-view', 'lesson'),
|
||||
'mod-lesson-edit'=>get_string('page-mod-lesson-edit', 'lesson'));
|
||||
return $module_pagetype;
|
||||
}
|
||||
|
||||
@@ -496,6 +496,7 @@ $string['overrides'] = 'Overrides';
|
||||
$string['overrideuser'] = 'Override user';
|
||||
$string['overrideusereventname'] = '{$a->quiz} - Override';
|
||||
$string['page-mod-quiz-x'] = 'Any quiz module page';
|
||||
$string['page-mod-quiz-edit'] = 'Edit quiz page';
|
||||
$string['pagesize'] = 'Attempts shown per page:';
|
||||
$string['parent'] = 'Parent';
|
||||
$string['parentcategory'] = 'Parent category';
|
||||
|
||||
+3
-1
@@ -1712,6 +1712,8 @@ function mod_quiz_question_pluginfile($course, $context, $component,
|
||||
* @param stdClass $currentcontext Current context of block
|
||||
*/
|
||||
function quiz_page_type_list($pagetype, $parentcontext, $currentcontext) {
|
||||
$module_pagetype = array('mod-quiz-*'=>get_string('page-mod-quiz-x', 'quiz'));
|
||||
$module_pagetype = array(
|
||||
'mod-quiz-*'=>get_string('page-mod-quiz-x', 'quiz'),
|
||||
'mod-quiz-edit'=>get_string('page-mod-quiz-edit', 'quiz'));
|
||||
return $module_pagetype;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user