Get many exams

@param Bookboon $bookboon
@return BookboonResponse
@throws \Bookboon\Api\Exception\UsageException
557205
public static function getAll(Bookboon $bookboon) : BookboonResponse
    {
        $bResponse = $bookboon->rawRequest("/exams");

        $bResponse->setEntityStore(
            new EntityStore(static::getEntitiesFromArray($bResponse->getReturnArray()))
        );

        return $bResponse;
    }
229777
public function getMbPage($slugPage)
    {
        if (!$this->mbPages->has($slugPage)) {
            throw new MbException("The page {$slugPage} has not been added to MocaBonita's list of pages!");
        }

        return $this->mbPages->get($slugPage);
    }
635759
public function getPagesFromFacebookAccount()
    {
        $registeredFbPages = array();
        $returnedFbPages = array();

        // Get all Facebook pages already persisted into Playground

        $pgPages = $this->getPageMapper()->findAll();
        foreach ($pgPages as $page) {
            $registeredFbPages[$page->getPageId()] = true;
        }

        // Retrieve user Facebook identifier, if user is connected to Facebook

        $user = null;

        $config = $this->getServiceManager()->get('config');
        if (isset($config['facebook'])) {
            $facebookPtf = new \Facebook(array(
                'appId' => $config['facebook']['fb_appid'],
                'secret' => $config['facebook']['fb_secret'],
                'cookie' => false
            ));

            $user = $facebookPtf->getUser();
        }

        // Try to retrieve pages from Facebook, if user is connected to Facebook

        if ($user) {
            try {
                // Retrieve pages administred by the user

                $userFbPages = $facebookPtf->api('/me/accounts?fields=id,name,link', 'GET');

                if (isset($userFbPages['data']) && is_array($userFbPages['data'])) {
                    foreach ($userFbPages['data'] as $userFbPage) {
                        if (array_key_exists('id', $userFbPage)) {
                            if (! array_key_exists($userFbPage['id'], $registeredFbPages)) {
                                $returnedFbPages[] = array(
                                    'pageId' => $userFbPage['id'],
                                    'pageName' => array_key_exists('id', $userFbPage) ? $userFbPage['name'] : '',
                                    'pageLink' => array_key_exists('link', $userFbPage) ? $userFbPage['link'] : ''
                                );
                            }
                        }
                    }
                }
            } catch (\FacebookApiException $e) {
            }
        }

        return $returnedFbPages;
    }
1086453
protected function get_all_concepts() {
        global $USER;

        if ($this->cache === null) {
            $this->cache = cache::make_from_params(cache_store::MODE_REQUEST, 'filter', 'glossary');
        }

        // Try to get current course.
        $coursectx = $this->context->get_course_context(false);
        if (!$coursectx) {
            // Only global glossaries will be linked.
            $courseid = 0;
        } else {
            $courseid = $coursectx->instanceid;
        }

        $cached = $this->cache->get('concepts');
        if ($cached !== false && ($cached->cachecourseid != $courseid || $cached->cacheuserid != $USER->id)) {
            // Invalidate the page cache.
            $cached = false;
        }

        if ($cached !== false && is_array($cached->cacheconceptlist)) {
            return $cached->cacheconceptlist;
        }

        list($glossaries, $allconcepts) = \mod_glossary\local\concept_cache::get_concepts($courseid);

        if (!$allconcepts) {
            $tocache = new stdClass();
            $tocache->cacheuserid = $USER->id;
            $tocache->cachecourseid = $courseid;
            $tocache->cacheconceptlist = [];
            $this->cache->set('concepts', $tocache);
            return [];
        }

        $conceptlist = array();

        foreach ($allconcepts as $concepts) {
            foreach ($concepts as $concept) {
                $conceptlist[] = new filterobject($concept->concept, null, null,
                        $concept->casesensitive, $concept->fullmatch, null,
                        [$this, 'filterobject_prepare_replacement_callback'], [$concept, $glossaries]);
            }
        }

        // We sort longest first, so that when we replace the terms,
        // the longest ones are replaced first. This does the right thing
        // when you have two terms like 'Moodle' and 'Moodle 3.5'. You want the longest match.
        usort($conceptlist, [$this, 'sort_entries_by_length']);

        $conceptlist = filter_prepare_phrases_for_filtering($conceptlist);

        $tocache = new stdClass();
        $tocache->cacheuserid = $USER->id;
        $tocache->cachecourseid = $courseid;
        $tocache->cacheconceptlist = $conceptlist;
        $this->cache->set('concepts', $tocache);

        return $conceptlist;
    }
