Moodle
  1. Moodle
  2. MDL-24180

Activity available to/from controls are duplicated when conditional activities is enabled

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: Conditional activities
    • Labels:
      None
    • Database:
      Any
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE
    • Rank:
      32279

      Description

      With conditional activities enabled some activities have two sets of available to/from controls. One from conditional activities and one from the activity itself. See the attached screenshot.

      Fixing this will involve the upgrade migrating the data in, for example, timeavailablefrom and timeavailableto in the data table into a conditional activity condition. If any activities have available from/to set the upgrade will need to enable conditional activities. Then the UI elements in the activity settings forms can be removed.

      Activities that have this problem:
      assignment
      choice
      database
      feedback
      lesson
      quiz
      SCORM package
      workshop

      Workshop is a problem as it has two sets of dates. Open for submissions and open for assessment.

      1. 20100916.patch
        3 kB
        Andrew Davis
      1. database_available.png
        231 kB

        Activity

        Hide
        Tim Hunt added a comment -

        Actually, these controls are not duplicated.

        For example, in the quiz:

        • the existing Open and Close settings are for the dates within which you are allowed to attempt the quiz. Outside these dates, you can only go to the view.php page, and see information about what the quiz activity is, and when you are (were) allowed to attempt it.
        • The Conditional activities available from and to settings control when the activity is available on the course front page, and when you are allowed to go to any page in the quiz, including the view.php script.

        Similarly for assignment, and, I guess, some of the others.

        We had this discussion when sam was implementing conditional activities, and worked out that you need both sets of settings. (By the way, sam is on leave now, and for the next two weeks.)

        So, I think that this bug should be closed as invalid.

        At most, we just need to tweak the wording of the various forms, so that it is clear what each date setting is, and what it is for. If you want to do that, it will probably have to be done by someone at Moodle.com.

        Show
        Tim Hunt added a comment - Actually, these controls are not duplicated. For example, in the quiz: the existing Open and Close settings are for the dates within which you are allowed to attempt the quiz. Outside these dates, you can only go to the view.php page, and see information about what the quiz activity is, and when you are (were) allowed to attempt it. The Conditional activities available from and to settings control when the activity is available on the course front page, and when you are allowed to go to any page in the quiz, including the view.php script. Similarly for assignment, and, I guess, some of the others. We had this discussion when sam was implementing conditional activities, and worked out that you need both sets of settings. (By the way, sam is on leave now, and for the next two weeks.) So, I think that this bug should be closed as invalid. At most, we just need to tweak the wording of the various forms, so that it is clear what each date setting is, and what it is for. If you want to do that, it will probably have to be done by someone at Moodle.com.
        Hide
        Andrew Davis added a comment - - edited

        Ok. Sounds like someone will just need to go through each activity and evaluate each one. If the two sets of dates behave so similarly as to be redundant, migrate the one within the module, and if they're different then just reword the strings to make the distinction clear. Hopefully the rest don't behave quite so similarly as in the case of the database activity for example and we can just get away with rewording the strings to make them seem less redundant.

        I'll take this issue as Sam is away pending anyone else particularly wanting it.

        Show
        Andrew Davis added a comment - - edited Ok. Sounds like someone will just need to go through each activity and evaluate each one. If the two sets of dates behave so similarly as to be redundant, migrate the one within the module, and if they're different then just reword the strings to make the distinction clear. Hopefully the rest don't behave quite so similarly as in the case of the database activity for example and we can just get away with rewording the strings to make them seem less redundant. I'll take this issue as Sam is away pending anyone else particularly wanting it.
        Hide
        Andrew Davis added a comment - - edited

        Suggestions for how the strings could be reworded welcome

        Show
        Andrew Davis added a comment - - edited Suggestions for how the strings could be reworded welcome
        Hide
        Andrew Davis added a comment -

        what effect do the various to/from dates have when you're outside their date range?

        conditional activity available from/to = either hide the activity on the course view or show it grayed out with the date that it becomes available
        activity available from/to = display activity on course view. A student clicking on the activity is shown the description and when is becomes available.
        activity viewable from/to = student can look at existing entries but not enter new ones.

        Do we really need both sets of available from/to dates? They do seem like splitting hairs. Plus letting the students click through to the activity and only then telling them the activity isn't available seems like it could be annoying.

        I've committed altered versions of the data activity viewable from/to strings to hopefully make it clear they refer to a time period when the activity is read only. Assuming the activity is available you can always view entries.

        Show
        Andrew Davis added a comment - what effect do the various to/from dates have when you're outside their date range? conditional activity available from/to = either hide the activity on the course view or show it grayed out with the date that it becomes available activity available from/to = display activity on course view. A student clicking on the activity is shown the description and when is becomes available. activity viewable from/to = student can look at existing entries but not enter new ones. Do we really need both sets of available from/to dates? They do seem like splitting hairs. Plus letting the students click through to the activity and only then telling them the activity isn't available seems like it could be annoying. I've committed altered versions of the data activity viewable from/to strings to hopefully make it clear they refer to a time period when the activity is read only. Assuming the activity is available you can always view entries.
        Hide
        Helen Foster added a comment -

        Andrew, regarding changing the string wording from 'Viewable to/from' to 'Read only to/from', I suggest that the strings are left using the word 'viewable' to make it consistent with elsewhere in Moodle.

        Also, for future reference, please could language strings only be changed if they are actually wrong, contain a typo or the meaning is changed substantially. The reason is that all changed strings are flagged for translators, 2.0 language packs contain over 15000 strings and it is confusing having changed strings where you can't see why they have been changed.

        Show
        Helen Foster added a comment - Andrew, regarding changing the string wording from 'Viewable to/from' to 'Read only to/from', I suggest that the strings are left using the word 'viewable' to make it consistent with elsewhere in Moodle. Also, for future reference, please could language strings only be changed if they are actually wrong, contain a typo or the meaning is changed substantially. The reason is that all changed strings are flagged for translators, 2.0 language packs contain over 15000 strings and it is confusing having changed strings where you can't see why they have been changed.
        Hide
        Andrew Davis added a comment - - edited

        But those strings are wrong. They say "viewable from" or "viewable to" but don't control when the activity can be viewed. They define a time period when items can not be created.

        Show
        Andrew Davis added a comment - - edited But those strings are wrong. They say "viewable from" or "viewable to" but don't control when the activity can be viewed. They define a time period when items can not be created.
        Hide
        Tim Hunt added a comment -

        Andrew, let's use an example of a quiz.

        It is very useful for the student to see that at the end of the course, there is a final exam, and for them to be able to click on that link and go to a page that tells them that they will have to pass this exam to pass the course (forum intro text), and that the exam will open on 20th April, close on the 25th of Apriland there will be a time-limit of 3 hours.

        There is no value in using conditional activities to hide (or grey out) the activity on the course page.

        A use case for conditional activities is to hide the resource "Some comments on the final exam", that gives the students some feedback on what the final exam was about, until 26th April.

        In any case, I think that date limits on activities are used moderately commonly, while using conditional activities to hide things until a certain date is much rarer, an only for special situation.

        Show
        Tim Hunt added a comment - Andrew, let's use an example of a quiz. It is very useful for the student to see that at the end of the course, there is a final exam, and for them to be able to click on that link and go to a page that tells them that they will have to pass this exam to pass the course (forum intro text), and that the exam will open on 20th April, close on the 25th of Apriland there will be a time-limit of 3 hours. There is no value in using conditional activities to hide (or grey out) the activity on the course page. A use case for conditional activities is to hide the resource "Some comments on the final exam", that gives the students some feedback on what the final exam was about, until 26th April. In any case, I think that date limits on activities are used moderately commonly, while using conditional activities to hide things until a certain date is much rarer, an only for special situation.
        Hide
        Andrew Davis added a comment - - edited

        Ok, I see the value in retaining both sets of dates. Thanks for helping me to understand Now we just need to alter the labels to make the distinction more clear. Helen/Tim, any thoughts?

        Show
        Andrew Davis added a comment - - edited Ok, I see the value in retaining both sets of dates. Thanks for helping me to understand Now we just need to alter the labels to make the distinction more clear. Helen/Tim, any thoughts?
        Hide
        Andrew Davis added a comment - - edited

        Attaching a patch for discussion that modifies some strings. Below is my thinking:

        The conditional activities available to/from dates behavior is standard across all activities so the displayed strings being completely consistent across all the activities makes sense. However, the effects of the available to/from dates within database, quiz, lesson etc are not exactly standard. They're use is implemented within each activity and the effect they have isn't quite the same between activities. It may define a time window when students can submit assignments, view glossary entries or something else. We've been using the standard term "available from/to" and leaving it to the user to guess what that means in the current context. I've altered the strings to convey specifically what they mean within each activity and of course to differentiate them from the available from/to dates to do with conditional activities.

        Show
        Andrew Davis added a comment - - edited Attaching a patch for discussion that modifies some strings. Below is my thinking: The conditional activities available to/from dates behavior is standard across all activities so the displayed strings being completely consistent across all the activities makes sense. However, the effects of the available to/from dates within database, quiz, lesson etc are not exactly standard. They're use is implemented within each activity and the effect they have isn't quite the same between activities. It may define a time window when students can submit assignments, view glossary entries or something else. We've been using the standard term "available from/to" and leaving it to the user to guess what that means in the current context. I've altered the strings to convey specifically what they mean within each activity and of course to differentiate them from the available from/to dates to do with conditional activities.
        Hide
        Tim Hunt added a comment -

        The changes look good to me, but I am not an expert on database, lesson or glossary. (Perhaps that is a good thing, we need these strings to make sense to new users.)

        Show
        Tim Hunt added a comment - The changes look good to me, but I am not an expert on database, lesson or glossary. (Perhaps that is a good thing, we need these strings to make sense to new users.)
        Hide
        Andrew Davis added a comment -

        Committed.

        Show
        Andrew Davis added a comment - Committed.
        Hide
        Helen Foster added a comment -

        Andrew, thanks for your efforts in fixing this issue as speedily as possible. However I'm sorry that I must disagree with your statement about the effects of the available to/from dates not being standard across the different activity modules.

        In each case, the activity description/introduction is always displayed and the available to/from dates specify when students can participate in the activity. It has always been this way, and it seems everyone understands the functionality, as I've not come across anyone saying otherwise in the forums or tracker. Also, the effects of the available to/from dates are explained in the documentation for each activity module.

        Thus, I would recommend that the assignment, data and lesson strings are left as they were i.e. the changes in cvs are reverted. Instead, I would recommend that a help popup is added to explain the new conditional activity settings and if necessary strings in condition.php are changed, rather than strings which have existed in a number of versions of Moodle.

        A further reason for not changing well-established language strings is that many books and manuals have been written about Moodle and users become very confused if the Moodle interface is different from how it's described in the book or manual.

        Regarding the new conditional activity settings, to avoid using the word 'available' again, the settings could be changed to 'Accessible from/to' with a help popup:

        Accessible from/to dates determine when students can access the activity via a link on the course page.

        The difference between accessible from/to dates and availability settings for the activity is that outside the set dates the latter allows students to view the activity description, whereas accessible from/to dates prevent access completely.

        Show
        Helen Foster added a comment - Andrew, thanks for your efforts in fixing this issue as speedily as possible. However I'm sorry that I must disagree with your statement about the effects of the available to/from dates not being standard across the different activity modules. In each case, the activity description/introduction is always displayed and the available to/from dates specify when students can participate in the activity. It has always been this way, and it seems everyone understands the functionality, as I've not come across anyone saying otherwise in the forums or tracker. Also, the effects of the available to/from dates are explained in the documentation for each activity module. Thus, I would recommend that the assignment, data and lesson strings are left as they were i.e. the changes in cvs are reverted. Instead, I would recommend that a help popup is added to explain the new conditional activity settings and if necessary strings in condition.php are changed, rather than strings which have existed in a number of versions of Moodle. A further reason for not changing well-established language strings is that many books and manuals have been written about Moodle and users become very confused if the Moodle interface is different from how it's described in the book or manual. Regarding the new conditional activity settings, to avoid using the word 'available' again, the settings could be changed to 'Accessible from/to' with a help popup: Accessible from/to dates determine when students can access the activity via a link on the course page. The difference between accessible from/to dates and availability settings for the activity is that outside the set dates the latter allows students to view the activity description, whereas accessible from/to dates prevent access completely.
        Hide
        Andrew Davis added a comment -

        Ok, I understand your reluctance to change long established strings. I'll revert those changes later today.

        Having two fields labelled the same thing is not acceptable. Help popup or not help popup. If the old strings cannot change then the new strings must.

        "Accessible from/to" is a possibility. "Accessible from/to course view" maybe if we want to be more verbose.

        Show
        Andrew Davis added a comment - Ok, I understand your reluctance to change long established strings. I'll revert those changes later today. Having two fields labelled the same thing is not acceptable. Help popup or not help popup. If the old strings cannot change then the new strings must. "Accessible from/to" is a possibility. "Accessible from/to course view" maybe if we want to be more verbose.
        Hide
        Helen Foster added a comment -

        Thanks Andrew. I prefer "Accessible from/to" rather than "Accessible from/to course view", as the term 'course view' is not used elsewhere within Moodle.

        Show
        Helen Foster added a comment - Thanks Andrew. I prefer "Accessible from/to" rather than "Accessible from/to course view", as the term 'course view' is not used elsewhere within Moodle.
        Hide
        Andrew Davis added a comment -

        I had hoped to have Tim reappear in here to give this his thumbs up or not before doing this but, at the risk of tempting fate, I have reverted those string changes and changed the conditional completion strings to "Accessible to/from". Today is RC 1 day so trying to avoid it going out with UI issues still in play.

        Tim, let me know asap if you're not happy with this solution. I'm about to go IM you the bug number to get you to take a look as soon as you come online next.

        Show
        Andrew Davis added a comment - I had hoped to have Tim reappear in here to give this his thumbs up or not before doing this but, at the risk of tempting fate, I have reverted those string changes and changed the conditional completion strings to "Accessible to/from". Today is RC 1 day so trying to avoid it going out with UI issues still in play. Tim, let me know asap if you're not happy with this solution. I'm about to go IM you the bug number to get you to take a look as soon as you come online next.
        Hide
        Tim Hunt added a comment -

        It's none of my business, except for the quiz, which already used distinctive strings, and I don't believe you have messed that up now.

        Actually, I am tempted to quote Olli Savolianen (former GSoC student) "The only way to decide usability questions is to test it with some real users."

        If you can't do that, you will have to take your best guess.

        Show
        Tim Hunt added a comment - It's none of my business, except for the quiz, which already used distinctive strings, and I don't believe you have messed that up now. Actually, I am tempted to quote Olli Savolianen (former GSoC student) "The only way to decide usability questions is to test it with some real users." If you can't do that, you will have to take your best guess.
        Hide
        Andrew Davis added a comment -

        Fair point. We'll run with what we now have and see what the users think.

        Show
        Andrew Davis added a comment - Fair point. We'll run with what we now have and see what the users think.
        Hide
        Sam Marshall added a comment -

        Thank you all for sorting this out in my absence. tl;dr version - I agree with the conclusion to go with this and see what feedback is like.

        Full comment:

        To be honest I think in many cases, it is not necessary to have two sets of dates as the difference in behaviour is very small. (There are some dates, like the quiz ones, which do have distinctly different behaviour.) I think the difference in terms of displaying the description was probably really forced by infrastructure (ie there wasn't previously a way to hide the link from the main menu outside those times, so you need to do something on the page they get to) rather than designed for usability reasons.

        My preferred solution would be to remove the 'per-module' dates given that there is now a standard feature which does that.

        HOWEVER, unless this has changed, conditional availability support is only an option i.e. it might not be turned on, in which case you don't get the conditional dates. For this reason it is probably better to keep the rather redundant dates. Apart from the extra work, that's why I didn't change anything.

        Show
        Sam Marshall added a comment - Thank you all for sorting this out in my absence. tl;dr version - I agree with the conclusion to go with this and see what feedback is like. Full comment: To be honest I think in many cases, it is not necessary to have two sets of dates as the difference in behaviour is very small. (There are some dates, like the quiz ones, which do have distinctly different behaviour.) I think the difference in terms of displaying the description was probably really forced by infrastructure (ie there wasn't previously a way to hide the link from the main menu outside those times, so you need to do something on the page they get to) rather than designed for usability reasons. My preferred solution would be to remove the 'per-module' dates given that there is now a standard feature which does that. HOWEVER, unless this has changed, conditional availability support is only an option i.e. it might not be turned on, in which case you don't get the conditional dates. For this reason it is probably better to keep the rather redundant dates. Apart from the extra work, that's why I didn't change anything.
        Hide
        Helen Foster added a comment -

        Sam, thanks for your comment. Glad to hear you agree!

        Just reopening the issue as I notice that an Accessible from help popup has not yet been added to the UI. Andrew, please could you add it?

        Show
        Helen Foster added a comment - Sam, thanks for your comment. Glad to hear you agree! Just reopening the issue as I notice that an Accessible from help popup has not yet been added to the UI. Andrew, please could you add it?
        Hide
        Andrew Davis added a comment -

        done

        Show
        Andrew Davis added a comment - done
        Hide
        Helen Foster added a comment -

        Great! Thanks Andrew

        Show
        Helen Foster added a comment - Great! Thanks Andrew
        Hide
        Sam Marshall added a comment -

        note about today's change: applied new lang file patch to change word 'accessible' to 'access' & make consistent in a few more places, following request/discussion from David and Helen.

        intentionally left at 'available' in the messages that appear to students on home page as these are already quite clear.

        Show
        Sam Marshall added a comment - note about today's change: applied new lang file patch to change word 'accessible' to 'access' & make consistent in a few more places, following request/discussion from David and Helen. intentionally left at 'available' in the messages that appear to students on home page as these are already quite clear.

          People

          • Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: