Issue Details (XML | Word | Printable)

Key: MDL-17510
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Martin Dougiamas
Reporter: Daniel Neis
Votes: 0
Watchers: 2
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

[Patch] Put the text "detailedmonthview" of the calendar inside a label, so i can grab it on theme

Created: 04/Dec/08 02:02 AM   Updated: 05/Mar/10 06:04 AM
Component/s: Accessibility, Calendar, Themes
Affects Version/s: 1.9.3
Fix Version/s: 1.9.8

File Attachments: 1. File mdl-17510-v2.diff (8 kB)
2. File mdl17510-195.diff (0.6 kB)
3. File patch_label.diff (0.5 kB)

Image Attachments:

1. detailedmonthview.png
(120 kB)

2. screen.png
(35 kB)

Participants: Daniel Neis, Eloy Lafuente (stronk7) and Martin Dougiamas
Security Level: None
Difficulty: Easy
Resolved date: 05/Mar/10
Affected Branches: MOODLE_19_STABLE
Fixed Branches: MOODLE_19_STABLE


 Description  « Hide
I am working on a theme for the Federal University of Santa Catarina, in Brazil and the designer ask me to vertical-centralize this text. The better way i found to do this is put the text inside a label, cause it was "flying" inside the div.
The patch for Moodle 1.9.3 and a slice of the screenshot is attached.
Hope you like.

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Daniel Neis added a comment - 04/Dec/08 02:04 AM
the patch and the screenshot i have metioned.
couldn't find them after submit the issue...

Daniel Neis added a comment - 18/May/09 08:46 PM
the patch for 1.9.5 version

Daniel Neis added a comment - 27/Nov/09 12:37 AM
posting a screenshot with text in english

Eloy Lafuente (stronk7) added a comment - 27/Feb/10 01:44 AM
Hi Daniel,

I've been looking at this and, in the detailed month view I'm getting that HTML within one label, exactly as your patch does:

<label for="cal_course_flt_jump">Detailed Month View:</label>

Curiously, looking a bit more in calendar/lib.php, I've seen that there are three places where That label should be present:

  • calendar_show_day() - that is missing the label.
  • calendar_show_month_detailed() - that already has the label, as showed above.
  • calendar_show_upcoming_events() - that is missing the label.

Ciao


Daniel Neis added a comment - 03/Mar/10 02:10 AM
Hello, Eloy

i think someone else have added the label in another commit (http://cvs.moodle.org/moodle/calendar/view.php?r1=1.95&r2=1.95.2.10) some time ago...
I have a clone of git.moodle.org repo, and did a seach "git log -Scal_course_flt_jump calendar/" and have found the commit:

daniel@judy:~/public_html/moodle$ git show d4d468ad374e344c90eb278092e6e425232b0b66
commit d4d468ad374e344c90eb278092e6e425232b0b66
Author: moodler <moodler>
Date:   Thu Oct 1 07:02:15 2009 +0000

    calendar MDL-19940 Don't require login for site calendar when forcelogin is false

diff --git a/calendar/view.php b/calendar/view.php
index eeedb32..92abf88 100644
--- a/calendar/view.php
+++ b/calendar/view.php
@@ -54,7 +54,7 @@
         redirect($CFG->wwwroot.'/'.$CFG->admin.'/index.php');
     }
 
-    if ($courseid) {
+    if ($courseid && $courseid != SITEID) {
         require_login($courseid);
     } else if ($CFG->forcelogin) {
         require_login();
@@ -390,7 +390,10 @@ function calendar_show_month_detailed($m, $y, $courses, $groups, $users, $course
         $text.= '</div></form></div>';
     }
 
-    $text .= get_string('detailedmonthview', 'calendar').': '.calendar_course_filter_selector($getvars);
+    $text .= '<label for="cal_course_flt_jump">'.
+               get_string('detailedmonthview', 'calendar').
+             ':</label>'.
+             calendar_course_filter_selector($getvars);
 
     echo '<div class="header">'.$text.'</div>';

But i couldn't find this at git.moodle.org

Also, i have attached a patch (mdl-17510-v2.diff) that adds the labels in the two other functions you saw and also removes some blanks spaces in end of lines and commented code.


Eloy Lafuente (stronk7) added a comment - 05/Mar/10 06:04 AM
Hi Daniel,

I've aded the two missing labels, both to 19_STABLE and HEAD, will be available in next weekly build.

About the patch, looked perfect but has some problems inserting some tabs, that are "forbidden" in moodle source code. Just to suggest you to change the settings in your IDE/editor to avoid tabs and use 4cc whites instead.

Many thanks! Ciao