Update paging options in quizzes to 1 question per page

Hello, I am trying to change this value programmatically in all my courses for all the quizzes always to show 1 question per page.

I am checking the documentation here https://docs.valence.desire2learn.com/res/quiz.html for quizzes, but I don't see anything related to it.

Is there a way I can do this? I can't even see those values when getting a quiz so I can't even know what's the current value through the API.

Answers

  • Hi @Humberto.M.211

    Unfortunately, to my knowledge, page breaks values can't be updated programmatically by API. My best idea to do this is to suggest using some sort of GUI automation tool like Selenium or Power Automate Desktop.

    If it helps, the URL to open the quiz editing page/interface is consistent:

    https://[URL]/d2l/lms/quizzing/admin/modify/quiz_newedit_properties.d2l?qi=[QuizID]&ou=[OrgUnitID]
    

    where

    [URL] = the site URL

    [QuizID] = the quiz object id, unique identifier for each quiz

    [OrgUnitID] = a course identifier

    If needed, you can inform building a list of quizzes to update for the GUI automation tool to loop through by using Data Hub; there's a Quiz Objects Data Set that includes an OrgUnitID field, a QuizID field, and a PagingTypeId field showing (to a degree 😶) how many pages the quiz has — any value other than "1" (including Null) might present the quiz as a candidate for updating.

    I'll mention, finally, that while it's nifty that these URLs in are consistent, they shouldn't be considered predictable. D2L might update them over time as Brightspace is updated. But for short-term tasks like this, we should good.

  • Humberto.M.211
    Humberto.M.211 Posts: 3 🌱

    Hey @Craig.R.185, thanks for the help, I was already trying to do something with Watir for this kind of automation, and I was finding issues going to the edit page of the quiz.

    This helps me a lot having the right URL to edit, but I've been trying Selenium and Watir but both are failing to find the elements after login on the platform.

    I was even trying to find elements by javascript in the browser without any automation and it's not finding the elements, weird one.

    I'll keep doing some tests and let you know.