Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

MDL-27829 blocks: added some more page types to some _page_type_list(…

…) functions
  • Loading branch information...
commit 346a32a75b4fc1b0aa51355424d9d41a0c251fa2 1 parent 1fe0eca
Andrew Davis andyjdavis authored
2  course/report/completion/lib.php
@@ -55,7 +55,7 @@ function completion_page_type_list($pagetype, $parentcontext, $currentcontext) {
55 55 $array = array(
56 56 '*' => get_string('page-x', 'pagetype'),
57 57 'course-report-*' => get_string('page-course-report-x', 'pagetype'),
58   - 'course-report-completion-*' => get_string('pluginpagetype', 'coursereport_completion')
  58 + 'course-report-completion-index' => get_string('pluginpagetype', 'coursereport_completion')
59 59 );
60 60 return $array;
61 61 }
3  course/report/log/lib.php
@@ -548,7 +548,8 @@ function log_page_type_list($pagetype, $parentcontext, $currentcontext) {
548 548 $array = array(
549 549 '*' => get_string('page-x', 'pagetype'),
550 550 'course-report-*' => get_string('page-course-report-x', 'pagetype'),
551   - 'course-report-log-*' => get_string('pluginpagetype', 'coursereport_log')
  551 + 'course-report-log-index' => get_string('pluginpagetype', 'coursereport_log')
  552 + //course-report-log-live not included as theres no blocks on the live log page
552 553 );
553 554 return $array;
554 555 }
2  course/report/outline/lib.php
@@ -49,7 +49,7 @@ function outline_page_type_list($pagetype, $parentcontext, $currentcontext) {
49 49 $array = array(
50 50 '*' => get_string('page-x', 'pagetype'),
51 51 'course-report-*' => get_string('page-course-report-x', 'pagetype'),
52   - 'course-report-outline-*' => get_string('pluginpagetype', 'coursereport_outline')
  52 + 'course-report-outline-index' => get_string('pluginpagetype', 'coursereport_outline')
53 53 );
54 54 return $array;
55 55 }
2  course/report/participation/lib.php
@@ -49,7 +49,7 @@ function participation_page_type_list($pagetype, $parentcontext, $currentcontext
49 49 $array = array(
50 50 '*' => get_string('page-x', 'pagetype'),
51 51 'course-report-*' => get_string('page-course-report-x', 'pagetype'),
52   - 'course-report-participation-*' => get_string('pluginpagetype', 'coursereport_participation')
  52 + 'course-report-participation-index' => get_string('pluginpagetype', 'coursereport_participation')
53 53 );
54 54 return $array;
55 55 }
2  course/report/progress/lib.php
@@ -60,7 +60,7 @@ function progress_page_type_list($pagetype, $parentcontext, $currentcontext) {
60 60 $array = array(
61 61 '*' => get_string('page-x', 'pagetype'),
62 62 'course-report-*' => get_string('page-course-report-x', 'pagetype'),
63   - 'course-report-progress-*' => get_string('pluginpagetype', 'coursereport_progress')
  63 + 'course-report-progress-index' => get_string('pluginpagetype', 'coursereport_progress')
64 64 );
65 65 return $array;
66 66 }
2  course/report/stats/lib.php
@@ -102,7 +102,7 @@ function stats_page_type_list($pagetype, $parentcontext, $currentcontext) {
102 102 $array = array(
103 103 '*' => get_string('page-x', 'pagetype'),
104 104 'course-report-*' => get_string('page-course-report-x', 'pagetype'),
105   - 'course-report-stats-*' => get_string('pluginpagetype', 'coursereport_stats')
  105 + 'course-report-stats-index' => get_string('pluginpagetype', 'coursereport_stats')
106 106 );
107 107 return $array;
108 108 }
2  mod/glossary/lang/en/glossary.php
@@ -220,6 +220,8 @@
220 220 $string['numberofentries'] = 'Number of entries';
221 221 $string['onebyline'] = '(one per line)';
222 222 $string['page-mod-glossary-x'] = 'Any glossary module page';
  223 +$string['page-mod-glossary-edit'] = 'Glossary add/edit entry page';
  224 +$string['page-mod-glossary-view'] = 'View glossary edit page';
