Uploaded image for project: 'Moodle app'
  1. Moodle app
  2. MOBILE-2726

Let module site plugins hide default context menu options

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.6.0
    • 3.5.2
    • Site add-ons
    • Hide
      1. Install the group choice plugin.
      2. Create a group choice activity in a course.
      3. In the app, login as a student and open the group choice. Click the top right icon (menu) and check that you can see several options: Open in browser, Refresh, Download and Description (only if the activity has description).
      4. Edit the file mod/choicegroup/db/mobile.php. Inside the coursechoicegroup array, add the following properties:

                        'displayopeninbrowser' => false,
                        'displaydescription' => false,
                        'displayrefresh' => false,
                        'displayprefetch' => false,
                        'displaysize' => false
        

      5. Clear the Moodle cache.
      6. Back in the app, restart the app and open the group choice again. Check that now you don't see the top right menu.
      7. Edit the file again and remove some of the lines you put before, but leave some of the others. 
      8. Clear the Moodle cache, restart the app and open the group choice again. Check that now you only see the options that aren't set to false.
      9. Leave the db/mobile.php file as it was and now open the file mod/choicegroup/classes/output/mobile.php.
      10. Inside the function mobile_course_view, put this code in the returned 'javascript' field:

        var that = this; setTimeout(function() { that.displayRefresh = false; }, 0);
        

         

      1. Clear the Moodle cache, restart the app and open the group choice again.
      2. Perform a Pull To Refresh to make sure you receive the latest Javascript.
      3. Open the menu in the top right and check that you cannot see the Refresh option.
      Show
      Install the group choice plugin . Create a group choice activity in a course. In the app, login as a student and open the group choice. Click the top right icon (menu) and check that you can see several options: Open in browser, Refresh, Download and Description (only if the activity has description). Edit the file mod/choicegroup/db/mobile.php . Inside the  coursechoicegroup array, add the following properties: 'displayopeninbrowser' => false, 'displaydescription' => false, 'displayrefresh' => false, 'displayprefetch' => false, 'displaysize' => false Clear the Moodle cache. Back in the app, restart the app and open the group choice again. Check that now you don't see the top right menu. Edit the file again and remove some of the lines you put before, but leave some of the others.  Clear the Moodle cache, restart the app and open the group choice again. Check that now you only see the options that aren't set to false. Leave the db/mobile.php file as it was and now open the file mod/choicegroup/classes/output/mobile.php . Inside the function  mobile_course_view , put this code in the returned 'javascript' field: var that = this; setTimeout(function() { that.displayRefresh = false; }, 0);   Clear the Moodle cache, restart the app and open the group choice again. Perform a Pull To Refresh to make sure you receive the latest Javascript. Open the menu in the top right and check that you cannot see the Refresh option.
    • MOODLE_35_STABLE
    • MOODLE_36_STABLE
    • Moodle Mobile 3.6.0

      Right now, site plugins implementing a resource or activity cannot hide the default context menu options. We should allow them to do so.

            dpalou Dani Palou
            dpalou Dani Palou
            Pau Ferrer Pau Ferrer
            Juan Leyva Juan Leyva
            Albert Gasset Albert Gasset
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.