Merge branch 'MDL-41622_b' of git://github.com/rwijaya/moodle
authorMarina Glancy <marina@moodle.com>
Tue, 17 Sep 2013 06:43:12 +0000 (16:43 +1000)
committerMarina Glancy <marina@moodle.com>
Tue, 17 Sep 2013 06:43:12 +0000 (16:43 +1000)
mod/workshop/allocation.php
mod/workshop/assessment.php
mod/workshop/editform.php
mod/workshop/editformpreview.php
mod/workshop/exassessment.php
mod/workshop/excompare.php
mod/workshop/index.php
mod/workshop/renderer.php
mod/workshop/switchphase.php
mod/workshop/view.php

index 33842a8..ec7a892 100644 (file)
@@ -57,6 +57,7 @@ $initresult = $allocator->init();
 //
 $output = $PAGE->get_renderer('mod_workshop');
 echo $output->header();
+echo $OUTPUT->heading(format_string($workshop->name));
 
 $allocators = workshop::installed_allocators();
 if (!empty($allocators)) {
index ddddfe0..437be6a 100644 (file)
@@ -101,11 +101,13 @@ if ($assessmenteditable and $workshop->useexamples and $workshop->examplesmode =
         and !has_capability('mod/workshop:manageexamples', $workshop->context)) {
     // the reviewer must have submitted their own submission
     $reviewersubmission = $workshop->get_submission_by_author($assessment->reviewerid);
+    $output = $PAGE->get_renderer('mod_workshop');
     if (!$reviewersubmission) {
         // no money, no love
         $assessmenteditable = false;
         echo $output->header();
-        echo $output->heading(get_string('exampleneedsubmission', 'workshop'), 2);
+        echo $output->heading(format_string($workshop->name));
+        notice(get_string('exampleneedsubmission', 'workshop'), new moodle_url('/mod/workshop/view.php', array('id' => $cm->id)));
         echo $output->footer();
         exit;
     } else {
@@ -114,7 +116,8 @@ if ($assessmenteditable and $workshop->useexamples and $workshop->examplesmode =
             if (is_null($example->grade)) {
                 $assessmenteditable = false;
                 echo $output->header();
-                echo $output->heading(get_string('exampleneedassessed', 'workshop'), 2);
+                echo $output->heading(format_string($workshop->name));
+                notice(get_string('exampleneedassessed', 'workshop'), new moodle_url('/mod/workshop/view.php', array('id' => $cm->id)));
                 echo $output->footer();
                 exit;
             }
@@ -236,7 +239,8 @@ if ($canoverridegrades or $cansetassessmentweight) {
 // output starts here
 $output = $PAGE->get_renderer('mod_workshop');      // workshop renderer
 echo $output->header();
-echo $output->heading(get_string('assessedsubmission', 'workshop'), 2);
+echo $output->heading(format_string($workshop->name));
+echo $output->heading(get_string('assessedsubmission', 'workshop'), 3);
 
 $submission = $workshop->get_submission_by_id($submission->id);     // reload so can be passed to the renderer
 echo $output->render($workshop->prepare_submission($submission, has_capability('mod/workshop:viewauthornames', $workshop->context)));
index 5c6d2f1..40c7b02 100644 (file)
@@ -74,7 +74,8 @@ if ($mform->is_cancelled()) {
 // Output starts here
 
 echo $OUTPUT->header();
-echo $OUTPUT->heading(get_string('pluginname', 'workshopform_' . $workshop->strategy));
+echo $OUTPUT->heading(format_string($workshop->name));
+echo $OUTPUT->heading(get_string('pluginname', 'workshopform_' . $workshop->strategy), 3);
 
 $mform->display();
 
index a1185d4..4f47d67 100644 (file)
@@ -54,6 +54,7 @@ $mform = $strategy->get_assessment_form($workshop->editform_url(), 'preview');
 
 // output starts here
 echo $OUTPUT->header();
-echo $OUTPUT->heading(get_string('assessmentform', 'workshop'), 2);
+echo $OUTPUT->heading(format_string($workshop->name));
+echo $OUTPUT->heading(get_string('assessmentform', 'workshop'), 3);
 $mform->display();
 echo $OUTPUT->footer();
index 6112a41..32b5485 100644 (file)
@@ -144,7 +144,8 @@ if ($mform->is_cancelled()) {
 // output starts here
 $output = $PAGE->get_renderer('mod_workshop');      // workshop renderer
 echo $output->header();
-echo $output->heading(get_string('assessedexample', 'workshop'), 2);
+echo $output->heading(format_string($workshop->name));
+echo $output->heading(get_string('assessedexample', 'workshop'), 3);
 
 $example = $workshop->get_example_by_id($example->id);     // reload so can be passed to the renderer
 echo $output->render($workshop->prepare_example_submission(($example)));
index c5b972e..aaf2cc4 100644 (file)
@@ -74,7 +74,8 @@ $PAGE->navbar->add(get_string('examplecomparing', 'workshop'));
 // Output starts here
 $output = $PAGE->get_renderer('mod_workshop');
 echo $output->header();
-echo $output->heading(get_string('assessedexample', 'workshop'), 2);
+echo $output->heading(format_string($workshop->name));
+echo $output->heading(get_string('assessedexample', 'workshop'), 3);
 
 echo $output->render($workshop->prepare_example_submission($example));
 
index 263807a..d0aefac 100644 (file)
@@ -48,8 +48,8 @@ echo $OUTPUT->header();
 /// Get all the appropriate data
 
 if (! $workshops = get_all_instances_in_course('workshop', $course)) {
-    echo $OUTPUT->heading(get_string('noworkshops', 'workshop'), 2);
-    echo $OUTPUT->continue_button(new moodle_url('/course/view.php', array('id' => $course->id)));
+    echo $OUTPUT->heading(get_string('modulenameplural', 'workshop'));
+    notice(get_string('noworkshops', 'workshop'), new moodle_url('/course/view.php', array('id' => $course->id)));
     echo $OUTPUT->footer();
     die();
 }
@@ -84,7 +84,6 @@ foreach ($workshops as $workshop) {
         $table->data[] = array($link);
     }
 }
-
-echo $OUTPUT->heading(get_string('modulenameplural', 'workshop'), 2);
+echo $OUTPUT->heading(get_string('modulenameplural', 'workshop'), 3);
 echo html_writer::table($table);
 echo $OUTPUT->footer();
index 4a29a74..91431cd 100644 (file)
@@ -99,7 +99,7 @@ class mod_workshop_renderer extends plugin_renderer_base {
             $title = html_writer::link($submission->url, $title);
         }
 
-        $o .= $this->output->heading($title, 3, 'title');
+        $o .= $this->output->heading($title, 3);
 
         if (!$anonymous) {
             $author             = new stdclass();
@@ -229,7 +229,7 @@ class mod_workshop_renderer extends plugin_renderer_base {
         $classes = 'submission-full example';
         $o .= $this->output->container_start($classes);
         $o .= $this->output->container_start('header');
-        $o .= $this->output->heading(format_string($example->title), 3, 'title');
+        $o .= $this->output->container(format_string($example->title), array('class' => 'title'));
         $o .= $this->output->container_end(); // end of header
 
         $content = file_rewrite_pluginfile_urls($example->content, 'pluginfile.php', $this->page->context->id,
index 11512e5..945defc 100644 (file)
@@ -60,6 +60,7 @@ $PAGE->navbar->add(get_string('switchingphase', 'workshop'));
 // Output starts here
 //
 echo $OUTPUT->header();
+echo $OUTPUT->heading(format_string($workshop->name));
 echo $OUTPUT->confirm(get_string('switchphase' . $phase . 'info', 'workshop'),
                         new moodle_url($PAGE->url, array('confirm' => 1)), $workshop->view_url());
 echo $OUTPUT->footer();
index 37168ce..7272cfc 100644 (file)
@@ -371,7 +371,7 @@ case workshop::PHASE_ASSESSMENT:
         print_collapsible_region_start('', 'workshop-viewlet-assignedassessments', get_string('assignedassessments', 'workshop'));
         if (! $assessments = $workshop->get_assessments_by_reviewer($USER->id)) {
             echo $output->box_start('generalbox assessment-none');
-            echo $output->heading(get_string('assignedassessmentsnone', 'workshop'), 3);
+            echo $output->notification(get_string('assignedassessmentsnone', 'workshop'));
             echo $output->box_end();
         } else {
             $shownames = has_capability('mod/workshop:viewauthornames', $PAGE->context);