Промени в седмичния формат на курс в best



Дата25.07.2016
Размер20.54 Kb.
#6517

Промени в седмичния формат на курс в BEST

На базата на кода на базовата разработка Moodle 1.7 в BEST форматът на курс „Седмичен формат” беше оптимизиран. Внесените промени в кода имаха за крайна цел оптимизиране на интерфейса и динамичната навигация. Причин за оптимизацита е неудобството при превъртане през твърде голям брой (10) екрани (седмици) в курс конфигуриран в седмичен формат. Разработеният панел с табове позволява избиране само на седмицата която потребителят би искал да види. Оптимизирането в презареждането на страницата се състои в използването на AJAX, което дава възможност при щракване върху таб да се презарежда само на тази част от страницата отнасяща се до текущата седмица, като останалите вече „ посетени седмици” са в паметта. При този подход на съхраняване в паметта на вече посетените „седмици”, когато потребителя се върне назад към вече посетена седмица от курса, то не се извършва пълно презареждане. За да се изключва тази опция първият табо от двете групи табове е наречен „Всички седмици” и визуализира формата на курса по стария начин с който са свикнали потребителите до момента. Табовете са разделени в две групи от по шест (седмици). Предмет на по-следващи доработки ще бъде отстраняването на ефекта:

„В рамките на таба „Всички седм.” падащите менюта в секциите „Добавяне ресурс” и „Добавяне учебна дейност” не работят (при всички останали- функционалността е налична). Останалите формати на курс налични в BEST (9 на брой към 7 във версия 1.7 на Moodle) не се влияят от направените тук промени. Планирана задача е да се внесат необходимите промени в останалите типове формати format.php
On the base of source code of the base platform Moodle 1.7 in to BEST we've developed a modification that places a tab panel on top of BEST course page, so now user can select which week you want to see. Also, a bit of AJAX to only the "current week" part of the page is reloaded when you click on the tabs was used. The visited weeks stay in memory, so if the user goes back to one of them it doesn't even reload anything at all. The tabs in groups of 6 weeks (so it doesn't go off the screen) under the first section have been placed.
A first tab called "All Weeks" that a show all the weeks as it originally does have been made also. It makes more sense to place the tabs under the first section, and it should be possible to use the old way that users got used to use. More development process is planed because the following problem: “When editing in "All Weeks" view, the dropdown menus on the sections (add Resource, add Activity) do nothing.” it's a modification of the "week" course format, so it doesn't affect the other types. The way BEST works, it has each type's format.php to add this to be changed, although they may be similar.

Main changes have for an object to allow the use of tabs to navigate through the weeks of a course, using a bit of AJAX along the way to avoid reloading weeks that user have already checked (unless it's been more than 5 minutes since).

Един добър подход бе поставянето на табовете в два реда под секцията с резюмето на курса (секция 0). Възможност за визуализиране на седмиците от учебния курс в разгънат вид с който са свикнали потребителите наложи включването на табът „Всички седм.”

It was masterstroke the tabs to be under the "Intro" section (section 0), and there is a tab called "All Weeks" that shows all the weeks as usual. The tab strips contain a maximum of 6 tabs, if exceeded; another strip is created and so on. This modification affects only the courses that use the "weeks" format.

The files were modified are:
lib/weblib.php- Here's where the TAB data structure is defined. A variable called "function" that stores the call to the JavaScript function has been added. If it's void, it behaves as usual.
courses/format/weeks/format.php - The tabs to be added the half of this file has been modified. Only print the first two sections (0 and 1), and add the JavaScript function. The tabs store the function that calls subFormat.php with the appropriate parameters. The JavaScript function calls subFormat (if we didn't have that week already) and stores the info in memory, then puts this info in the second TABLE. The JavaScript also checks if the page is older than 5 minutes in that case it forces a reload.
courses/format/weeks/subFormat.php (Created New)- This file just picks the parameter of which week to show and returns the content of that week, if the parameter is "all weeks" then it does a FOR and prints them all.
Implementation of new tabbed course format modification:
To install this modification simply copy each file inside "Source Code" to its corresponding folder.
Notice that there is still a minor glitch: when editing in "All Weeks" view, the dropdown menus on the sections (add Resource, add Activity) do nothing.

Fig. 1. The week format as is in Moodle




Fig. 2. The week format as is in Bulgarian Educational Site


Сподели с приятели:




©obuch.info 2024
отнасят до администрацията

    Начална страница