Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
Pontifex-Hugo Pontifex-Hugo
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 10
    • Issues 10
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 3
    • Merge requests 3
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Metrics
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • HOOU an der TUHH Projekte
  • Pontifex
  • Pontifex-HugoPontifex-Hugo
  • Issues
  • #62

Closed
Open
Created Sep 15, 2022 by Fabian Nuraddin Alexander Gabel@cfg0846Owner5 of 5 tasks completed5/5 tasks

bsom quizzes embedding

  • Numbers of quizzes
  • corresponding number
  • add HTML files with quiz to corresponding folder ( using curl, without sending anything around): https://stackoverflow.com/q/2815/2457256

Curl the files

for f in `grep -o "https://.*ratest..\.html" ../graph.json | sort | uniq`; do out=`echo $f | grep -o "ratest..\.html"`; curl $f > $out; done

Copy the files to correct destination

for node in nodes:
    myid = nodes[node]["id"]
    if re.match(r'.*ratest.*', myex):
        ratest = re.findall(r'https://.*(ratest..\.html)', myex)[0]
        shutil.copyfile(f'/home/fabian/gitlab/pontifex-hugo/nodes/downloads/{ratest}', f'/home/fabian/gitlab/pontifex-hugo/nodes/{myid}/{ratest}')

Git add the files

for f in `find . -iname "ratest??.html"`; do git add -f $f; done
  • adapt json to use local HTML
  • delete buttons, impressum, links

This solution keeps using iframes but for embedding local htmlfiles. This is necessary because of different bootstrap and mathjax versions used in Pontifex vs. Quizzes

grep -o "ratest.." nodes/graph.json | sort | uniq

gives the quizzes:

ratest07
ratest09
ratest10
ratest11
ratest13
ratest21
ratest22
ratest23
ratest24
ratest25
ratest29
ratest30
ratest31
ratest37
ratest40
ratest45
ratest47
ratest48
ratest49
ratest50
ratest51
ratest52
ratest53
ratest56
ratest61

Embedding goes via

<script src="https://cdnjs.cloudflare.com/ajax/libs/iframe-resizer/4.3.2/iframeResizer.min.js"></script>

<iframe
  class="embed-responsive-item"
  style="border-width: 0"
  src="./ratest.html"
  width="100%"
>

</iframe><script>iFrameResize({log:true,inPageLinks:true,resizeFrom:'child'})</script>
Edited Sep 20, 2022 by Fabian Nuraddin Alexander Gabel
Assignee
Assign to
publication
Milestone
publication
Assign milestone
Time tracking