Moodle

if a resource is not shown beacuse of a condition, should be grayed to admin during course edition

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 2.0
  • Fix Version/s: 2.0
  • Component/s: Conditional activities
  • Labels:
    None
  • Affected Branches:
    MOODLE_20_STABLE
  • Fixed Branches:
    MOODLE_20_STABLE

Description

Create a conditional resource (completely hidden whether out from the time range from tomorrow to after tomorrow, for instance).
Create a second resource. Make this one hidden.
Return to your course.
The second one is shown as greyed, the first one should be greyed too, IMO.

Activity

Hide
Eloy Lafuente (stronk7) added a comment -

Assigning to Sam and addressing for Moodle 2.0.

Sam, do you think it's ok to assign the "Conditional activities" stuff to you by default?

Show
Eloy Lafuente (stronk7) added a comment - Assigning to Sam and addressing for Moodle 2.0. Sam, do you think it's ok to assign the "Conditional activities" stuff to you by default?
Hide
Eloy Lafuente (stronk7) added a comment -

Ah, just saw you are the component leader. Not sure why this wasn't assigned to you directly. Ciao

Show
Eloy Lafuente (stronk7) added a comment - Ah, just saw you are the component leader. Not sure why this wasn't assigned to you directly. Ciao
Hide
Sam Marshall added a comment -

Daniele - the problem with doing this is that availability of an item is user-specific ie it is calculated for the current user. I know in the case of date it doesn't matter, but the system combines the other options (grade, completion) too. So for example if something depends on completion of a forum by posting a message, then it would be either grey or not-grey depending on whether the admin has posted a message to that forum, which wouldn't necessarily reflect the situation for any individual student.

That's why it displays the actual conditions as text when you turn editing on.

However I can see that this behaviour might be nice. A few possibilities::

1) do behaviour as requested, regardless of the problem above (i.e. show whether the activity would be available for the current user, if they didn't have viewhiddenactivities permission).

2) only use grey display for the date condition, ignore other conditions

3) show grey if there are any conditions other than date conditions, OR if there are date conditions which are not currently met.

2 and 3 are consistent ie don't ever depend on anything admin has done or not done. 1 is not.

Any opinions on this?

Show
Sam Marshall added a comment - Daniele - the problem with doing this is that availability of an item is user-specific ie it is calculated for the current user. I know in the case of date it doesn't matter, but the system combines the other options (grade, completion) too. So for example if something depends on completion of a forum by posting a message, then it would be either grey or not-grey depending on whether the admin has posted a message to that forum, which wouldn't necessarily reflect the situation for any individual student. That's why it displays the actual conditions as text when you turn editing on. However I can see that this behaviour might be nice. A few possibilities:: 1) do behaviour as requested, regardless of the problem above (i.e. show whether the activity would be available for the current user, if they didn't have viewhiddenactivities permission). 2) only use grey display for the date condition, ignore other conditions 3) show grey if there are any conditions other than date conditions, OR if there are date conditions which are not currently met. 2 and 3 are consistent ie don't ever depend on anything admin has done or not done. 1 is not. Any opinions on this?
Hide
Sam Marshall added a comment -

I asked for comments. so far david (mudrak) and eloy have more or less agreed that #3 is the better option of those three, so I guess we'll go with that. hopefully I will code it sometime soon.

Show
Sam Marshall added a comment - I asked for comments. so far david (mudrak) and eloy have more or less agreed that #3 is the better option of those three, so I guess we'll go with that. hopefully I will code it sometime soon.
Hide
Daniele Cordella added a comment -

Ciao Sam and ciao Eloy, too.
I am not sure I understood it in deep.
Starting by the position that the solution proposed by David and Murdak will always be the best....
let me write down my idea.
Every dynamic page is "user" dependent. If I am an admin I see a different page from the one a student is allowed to see... even if the page is the same. Do you agree?
Well... why do the css style can't follow a different procedure?
Moodle knows $user story so... why does Moodle can't define the css style on the basis of that information?

Show
Daniele Cordella added a comment - Ciao Sam and ciao Eloy, too. I am not sure I understood it in deep. Starting by the position that the solution proposed by David and Murdak will always be the best.... let me write down my idea. Every dynamic page is "user" dependent. If I am an admin I see a different page from the one a student is allowed to see... even if the page is the same. Do you agree? Well... why do the css style can't follow a different procedure? Moodle knows $user story so... why does Moodle can't define the css style on the basis of that information?
Hide
Daniele Cordella added a comment -

Errata corrige:
In the previous message, please, overwrite:
> Well... why do the css style can't follow a different procedure?
with:
Well... why do the css style can't follow the same procedure?

Show
Daniele Cordella added a comment - Errata corrige: In the previous message, please, overwrite: > Well... why do the css style can't follow a different procedure? with: Well... why do the css style can't follow the same procedure?
Hide
Daniele Cordella added a comment -

BTW... what can I do in order to request the right to edit my messages in the tracker even after I submit them. My English is already poor enough! If you don't allow me to correct it a bit... it appears exact as it is: "really ugly". Pleeeeease.

Show
Daniele Cordella added a comment - BTW... what can I do in order to request the right to edit my messages in the tracker even after I submit them. My English is already poor enough! If you don't allow me to correct it a bit... it appears exact as it is: "really ugly". Pleeeeease.
Hide
Daniele Cordella added a comment -

