Skip to content

Commit

Permalink
Merge branch '7.0.x' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
macite committed May 25, 2024
2 parents 2425997 + dacd3d2 commit a9d37ac
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v5
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
if: github.event_name != 'pull_request'
Expand Down
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,23 @@ All notable changes to this project will be documented in this file. See [standa
* update save status on actions ([096aee6](https://github.com/macite/doubtfire-deploy/commit/096aee685d2cf0652092b4f87a319de73e1dd1e9))
* update schema to match migration dates ([5c1afe4](https://github.com/macite/doubtfire-deploy/commit/5c1afe421dd41b8f56284e776ce39996b3f28d71))

### [7.0.26](https://github.com/doubtfire-lms/doubtfire-deploy/compare/v7.0.25...v7.0.26) (2024-05-21)

### [7.0.25](https://github.com/doubtfire-lms/doubtfire-deploy/compare/v7.0.24...v7.0.25) (2024-05-20)


### Bug Fixes

* ensure portfolio tasks more likely to work with long files ([e9d6641](https://github.com/doubtfire-lms/doubtfire-deploy/commit/e9d66411690482f446dfdb1d53d705435eb22aea))
* skip unit tests and linting for documentation updates ([399d109](https://github.com/doubtfire-lms/doubtfire-deploy/commit/399d1098aef2788545a22c1d3e768b0fe61a74cf))

### [7.0.24](https://github.com/doubtfire-lms/doubtfire-deploy/compare/v7.0.23...v7.0.24) (2024-03-26)


### Bug Fixes

* ensure that tagpdf is installed in latex ([d1f2197](https://github.com/doubtfire-lms/doubtfire-deploy/commit/d1f2197e882038ef095b98a4558644e0c4c4bd33))

### [7.0.23](https://github.com/macite/doubtfire-deploy/compare/v7.0.22...v7.0.23) (2024-03-22)


Expand Down
49 changes: 31 additions & 18 deletions app/views/portfolio/portfolio_pdf.pdf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,21 @@ document_list = Array.new
%>

\begin{titlepage}
<% if @learning_summary_report %>
% add learning summary report to the document list for annotation extraction
<% document_list.append(@learning_summary_report) unless @is_retry %>
\includepdf[addtotoc={\thepage,section,1,Learning Summary Report,chap:learningsummary},pages={1-1},fitpaper]{<%= @learning_summary_report %>}

<% for page_idx in 2..FileHelper.pages_in_pdf(@learning_summary_report) do %>
\includepdf[pages={<%= page_idx %>-<%= page_idx %>},fitpaper]{<%= @learning_summary_report %>}
<% end # end for %>

<% end %>
<% if @learning_summary_report
# add learning summary report to the document list for annotation extraction
document_list.append(@learning_summary_report) unless @is_retry %>
\includepdf[addtotoc={\thepage,section,1,Learning Summary Report,chap:learningsummary},pages={1-1},fitpaper]{<%= @learning_summary_report %>}
<%
if FileHelper.pages_in_pdf(@learning_summary_report) > 30
%>
\includepdf[pages={2-},fitpaper]{<%= @learning_summary_report %>}
<% else
for page_idx in 2..FileHelper.pages_in_pdf(@learning_summary_report) do %>
\includepdf[pages={<%= page_idx %>-<%= page_idx %>},fitpaper]{<%= @learning_summary_report %>}
<% end # end for
end # if long LSR
end # if there is a learning summary
%>

\thispagestyle{title}
\center
Expand Down Expand Up @@ -78,7 +83,7 @@ document_list = Array.new
\begin{minipage}{0.4\textwidth}
\begin{flushright} \large
\emph{Tutor:} \\
<% if not @project.main_convenor_user.nil? %>
<% unless @project.main_convenor_user.nil? %>
<%= lesc @project.main_convenor_user.first_name %> \textsc{<%= lesc @project.main_convenor_user.last_name %>}
<% else %>
No Tutor
Expand Down Expand Up @@ -232,14 +237,22 @@ No Tutor
<% end %>
\end{tabular}
<% end %>
<% if File.exist? task.portfolio_evidence_path %>
% add task evidence to the document list for annotation extraction
<% document_list.append(task.portfolio_evidence_path) unless @is_retry %>
<% for page_idx in 1..FileHelper.pages_in_pdf(task.portfolio_evidence_path) do %>

<% if File.exist? task.portfolio_evidence_path
# add task evidence to the document list for annotation extraction
document_list.append(task.portfolio_evidence_path) unless @is_retry

# embed in its entirety if more than 30 pages, otherwise embed page by page
if FileHelper.pages_in_pdf(task.portfolio_evidence_path) > 30
%>
\includepdf[pages={1-},fitpaper]{<%= task.portfolio_evidence_path %>}
<% else %>
<% for page_idx in 1..FileHelper.pages_in_pdf(task.portfolio_evidence_path) do %>
\includepdf[pages={<%= page_idx %>-<%= page_idx %>},fitpaper]{<%= task.portfolio_evidence_path %>}
<% end # end for %>
<% end %>
<% end %>
<% end # end for
end # end if many pages
end # end if file exists
end # portfolio tasks %>

<% # generate lua calls for newpax and insert it in the preamble for annotation extraction
content_for :preamble_newpax do %>
Expand Down

0 comments on commit a9d37ac

Please sign in to comment.