122152
public static function create_from_book(\stdClass $book, \context_module $context) {
        $data = array(
            'context' => $context,
            'objectid' => $book->id
        );
        /** @var book_printed $event */
        $event = self::create($data);
        $event->add_record_snapshot('book', $book);
        return $event;
    }
290695
public function getEmailInfo($bookID, $email)
    {
        if (empty($bookID) || empty($email)) {
            return $this->handleError('Empty book id or email');
        }

        $requestResult = $this->sendRequest('addressbooks/' . $bookID . '/emails/' . $email);

        return $this->handleResult($requestResult);
    }
155624
static function getAllSubsections( $book_structure ) {
		if ( Export::shouldParseSubsections() ) {
			$book_subsections_transient = \Pressbooks\Book::SUBSECTIONS_TRANSIENT;
			$subsection_processing_transient = \Pressbooks\Book::SUBSECTION_PROCESSING_TRANSIENT;
			$book_subsections = get_transient( $book_subsections_transient );
			if ( ! $book_subsections ) {
				$book_subsections = [];
				if ( ! get_transient( $subsection_processing_transient ) ) {
					set_transient( $subsection_processing_transient, 1, 5 * MINUTE_IN_SECONDS );
					foreach ( $book_structure['front-matter'] as $section ) {
						$subsections = \Pressbooks\Book::getSubsections( $section['ID'] );
						if ( $subsections ) {
							$book_subsections['front-matter'][ $section['ID'] ] = $subsections;
						}
					}
					foreach ( $book_structure['part'] as $key => $part ) {
						if ( ! empty( $part['chapters'] ) ) {
							foreach ( $part['chapters'] as $section ) {
								$subsections = \Pressbooks\Book::getSubsections( $section['ID'] );
								if ( $subsections ) {
									$book_subsections['chapters'][ $section['ID'] ] = $subsections;
								}
							}
						}
					}
					foreach ( $book_structure['back-matter'] as $section ) {
						$subsections = \Pressbooks\Book::getSubsections( $section['ID'] );
						if ( $subsections ) {
							$book_subsections['back-matter'][ $section['ID'] ] = $subsections;
						}
					}
					delete_transient( $subsection_processing_transient );
				}
			}
			set_transient( $book_subsections_transient, $book_subsections );
			return $book_subsections;
		}
		return [];
	}
880792
public function getTaxonomies(bool $force = false)
    {
        if ($this->nb_catalog_taxonomy_list->isEmpty() || $force) {
            $this->nb_catalog_taxonomy_list->clear();
            $this->nb_catalog_taxonomy_list->merge(
                CNabuCatalogTaxonomy::getAllCatalogTaxonomies($this)
            );
        }

        return $this->nb_catalog_taxonomy_list;
    }
448746
def get_gradebooks(self):
        
        if self.retrieved:
            raise errors.IllegalState('List has already been retrieved.')
        self.retrieved = True
        return objects.GradebookList(self._results, runtime=self._runtime)
1351837
public function getPagesWordCount()
    {
        try {
            $strURI = Product::$baseProductUri . "/pdf/" . $this->getFileName() . "/pages/wordCount";

            $signedURI = Utils::sign($strURI);

            $responseStream = Utils::processCommand($signedURI, "GET", "", "");

            $json = json_decode($responseStream);

            return $json->WordsPerPage->List;

        } catch (Exception $e) {
            throw new Exception($e->getMessage());
        }
    }
1181791
public static function getBOM(string $which)
    {
        $cname = self::class . '::' . strtoupper($which) . '_BOM';
        if (!defined($cname))
            return null;

        $bytes = constant($cname);
        $bom = '';
        foreach ($bytes as $ord)
            $bom .= chr($ord);
        return $bom;
    }
