For my post, I assume that for software developers or authors of educational texts, an important part of choosing the proper license for their work is attribution: as the original author, I would want my work to be attributed to me when it's reused. Furthermore, I may want to assure that it's not allowed for someone else to reclaim my work as its own without at least violating de terms of use of my publication.
I feel that a lot of times Open-Educational Resources (OER) are linked to CreativeCommons (CC) without being actually compatible. I'll give two examples to illustrate my claim and would like to hear your comments handling the publication process in these examples.
Example I
Assume that I want to publish the LaTeX-source code of some lecture notes I wrote as an OER. I want others to reuse the code for their own lectures but also for the produced artifact (the PDF) to carry the proper attribution. What license should I choose and for what?
Idea (i): only release the PDF with a CC-BY license
It seems to me that this is the standard scenario would be to opt for a CC-BY licensing of the PDF. If someone uses a passage from the PDF, proper attribution needs to be given. However, in this case, I should not publish the TeX-source as well under an open-source license, as the user could then just copy my TeX-source, and generate an "attribution free" PDF copy of my lecture notes basically reclaiming my work as their own.
Idea (ii): only release the Source-code with the "correct" license
Based on the previous section, I think that it does not make sense to license the PDF if the source is also published under an open-source license. But which license should one then choose to assure proper attribution?
Example II with a twist
Assume that I wrote some JavaScript code, in the sense of an interactive exercise/quiz for students. In practice, the JavaScript code is included on a webpage and used by students. I want other teachers to be able to use the quizzes in their course under the condition of attributing the source code to myself but without the need to link the exercise's source code (which contains at least a hint of a solution to the quiz). Is there a license that classifies for this scenario? I feel like under a CC-BY license for the JavaScript code, the quiz that is displayed in the web browser of the student could classify as a derivate and therefore must carry a proper attribution including a link to the original source.