MDL-24238 workshop: button to show all participants again after successful manual...
authorDavid Mudrak <david.mudrak@gmail.com>
Sat, 18 Sep 2010 00:25:04 +0000 (00:25 +0000)
committerDavid Mudrak <david.mudrak@gmail.com>
Sat, 18 Sep 2010 00:25:04 +0000 (00:25 +0000)
This replaces the closer of the status message. That bits of UI come
from very early times of workshop development and might be replaced
completely.

mod/workshop/allocation/manual/lang/en/workshopallocation_manual.php
mod/workshop/allocation/manual/lib.php
mod/workshop/allocation/manual/styles.css
mod/workshop/lang/en/workshop.php
mod/workshop/renderer.php
mod/workshop/styles.css

index 5ffaa24..69ba24f 100644 (file)
@@ -30,3 +30,4 @@ $string['allocationexists'] = 'The allocation already exists';
 $string['areyousuretodeallocate'] = 'Are you sure you want deallocate the selected assessment?';
 $string['areyousuretodeallocategraded'] = 'You are going to remove the assessment that has already been graded. Are you really sure you want to do it?';
 $string['pluginname'] = 'Manual allocation';
+$string['showallparticipants'] = 'Show all participants';
index c9550cd..2ae4fa6 100644 (file)
@@ -198,9 +198,11 @@ class workshop_manual_allocator implements workshop_allocator {
         if ($hlauthorid > 0 and $hlreviewerid > 0) {
             // display just those two users
             $participants = array_intersect_key($participants, array($hlauthorid => null, $hlreviewerid => null));
+            $button = $OUTPUT->single_button($PAGE->url, get_string('showallparticipants', 'workshopallocation_manual'), 'get');
         } else {
             // slice the list of participants according to the current page
             $participants = array_slice($participants, $page * $perpage, $perpage, true);
+            $button = '';
         }
 
         // this will hold the information needed to display user names and pictures
@@ -319,7 +321,7 @@ class workshop_manual_allocator implements workshop_allocator {
         $wsoutput = $PAGE->get_renderer('mod_workshop');
         $uioutput = $PAGE->get_renderer('workshopallocation_manual');
 
-        return $pagingbarout . $wsoutput->status_message($msg) . $uioutput->display_allocations($data) . $pagingbarout;
+        return $pagingbarout . $wsoutput->status_message($msg) . $uioutput->display_allocations($data) . $button . $pagingbarout;
     }
 
     /**
index b0876fe..df248bd 100644 (file)
@@ -146,7 +146,6 @@ $string['latesubmissions_desc'] = 'Allow submissions after the deadline';
 $string['latesubmissions_help'] = 'If enabled, an author may submit their work after the submissions deadline or during the assessment phase. Late submissions cannot be edited though.';
 $string['latesubmissionsallowed'] = 'Late submissions are allowed';
 $string['maxbytes'] = 'Maximum file size';
-$string['messageclose'] = '(X)';
 $string['modulename'] = 'Workshop';
 $string['modulenameplural'] = 'Workshops';
 $string['mysubmission'] = 'My submission';
index 237f2a7..8bcd463 100644 (file)
@@ -48,8 +48,6 @@ class mod_workshop_renderer extends plugin_renderer_base {
         $sty = empty($message->sty) ? 'info' : $message->sty;
 
         $o = html_writer::tag('span', $message->text);
-        $closer = html_writer::tag('a', get_string('messageclose', 'workshop'), array('href' => $this->page->url->out()));
-        $o .= $this->output->container($closer, 'status-message-closer');
         if (isset($message->extra)) {
             $o .= $message->extra;
         }
index e264d08..e6c0279 100644 (file)
@@ -7,6 +7,11 @@
     font-size: 120%;
 }
 
+.path-mod-workshop div.singlebutton {
+    text-align: center;
+    margin: 0.75em auto;
+}
+
 /**
  * Submission - one line summary display
  */
     position: relative;
 }
 
-.path-mod-workshop .status-message-closer {
-    font-weight: bold;
-    position: absolute;
-    top: 5px;
-    right: 15px;
+.path-mod-workshop .status-message .singlebutton {
+    text-align: left;
+    margin: 0px;
 }
 
 .path-mod-workshop .status-message.ok {