1321994
public function getPager(array $criteria, $page, $limit = 10, array $sort = [])
    {
        if (!isset($criteria['mode'])) {
            $criteria['mode'] = 'public';
        }

        $parameters = [];
        $query = $this->getRepository()
            ->createQueryBuilder('p')
            ->select('p, t')
            ->orderBy('p.publicationDateStart', 'DESC');

        if ('admin' === $criteria['mode']) {
            $query
                ->leftJoin('p.tags', 't')
                ->leftJoin('p.author', 'a')
            ;
        } else {
            $query
                ->leftJoin('p.tags', 't', Join::WITH, 't.enabled = true')
                ->leftJoin('p.author', 'a', Join::WITH, 'a.enabled = true')
            ;
        }

        if (!isset($criteria['enabled']) && 'public' === $criteria['mode']) {
            $criteria['enabled'] = true;
        }
        if (isset($criteria['enabled'])) {
            $query->andWhere('p.enabled = :enabled');
            $parameters['enabled'] = $criteria['enabled'];
        }

        if (isset($criteria['date'], $criteria['date']['query'], $criteria['date']['params'])) {
            $query->andWhere($criteria['date']['query']);
            $parameters = array_merge($parameters, $criteria['date']['params']);
        }

        if (isset($criteria['tag'])) {
            $query
                ->leftJoin('p.tags', 't2')
                ->andWhere('t2.slug LIKE :tag');
            $parameters['tag'] = (string) $criteria['tag'];
        }

        if (isset($criteria['author'])) {
            if (!\is_array($criteria['author']) && stristr($criteria['author'], 'NULL')) {
                $query->andWhere('p.author IS '.$criteria['author']);
            } else {
                $query->andWhere(sprintf('p.author IN (%s)', implode(',', (array) $criteria['author'])));
            }
        }

        if (isset($criteria['collection']) && $criteria['collection'] instanceof CollectionInterface) {
            $query->andWhere('p.collection = :collectionid');
            $parameters['collectionid'] = $criteria['collection']->getId();
        }

        $query->setParameters($parameters);

        $pager = new Pager();
        $pager->setMaxPerPage($limit);
        $pager->setQuery(new ProxyQuery($query));
        $pager->setPage($page);
        $pager->init();

        return $pager;
    }
741151
protected function GetReviewsForUser()
    {
        $oUserReviews = null;
        $oUser = TdbDataExtranetUser::GetInstance();
        if ($oUser->IsLoggedIn()) {
            $oUserReviews = $oUser->GetFieldShopArticleReviewList();
        }

        return $oUserReviews;
    }
1345152
public static function getDownloadUrl(
        Bookboon $bookboon,
        string $bookId,
        array $variables,
        string $format = self::FORMAT_PDF
    ) : string {
        $variables['format'] = $format;

        $bResponse = $bookboon->rawRequest("/books/$bookId/download", $variables, ClientInterface::HTTP_POST);

        return $bResponse->getReturnArray()['url'];
    }
1130756
public function getReference($bAbbreviate = false)
	{
		$oFirstVerse = $this->getFirstVerse();
		$oLastVerse = $this->getLastVerse();

		// John 3
		$strRef = ($bAbbreviate ? $oFirstVerse->book_abbr : $oFirstVerse->book_name)
			. ' ' . $oFirstVerse->chapter;

		if (!$this->isFullChapter()) {

			// John 3:16
			$strRef .= ':' . $oFirstVerse->verse;

			if (count($this->aVerses) > 1) {

				if ($oFirstVerse->book_id == $oLastVerse->book_id && $oFirstVerse->chapter == $oLastVerse->chapter) {

					// John 3:16-17
					$strRef .= '-' . $oLastVerse->verse;

				} else {

					$strRef .= ' - ';

					// John 3:16 - Acts 1:1
					if ($oFirstVerse->book_id !== $oLastVerse->book_id)
						$strRef .= ($bAbbreviate ? $oLastVerse->book_abbr : $oLastVerse->book_name) . ' ';

					// John 3:16 - 4:2
					$strRef .= $oLastVerse->chapter . ':' . $oLastVerse->verse;
				}

			}
		}

		// Add styling
		$strRef = $this->bHTML
			? '<i>(' . $strRef . ')</i>'
			: '(' . $strRef .')';

		return $strRef;
	}
1185703
public static function getMultiple(
        Bookboon $bookboon,
        array $bookIds,
        bool $extendedMetadata = false
    ) : BookboonResponse {
        if (count($bookIds) === 0) {
            throw new UsageException('At least one id is required for bookIds');
        }


        $variables = [
            'id' => $bookIds,
            'extendedMetadata' => $extendedMetadata ? 'true' : 'false'
        ];

        $bResponse = $bookboon->rawRequest("/books", $variables);

        $bResponse->setEntityStore(
            new EntityStore(static::getEntitiesFromArray($bResponse->getReturnArray()))
        );

        return $bResponse;
    }
824572
public static function getTree(
        Bookboon $bookboon,
        array $blacklistedCategoryIds = [],
        int $depth = 2
    ) : BookboonResponse {
        $bResponse = $bookboon->rawRequest('/categories', ['depth' => $depth]);

        $categories = $bResponse->getReturnArray();

        if (count($blacklistedCategoryIds) !== 0) {
            self::recursiveBlacklist($categories, $blacklistedCategoryIds);
        }

        $bResponse->setEntityStore(
            new EntityStore(Category::getEntitiesFromArray($categories))
        );

        return $bResponse;
    }