223 225 $string['pluginadministration'] = 'Glossary administration';
224 226 $string['pluginname'] = 'Glossary';
225 227 $string['popupformat'] = 'Popup format';
5 mod/glossary/lib.php
@@ -2864,6 +2864,9 @@ function glossary_comment_validate($comment_param) {
2864 2864 * @param stdClass $currentcontext Current context of block
2865 2865 */
2866 2866 function glossary_page_type_list($pagetype, $parentcontext, $currentcontext) {
2867   - $module_pagetype = array('mod-glossary-*'=>get_string('page-mod-glossary-x', 'glossary'));
  2867 + $module_pagetype = array(
  2868 + 'mod-glossary-*'=>get_string('page-mod-glossary-x', 'glossary'),
  2869 + 'mod-glossary-view'=>get_string('page-mod-glossary-view', 'glossary'),
  2870 + 'mod-glossary-edit'=>get_string('page-mod-glossary-edit', 'glossary'));
2868 2871 return $module_pagetype;
2869 2872 }
1  mod/glossary/view.php
@@ -62,7 +62,6 @@
62 62 }
63 63
64 64 /// setting the defaut number of entries per page if not set
65   -
66 65 if ( !$entriesbypage = $glossary->entbypage ) {
67 66 $entriesbypage = $CFG->glossary_entbypage;
68 67 }
1  mod/lesson/edit.php
@@ -48,6 +48,7 @@
48 48 $lessonoutput = $PAGE->get_renderer('mod_lesson');
49 49 $PAGE->navbar->add(get_string('edit'));
50 50 echo $lessonoutput->header($lesson, $cm, $mode);
  51 +
51 52 if (!$lesson->has_pages()) {
52 53 // There are no pages; give teacher some options
53 54 require_capability('mod/lesson:edit', $context);
4 mod/lesson/lang/en/lesson.php
@@ -307,7 +307,9 @@
307 307 $string['overview'] = 'Overview';
308 308 $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.';
309 309 $string['page'] = 'Page: {$a}';
310   -$string['page-mod-lesson-x'] = 'Any lesson module page';
  310 +$string['page-mod-lesson-x'] = 'Any lesson page';
  311 +$string['page-mod-lesson-view'] = 'View or preview lesson page';
  312 +$string['page-mod-lesson-edit'] = 'Edit lesson page';
311 313 $string['pagecontents'] = 'Page contents';
312 314 $string['pages'] = 'Pages';
313 315 $string['pagetitle'] = 'Page title';
5 mod/lesson/lib.php
@@ -997,6 +997,9 @@ function lesson_get_file_info($browser, $areas, $course, $cm, $context, $fileare
997 997 * @param stdClass $currentcontext Current context of block
998 998 */
999 999 function lesson_page_type_list($pagetype, $parentcontext, $currentcontext) {
1000   - $module_pagetype = array('mod-lesson-*'=>get_string('page-mod-lesson-x', 'lesson'));
  1000 + $module_pagetype = array(
  1001 + 'mod-lesson-*'=>get_string('page-mod-lesson-x', 'lesson'),
  1002 + 'mod-lesson-view'=>get_string('page-mod-lesson-view', 'lesson'),
  1003 + 'mod-lesson-edit'=>get_string('page-mod-lesson-edit', 'lesson'));
1001 1004 return $module_pagetype;
1002 1005 }
1  mod/quiz/lang/en/quiz.php
@@ -496,6 +496,7 @@
496 496 $string['overrideuser'] = 'Override user';
497 497 $string['overrideusereventname'] = '{$a->quiz} - Override';
498 498 $string['page-mod-quiz-x'] = 'Any quiz module page';
  499 +$string['page-mod-quiz-edit'] = 'Edit quiz page';
499 500 $string['pagesize'] = 'Attempts shown per page:';
500 501 $string['parent'] = 'Parent';
501 502 $string['parentcategory'] = 'Parent category';
4 mod/quiz/lib.php
@@ -1712,6 +1712,8 @@ function mod_quiz_question_pluginfile($course, $context, $component,
1712 1712 * @param stdClass $currentcontext Current context of block
1713 1713 */
1714 1714 function quiz_page_type_list($pagetype, $parentcontext, $currentcontext) {
1715   - $module_pagetype = array('mod-quiz-*'=>get_string('page-mod-quiz-x', 'quiz'));
  1715 + $module_pagetype = array(
  1716 + 'mod-quiz-*'=>get_string('page-mod-quiz-x', 'quiz'),
  1717 + 'mod-quiz-edit'=>get_string('page-mod-quiz-edit', 'quiz'));
1716 1718 return $module_pagetype;
1717 1719 }

0 comments on commit 346a32a

Please sign in to comment.
Something went wrong with that request. Please try again.