Sorry... I am quite tired.

In the previous message, please, overwrite:
> Starting by the position that the solution proposed by David and Murdak will always be the best....
with:
Starting by the position that the solution proposed by David and Eloy will always be the best....

Show
Daniele Cordella added a comment - Sorry... I am quite tired. In the previous message, please, overwrite: > Starting by the position that the solution proposed by David and Murdak will always be the best.... with: Starting by the position that the solution proposed by David and Eloy will always be the best....
Hide
Sam Marshall added a comment -

Daniele, the simple explanation is:

1) The point of the 'grey' in this situation (when an activity is not visible) is to indicate that *students* [not the admin/teacher who is looking] cannot access the activity.

2) For conditional activities we cannot indicate this in general because depending on how it is set up, it can be different for each student. Some students can see the activity and some can't.

Show
Sam Marshall added a comment - Daniele, the simple explanation is: 1) The point of the 'grey' in this situation (when an activity is not visible) is to indicate that *students* [not the admin/teacher who is looking] cannot access the activity. 2) For conditional activities we cannot indicate this in general because depending on how it is set up, it can be different for each student. Some students can see the activity and some can't.
Hide
Daniele Cordella added a comment -

You are right, Sam. Sorry. I understand it only now. (why are you not on skype? I am looking for you)
Ok let me say that... what is needed is a conditional "style" so that theme creator can provide a specific colour for this kind of situation. my +1 for David and Eloy suggestion.

Show
Daniele Cordella added a comment - You are right, Sam. Sorry. I understand it only now. (why are you not on skype? I am looking for you) Ok let me say that... what is needed is a conditional "style" so that theme creator can provide a specific colour for this kind of situation. my +1 for David and Eloy suggestion.
Hide
Sam Marshall added a comment -

OK. Sorry I stopped using skype (never liked it - I am on the moodle developer jabber.

Show
Sam Marshall added a comment - OK. Sorry I stopped using skype (never liked it - I am on the moodle developer jabber.
Hide
Daniele Cordella added a comment -

> I am on the moodle developer jabber.
Where we have no access!!!!

Show
Daniele Cordella added a comment - > I am on the moodle developer jabber. Where we have no access!!!!
Hide
Eloy Lafuente (stronk7) added a comment -

> Where we have no access!!!!

Ah, promote to developer, Daniele... then you will!
(share some code with us, maintain something, help translating... those sort of things)

Instead you prefer the comfortable and easy life of a bug reporter. I think you should change that. You need to change that. There is a world of amazing things in the other (dark) side. Come on, come on.

(heh, 100% joking, D, you know). :-P

Show
Eloy Lafuente (stronk7) added a comment - > Where we have no access!!!! Ah, promote to developer, Daniele... then you will! (share some code with us, maintain something, help translating... those sort of things) Instead you prefer the comfortable and easy life of a bug reporter. I think you should change that. You need to change that. There is a world of amazing things in the other (dark) side. Come on, come on. (heh, 100% joking, D, you know). :-P
Hide
Daniele Cordella added a comment -

;-D

Show
Daniele Cordella added a comment - ;-D
Hide
Sam Marshall added a comment -

Resolved as described, plus I made a few extra changes to the same purpose. Complete changes:

1) When you have viewhiddenactivities, activities are displayed in grey if:

  • The activitiy is not visible (as before)
  • The activity has date conditions which do not currently match
  • The activity has any other conditions

2) When you have viewhiddenactivities, any conditions are displayed below the activity. This used to be displayed only in editing mode, but following strong feedback from our users, it turned out that wasn't satisfactory (even if it's greyed out). After arguing a bit I agreed with them, so put it in here.

3) I changed the text of the language string used for displaying these conditions to people with viewhiddenactivities. I made the text shorter, but didn't change the meaning of the string (so no translation issues).

Show
Sam Marshall added a comment - Resolved as described, plus I made a few extra changes to the same purpose. Complete changes: 1) When you have viewhiddenactivities, activities are displayed in grey if:
  • The activitiy is not visible (as before)
  • The activity has date conditions which do not currently match
  • The activity has any other conditions
2) When you have viewhiddenactivities, any conditions are displayed below the activity. This used to be displayed only in editing mode, but following strong feedback from our users, it turned out that wasn't satisfactory (even if it's greyed out). After arguing a bit I agreed with them, so put it in here. 3) I changed the text of the language string used for displaying these conditions to people with viewhiddenactivities. I made the text shorter, but didn't change the meaning of the string (so no translation issues).
Hide
Daniele Cordella added a comment -

Thanks Sam.
I'll try to find a minute to test it and to understand it deeply.
In any case, thanks again.

Show
Daniele Cordella added a comment - Thanks Sam. I'll try to find a minute to test it and to understand it deeply. In any case, thanks again.
Hide
Daniele Cordella added a comment -

Fine Sam.
Wonderful!
At the beginning I have been thinking to an additional style in the css to give themes creators the possibility to give the right relevance to this kind of items but... your solution I much better.
Thanks.

Show
Daniele Cordella added a comment - Fine Sam. Wonderful! At the beginning I have been thinking to an additional style in the css to give themes creators the possibility to give the right relevance to this kind of items but... your solution I much better. Thanks.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: