Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-22708

Moodle 1.9.7 course overview semester sorting and MyMoodle semester sorting

XMLWordPrintable

    • MySQL
    • MOODLE_19_STABLE

      1. ---------------------------------------------------------------
      2. This software is provided under the GNU General Public License
      3. http://www.gnu.org/licenses/gpl.html
      4. with Copyright © 2009 onwards
        #
      5. Dipl.-Ing. Andreas Hruska
      6. andreas.hruska@elearning.tuwien.ac.at
      7. Dipl.-Ing. Mag. rer.soc.oec. Katarzyna Potocka
      8. katarzyna.potocka@elearning.tuwien.ac.at
      9. Vienna University of Technology
      10. E-Learning Centre
      11. Gusshausstrasse 28/E015
      12. 1040 Wien
      13. http://elearning.tuwien.ac.at/
      14. ---------------------------------------------------------------
      15. FOR Moodle 1.9.7 !!!
      16. ---------------------------------------------------------------

      README.txt
      v.2010-03-03

      Moodle 1.9.7 course overview semester sorting and MyMoodle semester sorting

      This is a cummulated patch for thw following two improvements:
      http://tracker.moodle.org/browse/MDL-18760
      http://tracker.moodle.org/browse/MDL-20593

      What will this patch do:
      This patch will give the administrator the possbility to change the layout of the course overview, either on the course overview page or on the MyMoodle site.
      The administrator will have the possibility to choose a different front page layout for the "My courses" display.
      Go to Site Administration/Front Page/Front Page settings/ (/admin/settings.php?section=frontpagesettings) for setup (see screenshots).
      The courses will be sorted according to the startdate set within the course settings.
      Additionally the administrator will have the possibility to turn on the MyMoodle site and to check the semsorting, so that the courses on the MyMoodle site will be sorted according to the startdate. The possibility to change the semsort to standard Moodle sorting is available.

      You can transfer courses into the next term just by adjusting the startdate.
      Within the attached screenshots you can see the difference between moodle-standard sorting and the novel semester sorting and the standard sorted MyMoodle site and the MyMoodle site sorted according to courses startdates.

      My courses:
      Labels of the sections will be YEAR+semester S for summer, W for winter eg 2009S or 2008W.
      The label of the current term will be "My current courses".
      MyMoodle:
      Labels of the sections will be "Summer term+YEAR" for summer, "Winter term+YEAR" for winter eg Summer term 2010 or Winter term 2009.

      Summer S = startdate IN (Feb, Mar, Apr, May, Jun) = (2,3,4,5,6)
      Winter W = startdate IN (Jul, Aug, Sep, Oct, Nov, Dec, Jan) = (7,8,9,10,11,12,1)

      0) Prerequisites
      1) Applying the patch
      2) Add german language files (optional)
      3) Add style sheet part
      4) Screenshots
      5) Use your new moodle enhancement, and have fun
      6) If something went wrong
      7) Additional settings - just a little bit coding
      8) Please send feedback to

      Follow these instructions for applying the patch:

      0) Prerequisites:

      a) Make sure your Moodle Version is 1.9.7
      b) Make a Backup of EVERYTHING (moodle, moodledata, database,...)
      c) Make sure you can restore your backup and the restored system works
      d) Make sure you can apply a unified-diff patch to your moodle source code (e.g. Eclipse)

      We highly recommend applying and testing the patch on a testsystem before applying it to your production system.

      Files contained in this patch:
      tuwienhumboldt_elzmoodle_courseoverview_mymoodle_semestersorting_patch197_20100303_readme.txt
      tuwienhumboldt_elzmoodle_courseoverview_mymoodle_semestersorting_patch197_20100303.diff
      mycourses_admin.jpg (settings)
      mycourses_studentview.jpg (courselist with new sorting)
      mymoodle_admin_before_patch.jpg (settings)
      mymoodle_admin_empty.jpg (settings)
      mymoodle_admin_notempty.jpg (settings)
      mymoodle_studentview.jpg (mymoodle site with new sorting)
      de_utf8/
      de_utf8/my_hub.php
      css/
      css/my_hub.css

      What will happen - what files are effected:

      Included in the patch:
      ../lang/en_utf8/my_hub.php (new)
      ../index.php
      ../course/lib.php
      ../lib/adminlib.php
      ../admin/settings/appearance.php
      ../my/index.php

      Have to be included/changed manually for german language-package:
      ../lang/de_utf8/my_hub.php
      ../theme/yourchosentheme/styles.layout.css

      1) Applying the patch:

      http://docs.moodle.org/en/Patch
      http://docs.moodle.org/en/Development:How_to_apply_a_patch

      If you are using Eclipse just follow these steps:
      a) have your current moodle_197 version as a project (PHP project) in Eclipse (cvs, filesystem,...)
      b) right click the project and choose Team -> Apply patch
      c) choose the patch file tuwienhumboldt_elzmoodle_courseoverview_mymoodle_semestersorting_patch197_20100303.diff
      d) select the path for applying the patch (the project you have right-clicked before)
      e) preview the changes
      f) if language-file moodle_tuwel.php does not exist -> click Finish
      else if language-file moodle_tuwel.php does already exist -> deselect it from patching and apply changes manually (see 2.1)

      2) language files:
      2.1) Add english language file (see 1.f.2):
      if you already have a moodle_tuwel.php or a my_hub.php language file, extend it:

      $string['frontpagecourselistsortedstartdate'] = 'List of courses sorted by coursestartdate'; //kp added 17.02.2009
      $string['courseoverviewsemester'] = 'Semester $a';
      $string['mycoursescurrent'] = 'My current courses';

      // admin/settings/appearence.php
      $string['courseordersemester'] = 'Course Sortorder: term-wise';
      $string['config_courseordersemester'] = 'moodle wide on/off';
      $string['courseordersemester_user'] = 'Sortorder as user preference in DB';
      $string['config_courseordersemester_user'] = 'Save the sortorder as an user preference in the DB (reqires 2 DB accesses per myMoodle visit), use Cookies otherwise';
      $string['courseordersemester_names'] = 'Months of the winter term';
      $string['config_courseordersemester_names'] = 'unselected month = month of the summer term';
      $string['mymoodleadminnote'] = 'Admin note';
      $string['config_mymoodleadminnote'] = 'if set, shown on any myMoodle page';

      // my/index.php
      $string['courseordersemester_summerterm'] = 'Summer term';
      $string['courseordersemester_winterterm'] = 'Winter term';
      $string['courseordersemester_semester'] = 'Sortorder: standard moodle ';
      $string['courseordersemester_classic'] = 'Sortorder: term based';

      // accessability
      $string['courseordersemester_access'] = 'Skip Course';

      otherwise
      copy the my_hub.php file into your lang/en_utf8 folder

      2.2) Add german language file (optional):
      if you already have a moodle_tuwel.php or my_hub.php language file, extend it:

      $string['frontpagecourselistsortedstartdate'] = 'Kursliste sortiert nach Kursstartdatum'; //kp added 17.02.2009
      $string['courseoverviewsemester'] = 'Semester $a';
      $string['mycoursescurrent'] = 'Meine aktuellen Kurse';

      // admin/settings/appearence.php
      $string['courseordersemester'] = 'Kurse nach Semestern sortieren';
      $string['config_courseordersemester'] = 'Instanzweit an/aus';
      $string['courseordersemester_user'] = 'Sortierung pro Nutzer in DB speichern';
      $string['config_courseordersemester_user'] = 'Speichert die Auswahl pro Nutzer in der DB, Session und Browser uebergreifend (2 DB Zufriffe pro Nutzer / myMoodle Aufruf notwendig), anderenfalls Cookies zum Speichern verwenden';
      $string['courseordersemester_names'] = 'Monate des Wintersemesters';
      $string['config_courseordersemester_names'] = 'nicht markierte Monate = Monate des Sommersemesters. Die Monate 1-6 zaehlen noch zum Wintersemester des Vorjahres';
      $string['mymoodleadminnote'] = 'Adminnotiz';
      $string['config_mymoodleadminnote'] = 'wenn gesetzt, wird diese Nachricht instanzweit verbindlich auf der myMoodle Seite angezeigt';

      // my/index.php
      $string['courseordersemester_summerterm'] = 'Sommersemester';
      $string['courseordersemester_winterterm'] = 'Wintersemester';
      $string['courseordersemester_semester'] = 'Sortierung: moodle Standard';
      $string['courseordersemester_classic'] = 'Sortierung: semesterbasiert';

      // accessability
      $string['courseordersemester_access'] = 'Kurs überspringen';

      otherwise
      copy the my_hub.php file into your lang/de_utf8 folder

      3) Add style sheet part
      Add the content of the my_hub.css file to your ../theme/yourchosentheme/styles.layout.css file!

      4) Screenshot:
      mycourses_admin.jpg
      mycourses_studentview.jpg
      mymoodle_admin_notempty.jpg
      mymoodle_admin_empty.jpg
      mymoodle_admin_before_patch.jpg
      mymoodle_studentview.jpg

      5) Use your new moodle enhancement, and have fun

      6) If something went wrong ... don't panic ... just make a reversion
      Just follow these steps (Eclipse):
      b) right click the project and choose Team -> Apply patch
      c) choose the patch file tuwienhumboldt_elzmoodle_courseoverview_mymoodle_semestersorting_patch197_20100303.diff
      d) select the path for applying the patch (the project you have right-clicked before)
      e) choose the checkbox 'Reverse patch' (this will remove all the further added changes)
      e) preview the reversion and click Finish

      7) Additional settings - just a little bit coding
      7.1) Moodle sorting or semesterbades sorting on your MyMoodle site:
      if you don't want to leave it to your students if they use the Moodle sorting or the semesterbased sorting on their MyMoodle site,
      you just have to comment out one line of code
      in the ../my/index.php file search for "// the sortorder switch" and add "//" in front of the following line:
      echo '<div class="semswitch"><div class="header"><div class="title"><a onclick="document.cookie = \'mySortorder=hide:'.$uhash.'; expires=\'+ expires.toGMTString();" href="'.$CFG->wwwroot.'/my/index.php?sortorder=classic">'.get_string('courseordersemester_semester', 'my_hub').'</a></div></div></div>';

      so that it looks like:
      //echo '<div class="semswitch"><div class="header"><div class="title"><a onclick="document.cookie = \'mySortorder=hide:'.$uhash.'; expires=\'+ expires.toGMTString();" href="'.$CFG->wwwroot.'/my/index.php?sortorder=classic">'.get_string('courseordersemester_semester', 'my_hub').'</a></div></div></div>';

      7.2) Different term settings:
      if your institution has different term settings than
      summer term: February, March, April, May, June and
      winter term: July, August, September, October, November, December, January
      than you have the possibility to change this within the admin settings of your Moodle Site.
      If you want to change this additionally within the code you have to change following lines within 2 php files (../course/lib.php and ../my/index.php):
      $SS = array(2,3,4,5,6);
      $WS = array(1,10,11,12,7,8,9);

      8) Please send feedback to:
      katarzyna.potocka@elearning.tuwien.ac.at
      andreas.hruska@elearning.tuwien.ac.at

      See als

            Unassigned Unassigned
            ahruska Andreas Hruska
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

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