Skip to content

Commit

Permalink
MDL-27829 blocks: added some more page types to some _page_type_list(…
Browse files Browse the repository at this point in the history
…) functions
  • Loading branch information
andyjdavis committed Jul 1, 2011
1 parent 1fe0eca commit 346a32a
Show file tree
Hide file tree
Showing 14 changed files with 25 additions and 11 deletions.
2 changes: 1 addition & 1 deletion course/report/completion/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
3 changes: 2 additions & 1 deletion course/report/log/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
2 changes: 1 addition & 1 deletion course/report/outline/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
2 changes: 1 addition & 1 deletion course/report/participation/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
2 changes: 1 addition & 1 deletion course/report/progress/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
2 changes: 1 addition & 1 deletion course/report/stats/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
2 changes: 2 additions & 0 deletions mod/glossary/lang/en/glossary.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,8 @@
$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';
Expand Down
5 changes: 4 additions & 1 deletion mod/glossary/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
1 change: 0 additions & 1 deletion mod/glossary/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
}

/// setting the defaut number of entries per page if not set

if ( !$entriesbypage = $glossary->entbypage ) {
$entriesbypage = $CFG->glossary_entbypage;
}
Expand Down
1 change: 1 addition & 0 deletions mod/lesson/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
$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);
Expand Down
4 changes: 3 additions & 1 deletion mod/lesson/lang/en/lesson.php
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,9 @@
$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';
Expand Down
5 changes: 4 additions & 1 deletion mod/lesson/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
1 change: 1 addition & 0 deletions mod/quiz/lang/en/quiz.php
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,7 @@
$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';
Expand Down
4 changes: 3 additions & 1 deletion mod/quiz/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit 346a32a

Please sign in to comment.