# Path: linux_story/common.py
# def get_max_challenge_number():
#     '''
#     Returns:
#         str: string of the maximum challenge number as saved in
#             kano-profile.
#     '''
# 
#     # Hardcoded path, perhaps change it later
#     path = "/usr/share/kano-profile/rules/app_profiles.json"
#     f = open(path)
#     str_data = f.read()
#     f.close()
# 
#     dict_data = json.loads(str_data)
#     max_level = dict_data['linux-story']['max-level']
# 
#     return max_level
# 
# Path: linux_story/titles.py



from gi.repository import Gtk, GObject
from kano_profile.apps import load_app_state_variable
from linux_story.common import get_max_challenge_number
from linux_story.titles import challenges, chapters
        align.set_padding(10, 10, 0, 0)

        self.back_btn.connect('clicked', back_button_cb)

        row = 0
        column = 0
        total_columns = 6

        for i in range(start, end + 1):
            button = create_button_cb(i)
            self.button_grid.attach(button, column, row, 1, 1)
            column += 1

            if column > total_columns:
                row += 1
                column = 0

        # Show info title and info description of the relevent chapter
        # or challenge.
        self.info_box = self.create_info_box()

        # Pack the title and description in the menu
        vbox.pack_start(self.info_box, False, False, 10)

        return align

    def create_chapter_menu(self):
        """Create a menu of the available chapters
        """


# Path: linux_story/common.py
# def get_max_challenge_number():
#     '''
#     Returns:
#         str: string of the maximum challenge number as saved in
#             kano-profile.
#     '''
# 
#     # Hardcoded path, perhaps change it later
#     path = "/usr/share/kano-profile/rules/app_profiles.json"
#     f = open(path)
#     str_data = f.read()
#     f.close()
# 
#     dict_data = json.loads(str_data)
#     max_level = dict_data['linux-story']['max-level']
# 
#     return max_level
# 
# Path: linux_story/titles.py



# Path: linux_story/gtk3/MenuScreen.py
from gi.repository import Gtk, GObject
from kano_profile.apps import load_app_state_variable
from linux_story.common import get_max_challenge_number
from linux_story.titles import challenges, chapters

        align.set_padding(10, 10, 0, 0)

        self.back_btn.connect('clicked', back_button_cb)

        row = 0
        column = 0
        total_columns = 6

        for i in range(start, end + 1):
            button = create_button_cb(i)
            self.button_grid.attach(button, column, row, 1, 1)
            column += 1

            if column > total_columns:
                row += 1
                column = 0

        # Show info title and info description of the relevent chapter
        # or challenge.
        self.info_box = self.create_info_box()

        # Pack the title and description in the menu
        vbox.pack_start(self.info_box, False, False, 10)

        return align

    def create_chapter_menu(self):
        """Create a menu of the available chapters
        """


        num_of_chapters = len(chapters)