General developer forum

 
 
Picture of Kimber Warden
Editing icons appear inside a label-ish module, not underneath
 

Thanks to Davo Smith, I have a new module called Announcements that functions almost exactly like a label. The only difference is that I can target it for css styling. It works, but when editing is turned on, the editing icons appear INSIDE the announcement at the bottom, rather than immediately underneath the announcement like they do for labels. It may or may not have something to do with the fact that one of the divs created by the Announcement module doesn't have a class in the way that Label's does.

Label HTML from page source:

<li class="activity label modtype_label id="module-36551">
<div class="mod-indent">
<div >
<div class="no-overflow">
<div class="no-overflow">
<div class="no-overflow">

It has 3 instances of <div class="no-overflow">.

But the Announcement HTML:

<li class="activity announcement modtype_announcement" id="module-38138">
<div class="mod-indent">
<div >
<div class="no-overflow">
<div class="no-overflow">
<div>

It only has 2 instances of <div class="no-overflow">. The last div doesn't have a class.

Is this why the editing icons don't appear in the correct place? How can I fix it? I've attached the code.

Thanks so much to anyone who takes a look.
 
Average of ratings: -
Picture of Kimber Warden
Re: Editing icons appear inside a label-ish module, not underneath
 

Anyone?

 
Average of ratings: -
Picture of Jack Challenger
Re: Editing icons appear inside a label-ish module, not underneath
 

Installing your module now to see if I can help!

 
Average of ratings: -
Picture of Jack Challenger
Re: Editing icons appear inside a label-ish module, not underneath
 

Hi Kimber, 

I've installed your announcement module on my Moodle (2.5) and it seems perfect. None of the problems thaht you have described, unless maybe I'm not referring to the same thing you are.

Here is a screenshot 

They also look exactly the same on hover over.

Maybe you can post a screenshot so we can see what it does on your Moodle.

Btw, FWIW, I count two classes of no-overflow in lable and one in announcement, although I can't see that being a problem. They will give the exact same effect with one or two of those classes here.

 
Average of ratings: -
Picture of Kimber Warden
Re: Editing icons appear inside a label-ish module, not underneath
 

Thanks for your help, Jack! You're absolutely right, my Announcement module works just like the Label module. I was mistaken about why you have to scroll to the bottom of the Announcements to access the editing icons. I need to programatically insert an extra div, like this:

<li class="activity announcement modtype_announcement>
   <div class="This_is_the_div_I_need">
          Announcement text...blah blah blah
   </div>
</li>

How would I do that? I'm sure it's simple, but I'm new to programming. (But learning a lot!)


 
Average of ratings: -